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

Fix missing logs when client includes their own @opentelemetry/api #1106

Merged
merged 1 commit into from
May 21, 2024

Conversation

ericallam
Copy link
Member

If a user has their own @opentelemetry/api package, which is a different version from ours, then task logs will fail to be sent to the platform because opentelemetry will fail to register our tracing API with the following error message:

Error: @opentelemetry/api: Registration of version v1.8.0 for trace does not match previously registered API v1.4.1

The solution was to make sure the user's @opentelemetry/api was not imported by the worker prior to our trace API registration. Removing the @opentelemetry/resources import from worker-setup.ts was enough to solve this problem because it imports @opentelemetry/api, and the top-level @opentelemetry/api inside node_modules is the users, not the one inside @trigger.dev/core.

Copy link

changeset-bot bot commented May 17, 2024

🦋 Changeset detected

Latest commit: 84127b4

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ericallam ericallam force-pushed the v3/opentelemetry-api-mismatch-fix branch from 2ec1550 to 84127b4 Compare May 21, 2024 13:37
@ericallam ericallam merged commit 5a6e79e into main May 21, 2024
2 checks passed
@ericallam ericallam deleted the v3/opentelemetry-api-mismatch-fix branch May 21, 2024 13:38
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.

None yet

1 participant