File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
packages/nextjs/src/server Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import { GLOBAL_OBJ, logger } from '@sentry/utils';
1414import {
1515 ATTR_HTTP_REQUEST_METHOD ,
1616 ATTR_HTTP_ROUTE ,
17+ ATTR_URL_QUERY ,
1718 SEMATTRS_HTTP_METHOD ,
1819 SEMATTRS_HTTP_TARGET ,
1920} from '@opentelemetry/semantic-conventions' ;
@@ -157,11 +158,14 @@ export function init(options: NodeOptions): NodeClient | undefined {
157158 // We need to drop these spans.
158159 if (
159160 // eslint-disable-next-line deprecation/deprecation
160- typeof spanAttributes [ SEMATTRS_HTTP_TARGET ] === 'string' &&
161- // eslint-disable-next-line deprecation/deprecation
162- spanAttributes [ SEMATTRS_HTTP_TARGET ] . includes ( 'sentry_key' ) &&
163- // eslint-disable-next-line deprecation/deprecation
164- spanAttributes [ SEMATTRS_HTTP_TARGET ] . includes ( 'sentry_client' )
161+ ( typeof spanAttributes [ SEMATTRS_HTTP_TARGET ] === 'string' &&
162+ // eslint-disable-next-line deprecation/deprecation
163+ spanAttributes [ SEMATTRS_HTTP_TARGET ] . includes ( 'sentry_key' ) &&
164+ // eslint-disable-next-line deprecation/deprecation
165+ spanAttributes [ SEMATTRS_HTTP_TARGET ] . includes ( 'sentry_client' ) ) ||
166+ ( typeof spanAttributes [ ATTR_URL_QUERY ] === 'string' &&
167+ spanAttributes [ ATTR_URL_QUERY ] . includes ( 'sentry_key' ) &&
168+ spanAttributes [ ATTR_URL_QUERY ] . includes ( 'sentry_client' ) )
165169 ) {
166170 samplingDecision . decision = false ;
167171 }
You can’t perform that action at this time.
0 commit comments