We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Right now to implement distributed tracing with the JS SDK, it is a bit confusing. The docs jump back and forth between different concepts: https://docs.sentry.io/platforms/javascript/distributed-tracing/custom-instrumentation/
and attaching headers requires both @sentry/core and @sentry/utils to be installed.
@sentry/core
@sentry/utils
import * as Sentry from '@sentry/node'; import { spanToTraceHeader, getDynamicSamplingContextFromSpan } from '@sentry/core'; import { dynamicSamplingContextToSentryBaggageHeader } from '@sentry/utils'; app.get('/v1/metrics', (req, res, next) => helpers.authenticated(req, res, next), async (req, res) => { await Sentry.startSpan( { name: 'enqueue metrics job', op: 'queue.submit', attributes: { }, }, async (span) => { const traceHeader = spanToTraceHeader(span); const dynamicSamplingContext = getDynamicSamplingContextFromSpan(span); const baggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext); console.info(traceHeader, baggageHeader); }, ); res.send('ok'); });
We need to restructure the docs, and make sure all relevant methods are accessible via @sentry/browser and @sentry/node.
@sentry/browser
@sentry/node
The text was updated successfully, but these errors were encountered:
Related #11199
Sorry, something went wrong.
No branches or pull requests
Right now to implement distributed tracing with the JS SDK, it is a bit confusing. The docs jump back and forth between different concepts: https://docs.sentry.io/platforms/javascript/distributed-tracing/custom-instrumentation/
and attaching headers requires both
@sentry/core
and@sentry/utils
to be installed.We need to restructure the docs, and make sure all relevant methods are accessible via
@sentry/browser
and@sentry/node
.The text was updated successfully, but these errors were encountered: