axiomhq / tracing-axiom

The official Rust tracing layer for Axiom
https://axiom.co
Apache License 2.0
20 stars 5 forks source link

Support collecting logs outside of spans #12

Open geekflyer opened 1 year ago

geekflyer commented 1 year ago

Hi,

just came across this library in search how to best integrate logs+traces from a Rust app into axiom. One of the stated limitations in the README is that this library does not support collecting logs outside of spans - presumably because it only supports the otel trace protocol.

Anyways - I'd suggest to have a look at integrating https://github.com/open-telemetry/opentelemetry-rust/tree/main/opentelemetry-appender-tracing which in my understanding would allow collecting tracing events that are emitted from outside a span.

darach commented 12 months ago

Hi Christian @geekflyer ,

Thank you for the suggestion, we'll take a look and see what we can do.

Cheers,

Darach.

darach commented 10 months ago

Hi Christian @geekflyer,

I had a look into this yesterday and this morning. The release of v0.21 of opentelemetry-rust is not binary compatible with v0.20 that we depend upon. But, once we schedule that work its a good enhancement, so i've labelled it as such.

Thank you for suggesting the enhancement 👍. Let us know if this is something you'd be interesting in working on and contributing! 🤩

Cheers,

Darach.

cherryman commented 2 months ago

@darach I've only taken a brief glance at the code, but it seems that using axiom's api directly instead of going through opentelemetry should make this easy to support. Send all tracing events as axiom events and let axiom work out which ones correspond to a trace. This would also remove otel from the dep tree. As an example, see the code for tracing-honeycomb which takes this approach.