foundations icon indicating copy to clipboard operation
foundations copied to clipboard

Consider supporting OpenTelemetry

Open ibotty opened this issue 1 year ago • 11 comments

We are already running OpenTelemetry so it would be great to allow easy intergration into apps using foundations.

ibotty avatar Feb 01 '24 11:02 ibotty

Could you elaborate a bit more about what kind of integration you expect?

inikulin avatar Feb 01 '24 11:02 inikulin

@ibotty which apis are you interested in here?

Generic OTEL support for tracing and logging is likely to be fairly simple, metrics would be more complicated though.

Noah-Kennedy avatar Feb 01 '24 17:02 Noah-Kennedy

Sorry for not answering earlier. I was busy.

For some rust projects we are using tracing, tracing-opentelemetry and opentelemetry-otlp to export traces. We don't yet use metrics via OpenTelemetry.

ATM setting that up is quiet a handful of boilerplate in Rust. It seems to be kind-of in scope for foundations to make that easier.

ibotty avatar Feb 03 '24 15:02 ibotty

Foundations doesn't use tracing, and instead has it's own competing system, but does handle all the stuff you are talking about here already, albeit the exporting is slightly hardcoded around jaeger OTEL, but that can easily be changed.

Noah-Kennedy avatar Feb 05 '24 19:02 Noah-Kennedy

Sorry for the incomplete post.

Is there some documentation on why foundations is not using tokio's tracing? I would have hoped, that the enhancements in the blog post could be made in upstream tracing as well. It's a little unfortunate to not have the native tracing of tokio's crates.

ibotty avatar Feb 10 '24 17:02 ibotty

There is certain functionality in foundations that can't be implemented with tracing's design. Also, there are certain unresolved bugs in tracing that prevented it's adoption for certain scenarios that we have.

However, there's a plan to release an adapter crate that will allow funnelling of tracing-produced output to Foundations. cc @evanrittenhouse

inikulin avatar Feb 12 '24 12:02 inikulin

Hopefully I can start work on the adapter crate in the next couple of days. I'm thinking we can start with an OTEL appender as shown in https://github.com/open-telemetry/opentelemetry-rust

evanrittenhouse avatar Feb 26 '24 03:02 evanrittenhouse

v4 will have native support for OTLP gRPC exporters for traces and logs. Please, let me us know if you also need any of those:

  • OTLP HTTP endpoints support
  • Collectors requiring mTLS
  • OTLP support for metrics

inikulin avatar Mar 15 '24 12:03 inikulin

+ for

  • OTLP HTTP endpoints support
  • OTLP support for metrics

nifty-bytes avatar Mar 15 '24 19:03 nifty-bytes

https://github.com/cloudflare/foundations/pull/34 adds support for OTLP tracing reporting. External reviews are vey much appreciated

inikulin avatar May 09 '24 22:05 inikulin

There is certain functionality in foundations that can't be implemented with tracing's design. Also, there are certain unresolved bugs in tracing that prevented it's adoption for certain scenarios that we have.

Hi! I'm a tracing maintainer. Can you share these limitations/bugs are? I'm not aware of what you're missing, but I'd like to be able to close those gaps.

davidbarsky avatar May 22 '24 01:05 davidbarsky