File tree 1 file changed +9
-5
lines changed
packages/nextjs/src/server
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';
14
14
import {
15
15
ATTR_HTTP_REQUEST_METHOD ,
16
16
ATTR_HTTP_ROUTE ,
17
+ ATTR_URL_QUERY ,
17
18
SEMATTRS_HTTP_METHOD ,
18
19
SEMATTRS_HTTP_TARGET ,
19
20
} from '@opentelemetry/semantic-conventions' ;
@@ -157,11 +158,14 @@ export function init(options: NodeOptions): NodeClient | undefined {
157
158
// We need to drop these spans.
158
159
if (
159
160
// 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' ) )
165
169
) {
166
170
samplingDecision . decision = false ;
167
171
}
You can’t perform that action at this time.
0 commit comments