You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
And do this for opentelemetry, instead of relying on extra exports.
Also needed to move things around a bit to avoid circular dependency
build issues.
Missing is `getRootSpan` which is still different, I will update this in
a follow up to actually use the same non-enumerable property under the
hood so we can use the same implementation there!
## Reasoning
Until now, we had a core implementation of tracing APIs in
`@sentry/core`. In `@sentry/opentelemetry`, we had some alternative
implementations, which where instead re-exported in `@sentry/node` - so
if you do e.g. this:
```js
import { startSpan } from '@sentry/node';
```
You'll get the correct, OTEL-powered performance API - great!
However, if any code would internally do e.g. this:
```js
import { getActiveSpan } from '@sentry/core'; // import from core, not node
```
It would not work, because it would use the non-OTEL-powered API.
This PR addresses this by ensuring we use the same API everywhere when
`@sentry/node` is being used.
0 commit comments