File tree Expand file tree Collapse file tree
packages/opentelemetry/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ export const SENTRY_TRACE_STATE_URL = 'sentry.url';
99export const SENTRY_TRACE_STATE_SAMPLE_RAND = 'sentry.sample_rand' ;
1010export const SENTRY_TRACE_STATE_SAMPLE_RATE = 'sentry.sample_rate' ;
1111
12+ // NOTE: `@sentry/nextjs` has a local copy of this context key for Edge bundles:
13+ // - `packages/nextjs/src/edge/index.ts` (`SENTRY_SCOPES_CONTEXT_KEY`)
14+ //
15+ // If you change the key name passed to `createContextKey(...)`, update that file too.
1216export const SENTRY_SCOPES_CONTEXT_KEY = createContextKey ( 'sentry_scopes' ) ;
1317
1418export const SENTRY_FORK_ISOLATION_SCOPE_CONTEXT_KEY = createContextKey ( 'sentry_fork_isolation_scope' ) ;
Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ const SCOPE_CONTEXT_FIELD = '_scopeContext';
1111 * This requires a Context Manager that was wrapped with getWrappedContextManager.
1212 */
1313export function getScopesFromContext ( context : Context ) : CurrentScopes | undefined {
14+ // NOTE: `@sentry/nextjs` has a local copy of this helper for Edge bundles:
15+ // - `packages/nextjs/src/edge/index.ts` (`getScopesFromContext`)
16+ //
17+ // If you change how scopes are stored/read (key or retrieval), update that file too.
1418 return context . getValue ( SENTRY_SCOPES_CONTEXT_KEY ) as CurrentScopes | undefined ;
1519}
1620
Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ import { spanHasAttributes } from './spanTypes';
99 * @returns boolean
1010 */
1111export function isSentryRequestSpan ( span : AbstractSpan ) : boolean {
12+ // NOTE: `@sentry/nextjs` has a local copy of this helper for Edge bundles:
13+ // - `packages/nextjs/src/common/utils/dropMiddlewareTunnelRequests.ts` (`isSentryRequestSpan`)
14+ //
15+ // If you change supported OTEL attribute keys or request detection logic, update that file too.
1216 if ( ! spanHasAttributes ( span ) ) {
1317 return false ;
1418 }
You can’t perform that action at this time.
0 commit comments