|
1 | 1 | /* eslint-disable @sentry-internal/sdk/no-optional-chaining */
|
2 | 2 | import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, getCurrentScope, startSpan } from '@sentry/core';
|
3 | 3 | import { captureException } from '@sentry/node';
|
4 |
| -import type { StartSpanOptions, TransactionContext } from '@sentry/types'; |
5 | 4 | import { addNonEnumerableProperty, objectify } from '@sentry/utils';
|
6 | 5 | import type { LoadEvent, ServerLoadEvent } from '@sveltejs/kit';
|
7 | 6 |
|
| 7 | +import type { TransactionContext } from '@sentry/types'; |
8 | 8 | import type { SentryWrappedFlag } from '../common/utils';
|
9 | 9 | import { isHttpError, isRedirect } from '../common/utils';
|
10 | 10 | import { flushIfServerless, getTracePropagationData } from './utils';
|
@@ -65,7 +65,7 @@ export function wrapLoadWithSentry<T extends (...args: any) => any>(origLoad: T)
|
65 | 65 |
|
66 | 66 | const routeId = event.route && event.route.id;
|
67 | 67 |
|
68 |
| - const traceLoadContext: StartSpanOptions = { |
| 68 | + const traceLoadContext: TransactionContext = { |
69 | 69 | op: 'function.sveltekit.load',
|
70 | 70 | attributes: {
|
71 | 71 | [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.sveltekit',
|
@@ -134,7 +134,7 @@ export function wrapServerLoadWithSentry<T extends (...args: any) => any>(origSe
|
134 | 134 | const { dynamicSamplingContext, traceparentData, propagationContext } = getTracePropagationData(event);
|
135 | 135 | getCurrentScope().setPropagationContext(propagationContext);
|
136 | 136 |
|
137 |
| - const traceLoadContext: StartSpanOptions = { |
| 137 | + const traceLoadContext: TransactionContext = { |
138 | 138 | op: 'function.sveltekit.server.load',
|
139 | 139 | attributes: {
|
140 | 140 | [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.sveltekit',
|
|
0 commit comments