Closed
Description
Is there an existing issue for this?
- I have checked for existing issues https://github.com/getsentry/sentry-javascript/issues
- I have reviewed the documentation https://docs.sentry.io/
- I am using the latest SDK release https://github.com/getsentry/sentry-javascript/releases
How do you use Sentry?
Saas (sentry.io)
Which package are you using?
@sentry/node
SDK Version
6.18.2
Framework Version
No response
Link to Sentry event
No response
Steps to Reproduce
We are using Nestjs and create spanned transactions for logging. Recently upgraded from 6.11.0
to 6.18.2
and began seeing the issue. Here's just a bit of sample usage:
const { method, headers, url } = this.request;
const transaction = Sentry.startTransaction({
name: `Route: ${method} ${url}`,
op: 'transaction'
});
Sentry.getCurrentHub().configureScope((scope) => {
scope.setSpan(transaction);
scope.setContext('http', {
method,
url,
headers
});
});
Transaction is undefined in this instance so a scope is never configured. I have tested the startTransaction
method in two separate projects and both are experiencing the same issue. Downgrading library back to 6.11.0
fixes the issue.
Expected Result
startTransaction
method should return an instance of transaction so it can be used for proper scoping.
Actual Result
When pulling the scoped span via Sentry.getCurrentHub().getScope()?.getSpan();
I am receiving undefined as the span was never created properly due to the transaction being undefined.
Metadata
Metadata
Assignees
Labels
No labels