Skip to content
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

Datadog log export? #6

Open
jssblck opened this issue Jun 21, 2022 · 5 comments
Open

Datadog log export? #6

jssblck opened this issue Jun 21, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@jssblck
Copy link

jssblck commented Jun 21, 2022

Hello! I'm getting an app set up that exports tracing spans and logs through tracing-opentelemetry to opentelemetry, which I'm finally sinking into opentelemetry-datadog (latest on all).

I've noticed the spans themselves work great and support nesting- thanks so much for the awesome work!
My question is related to logs: I don't see them in datadog, even though I've enabled them in the DD collector and I'm seeing them in other tracing subscribers.

I searched around for this and found this comment on another issue:

I don't believe that logging is integrated in opentelemetry-datadog yet, could open a separate issue for that one

I'm opening this issue to ask:

  • Is log export indeed not supported?
  • If not, does the team have any recommendations for how to make it work?
    • No expectation, just wondering!
  • Would you all be open to a PR adding this functionality?
    • If so- I've never worked with implementing a trace collector, do you have any recommendations on where to start? No expectation of course, just asking!

Thanks for your time!

@TommyCpp
Copy link
Contributor

Hey 👋 I haven't used datadog for a while so want to check by log do you mean the log appended as part of a span(Something like
image

or it's just general logs? For the log within a span yeah I think it makes sense to add support for it. For general logs, we probably need to wait until the log API is merged so that we don't duplicate the work

@jssblck
Copy link
Author

jssblck commented Jul 12, 2022

Hi @TommyCpp!

Personally I'm more after logs within a span, I think that's where most of the value is!

@TommyCpp
Copy link
Contributor

Ahhh I see then I think we should have all you need to build one. In opentelemetry we have a concept called events, which usually corresponds with logs in spans.

We already have some conversion functions to convert opentelemetry spans to a datadog spans. With opentelemetry events attached to the spans, we can just convert them into logs in datadog spans. I think this can be a good starting point.

One question that remains is how does log is encoded in datadog format. Maybe worth taking a look at datadog agent implementation and see how they encode it. This is how we get the span works IIRC.

Either way, feel free to let me know if you need any assistance 🚀

@TommyCpp TommyCpp added the enhancement New feature or request label Jul 12, 2022
@nashley
Copy link

nashley commented Dec 7, 2022

Has anything changed on this front, or are logs within spans still not readily supported via opentelemetry-datadog?

I don't really understand the suggested workaround or how to begin implementing it. Are there any existing codebases or examples that we can draw from?

@scottlamb
Copy link

IIUC, either DataDog agent and the opentelemetry collector support receiving logs/traces over OTLP then transmitting them to Datadog. So I'm wondering: would we be better off exporting via the opentelemetry-otlp crate instead of adding export features to the opentelemetry-datadog crate?

One caveat I see is that if inbound/outbound requests use x-datadog-{trace-id,parent-id,sampling-priority} headers, obviously it's important to continue doing that to keep interacting properly to keep the distributed tracing working. But I think it should be possible to keep those while sending data over OTLP?

@hdost hdost transferred this issue from open-telemetry/opentelemetry-rust Nov 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants