evanderkoogh / otel-cf-workers

An OpenTelemetry compatible library for instrumenting and exporting traces for Cloudflare Workers
BSD 3-Clause "New" or "Revised" License
249 stars 51 forks source link

Example using Sentry OTEL? #159

Open ian opened 2 months ago

ian commented 2 months ago

Wondering if you can point me in the right direction for integrating sentry OTEL: https://sentry.io/for/opentelemetry/?platform=sentry.javascript.node-otel

evanderkoogh commented 2 months ago

I have not used Sentry at all, let alone is an OTel setting, but scanning through https://develop.sentry.dev/sdk/telemetry/traces/opentelemetry/ it seems like they use a lot of a Sentry specific processing throughout the entire pipeline. So it seems almost certainly impossible to configure the current implementation to send data to Sentry.

Given that Sentry has a Sentry specific SpanProcessor and we have a Worker specific Span Processor, I am pretty sure it would require a non-trivial amount of work to merge those two into one SpanProcessor.

AbhiPrasad commented 1 month ago

I have a todo item to look at this for the sentry cloudflare workers sdk: https://github.com/getsentry/sentry-javascript/issues/13365, shouldn't be too bad to merge in this logic.

https://develop.sentry.dev/sdk/telemetry/traces/opentelemetry/ actually is not super up-to-date anymore for our javascript sdks, they now use otel by default and have much less processing.

evanderkoogh commented 1 month ago

Hey @AbhiPrasad, I was actually considering to slightly change the way that the library is going to be handling SpanProcessors, Exporters and tracing in general and have a TODO for me to figure out who to reach out to at Sentry to make this work..

More than happy to grab a chat to see what Sentry needs and make sure that I make supporting it as easy as possible.

AbhiPrasad commented 1 month ago

Hey @evanderkoogh - I'm available any time next week to chat (I'm on EST timezone), it would be great to brainstorm together. You can reach out via my email linked in GH, or I reach out to you open for whatever.

Thanks for the help!