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

Update @sentry/node to v8 #579

Closed
mydea opened this issue Jul 30, 2024 · 2 comments · Fixed by #604
Closed

Update @sentry/node to v8 #579

mydea opened this issue Jul 30, 2024 · 2 comments · Fixed by #604
Assignees

Comments

@mydea
Copy link
Member

mydea commented Jul 30, 2024

We still use v7 of the Node SDK, we should bump our own usage to v8.

We can also explore using ServerRuntimeClient from @sentry/core instead of NodeClient. We only manually create a client, so maybe we can skip the OTEL dependencies etc. here.

@timfish timfish self-assigned this Sep 6, 2024
@timfish
Copy link
Collaborator

timfish commented Sep 7, 2024

I've mostly completed the changes for v8 but the build fails with the previously reported issue with opentelemetry-instrumentation-fetch-node.

I can either wait until this dependency gets removed or drop @sentry/node entirely as a dependency. At this point the only export we need is the Node transport.

Image

@timfish
Copy link
Collaborator

timfish commented Sep 7, 2024

Ah, I added that to externals and hit a load of other bundling warnings and issue with otel 😭

Image

AbhiPrasad pushed a commit to getsentry/sentry-javascript that referenced this issue Sep 9, 2024
While working on updating [`sentry-javascript-bundler-plugins` to use v8
of the JavaScript
SDK](getsentry/sentry-javascript-bundler-plugins#579),
I found that I was unable to set measurements as the global client is
not used.

If you're not using a global client, there is currently no way to add
measurements because `Sentry.setMeasurement()` relies on
`getActiveSpan()` which in turn relies on `getCurrentScope()`.

This PR moves the `activeSpan` into the last parameter which defaults to
`getActiveSpan()`.
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 a pull request may close this issue.

2 participants