Skip to content

Conversation

sergical
Copy link
Member

@sergical sergical commented Aug 22, 2025

Based on the Cloudflare OTel implementation

CleanShot 2025-08-25 at 13 39 23

@sergical sergical marked this pull request as ready for review August 25, 2025 17:43
cursor[bot]

This comment was marked as outdated.

@chargome
Copy link
Member

Thanks for the PR Sergiy!

Just for me to understand this better: doesn't Deno come with a built-in otel tracer already?

@sergical
Copy link
Member Author

Thanks for the PR Sergiy!

Just for me to understand this better: doesn't Deno come with a built-in otel tracer already?

From chatting with @AbhiPrasad, we can't use it due to the limitations

The only supported exporter is OTLP - other exporters are not supported.

Copy link
Member

@chargome chargome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Looks like we can't use the deno tracer due to missing configuration APIs + v1 OTEL support only.

Thanks for adding this @sergical

@chargome chargome requested a review from mydea September 4, 2025 14:44
Comment on lines 4 to 8
* The only difference is that it does not use `@opentelemetry/instrumentation`
* because Deno Workers do not support it in the same way.
*
* Therefore, we cannot automatically patch setting `experimental_telemetry: { isEnabled: true }`
* and users have to manually set this to get spans.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this comment is wrong, I would just remove it - this is just a 1-1 copy of the cloudflare one, right? :D

So either we just say "this is a copt of the cloudflare one" or we copy the whole comment and say "it is a copy of the node one, but...."

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed the comment, just left as copy from cloudflare

Copy link
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

generally this looks good to me - just to double check, does this conflict in any way with deno native otel support? We should make sure to test this that everything works as expected for both ends, so native otel stuff continues to work and our stuff continues to work if that is used 🤔

cursor[bot]

This comment was marked as outdated.

@sergical
Copy link
Member Author

sergical commented Sep 9, 2025

@mydea added tests for providers co-existing and not overriding each other, haven't tested end to end with actual OTeL instrumentation locally, lmk if this is enough or I should dig deeper

cursor[bot]

This comment was marked as outdated.

@sergical sergical merged commit 4f83fa7 into develop Sep 10, 2025
33 checks passed
@sergical sergical deleted the feat/deno-opentelemetry-vercelai branch September 10, 2025 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants