-
Notifications
You must be signed in to change notification settings - Fork 839
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
Option to convert log events to span events #6880
Option to convert log events to span events #6880
Comments
I like doing this at SDK layer and having an ENV to enable it. This is much better than having each instrumentation make a similar modification. To your point on the collector, some notes discussed in various places limit the viability for some reasons.
So, you can't do cross signal processing. The way out suggested for "cross signal" stuff in the collector was a connector component, but I've not seen one built. |
I've got a prototype (draft) PR of this in #6650: https://github.com/open-telemetry/opentelemetry-java/pull/6650/files#diff-9a020a19daa2bf404ef87308c5948ee99a157bd3c68195dface5b2813ef30f04 The key bit is defining how log record events translate to span events given that log record bodies are AnyValue while span events are limited to standard attributes. I think long term the spec / proto will solve this possibly by extending span event with an AnyValue body, but I / we don't want to wait 🙂. My PR is pretty naive about this now and just records the What do folks think about landing a LogRecordProcessor like this in |
this would be nice ❤️
👍 |
Thanks @jack-berg! Searched existing issues but didn't think to search PRs, good to see something there already. I think having that available as a prototype would be great |
I agree with this approach long term, btw. We should level the playing field where people don't grasp and use an inconvenient signal type, just to access AnyValue which could be in another. 👍 towards a fair game ⚾! |
Is your feature request related to a problem? Please describe.
It's not uncommon to be running only a tracing backend or otherwise have no way to ingest logs, for example for sites using jaeger. Then events cannot be consumed at all.
Describe the solution you'd like
An option that will have the logs sdk instead of queueing for OTLP export, check if there is an active span with the same context as the log. If true, convert to a span event. If not, drop it. I guess it would basically be a special logprocessor.
Describe alternatives you've considered
A collector plugin could be nice for being cross language but ordering challenges of spans coming in before logs would require some tricky time-based buffering (wait x seconds before assuming the span's events have all come in) that at best would delay telemetry and at worst would miss telemetry.
Additional context
Well, the answer to this topic will likely be needing a spec issue, but given how much engineering time has already been spent on this topic there, I'm putting it forth to more practical minded folks 😉
The text was updated successfully, but these errors were encountered: