-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support to send loggregator envelopes type LOG and EVENT to OtelCollector as logs #595
Conversation
…_AS_OTEL_LOGS`) to send loggregator events to OTL logs service
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I like this change, but I have some some small things which I think have to be changed.
I will fix the rest of the issues tomorrow. Thanks for reviewing the PR! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jriguera Please take a look at the PR checks and fix the linting error
this has been addressed, linter is green
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jriguera can you please rebase this PR, it has merge conflicts at the moment
@ctlong and I tried deploying this today and came across a concern with this approach that we're not sure how to deal with - when the forwarder agent is attempting to send logs to an otel collector that does not have a logs pipeline configured it will generate an error log line for every log message that it tries to forward. We thought about a few ways to handle this but don't have a clear preferred path forward:
@ctlong says maybe we should do the loggregator receiver in otel-collector and avoid this problem entirely 😄 |
It's a sarcasm, right? :) The Loggtegator receiver in its current state, is actually a Firehose nozzle which means:
IMO, The Loggregator Otel Receiver should not even exist. if we were more active and started earlier in the Otel community, we could have explained why this implementation is bad and stopped its further development. |
Agreed that the current loggregator receiver is a flawed approach. What @ctlong is talking about is a loggregator receiver which can be configured to receive loggregator envelopes locally. Initially from the forwarder agent, and eventually directly from system components taking the place of the forwarder agent as otel-collector replaces the agent suite. |
My 2 cents:
|
|
One thought we had - if events are getting mapped to otel logs, should we just control events and logs with the one emit_otel_logs property? We've gone back and forth on if that would be better. It would map closer to the various otel signals. I haven't gone looking, but I seem to recall that there are very few actual usages of loggregator events. |
Hi @jriguera, Don't get me wrong and I'm sorry if I offended you somehow. I'm really glad to see that there is some interest for Otel in CF and I really appreciate your initiative and the things that you've done so far. You've started with your own view of CF, found what's available at the moment and started using it, which is totally fine. I really like that there is interest in the CF community about Otel and as @mkocher said, we could use that to raise its importance and give higher priority to it, so that we can intensify the work on it. At the moment, we've noticed two major challenges with the Otel Collector in general:
We are aware that the Otel Collector Release is not where it should be for prime time usage, but because of the above mentioned challenges, we have decided to start small and slowly expose more and more Otel Collector features in it. We have started with platform metrics metrics only to test things and because the CF operators are the one who are in charge of them. We already have few more PRs which open up more and more feature from the Otel Collector's configuration like Expose wider collector configuration and Config to allow subset of processors and exporters. We play a bit defensive, so that we don't break things. In regards to Otel Semantic conventions I want to share two things:
|
Hi @chombium , No ofended at all!! We are just discussing different ideas and implementations!. To be clear, even if this PR1 or the ones we (in our team) are doing in Otel (regarding Regarding the other topics:
1 Well, in the case of this PR, I really think the functionality is needed anyway. Ofc, the implementation can be different. |
Regarding the |
Description
This PR adds support to forward envelopes type LOG (and optionally EVENT) as "go.opentelemetry.io/proto/otlp/collector/logs/v1" to OtelCollector.
Summary of changes:
Log_OUT
will have severityINFO
and logs typeLog_ERR
will become severityERROR
. Envelope tags will be OTLP LogRecord attributes.EMIT_EVENTS_AS_OTEL_LOGS
is set to true (default is false).title
andevent
with the contents of these fields from the Envelope Event.loggr-forwarder-agent
andloggr-forwarder-agent-windows
jobs.Type of change
Testing performed?
Checklist:
main
branch, or relevant version branchIf you have any questions, or want to get attention for a PR or issue please reach out on the #logging-and-metrics channel in the cloudfoundry slack