Skip to content

Commit 0ad8c99

Browse files
committed
more replacements
1 parent 30d5ce4 commit 0ad8c99

File tree

8 files changed

+44
-17
lines changed

8 files changed

+44
-17
lines changed

packages/astro/src/server/middleware.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '@sentry/core';
1+
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '@sentry/core';
22
import {
33
captureException,
44
continueTrace,
@@ -119,9 +119,11 @@ async function instrumentRequest(
119119
const res = await startSpan(
120120
{
121121
...traceCtx,
122+
attributes: {
123+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.astro',
124+
},
122125
name: `${method} ${interpolatedRoute || ctx.url.pathname}`,
123126
op: 'http.server',
124-
origin: 'auto.http.astro',
125127
status: 'ok',
126128
metadata: {
127129
// eslint-disable-next-line deprecation/deprecation

packages/bun/src/integrations/bunserver.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {
2+
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
23
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
34
Transaction,
45
captureException,
@@ -69,9 +70,11 @@ function instrumentBunServeOptions(serveOptions: Parameters<typeof Bun.serve>[0]
6970
ctx => {
7071
return startSpan(
7172
{
73+
attributes: {
74+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.bun.serve',
75+
},
7276
op: 'http.server',
7377
name: `${request.method} ${parsedUrl.path || '/'}`,
74-
origin: 'auto.http.bun.serve',
7578
...ctx,
7679
data,
7780
metadata: {

packages/ember/addon/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { getOwnConfig, isDevelopingApp, macroCondition } from '@embroider/macros
55
import { startSpan } from '@sentry/browser';
66
import type { BrowserOptions } from '@sentry/browser';
77
import * as Sentry from '@sentry/browser';
8-
import { applySdkMetadata } from '@sentry/core';
8+
import { SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, applySdkMetadata } from '@sentry/core';
99
import { GLOBAL_OBJ } from '@sentry/utils';
1010
import Ember from 'ember';
1111

@@ -82,9 +82,11 @@ export const instrumentRoutePerformance = <T extends RouteConstructor>(BaseRoute
8282
): Promise<ReturnType<X>> => {
8383
return startSpan(
8484
{
85+
attributes: {
86+
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'ember',
87+
},
8588
op,
8689
name: description,
87-
origin: 'auto.ui.ember',
8890
},
8991
() => {
9092
return fn(...args);

packages/nextjs/src/common/utils/edgeWrapperUtils.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {
2+
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
23
SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,
34
addTracingExtensions,
45
captureException,
@@ -40,8 +41,10 @@ export function withEdgeWrapping<H extends EdgeRouteHandler>(
4041
...transactionContext,
4142
name: options.spanDescription,
4243
op: options.spanOp,
43-
origin: 'auto.function.nextjs.withEdgeWrapping',
44-
attributes: { [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'route' },
44+
attributes: {
45+
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'route',
46+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.nextjs.withEdgeWrapping',
47+
},
4548
metadata: {
4649
// eslint-disable-next-line deprecation/deprecation
4750
...transactionContext.metadata,

packages/remix/src/utils/instrumentServer.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/* eslint-disable max-lines */
22
import {
3+
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
34
getActiveSpan,
45
getActiveTransaction,
56
getClient,
@@ -411,7 +412,9 @@ export function startRequestHandlerTransaction(
411412
const transaction = hub.startTransaction({
412413
name,
413414
op: 'http.server',
414-
origin: 'auto.http.remix',
415+
attributes: {
416+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.remix',
417+
},
415418
tags: {
416419
method: request.method,
417420
},

packages/sveltekit/src/client/load.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ export function wrapLoadWithSentry<T extends (...args: any) => any>(origLoad: T)
8080
return startSpan(
8181
{
8282
op: 'function.sveltekit.load',
83-
origin: 'auto.function.sveltekit',
83+
attributes: {
84+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.sveltekit',
85+
},
8486
name: routeId ? routeId : event.url.pathname,
8587
status: 'ok',
8688
metadata: {

packages/sveltekit/src/server/handle.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
import { getActiveSpan, getCurrentScope, getDynamicSamplingContextFromSpan, spanToTraceHeader } from '@sentry/core';
1+
import {
2+
SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,
3+
getActiveSpan,
4+
getCurrentScope,
5+
getDynamicSamplingContextFromSpan,
6+
spanToTraceHeader,
7+
} from '@sentry/core';
28
import { getActiveTransaction, runWithAsyncContext, startSpan } from '@sentry/core';
39
import { captureException } from '@sentry/node';
410
/* eslint-disable @sentry-internal/sdk/no-optional-chaining */
@@ -169,7 +175,9 @@ async function instrumentHandle(
169175
const resolveResult = await startSpan(
170176
{
171177
op: 'http.server',
172-
origin: 'auto.http.sveltekit',
178+
attributes: {
179+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.sveltekit',
180+
},
173181
name: `${event.request.method} ${event.route?.id || event.url.pathname}`,
174182
status: 'ok',
175183
...traceparentData,

packages/sveltekit/src/server/load.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable @sentry-internal/sdk/no-optional-chaining */
2-
import { getCurrentScope, startSpan } from '@sentry/core';
2+
import { SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, getCurrentScope, startSpan } from '@sentry/core';
33
import { captureException } from '@sentry/node';
4-
import type { TransactionContext } from '@sentry/types';
4+
import type { StartSpanOptions, TransactionContext } from '@sentry/types';
55
import { addNonEnumerableProperty, objectify } from '@sentry/utils';
66
import type { LoadEvent, ServerLoadEvent } from '@sveltejs/kit';
77

@@ -65,9 +65,11 @@ export function wrapLoadWithSentry<T extends (...args: any) => any>(origLoad: T)
6565

6666
const routeId = event.route && event.route.id;
6767

68-
const traceLoadContext: TransactionContext = {
68+
const traceLoadContext: StartSpanOptions = {
6969
op: 'function.sveltekit.load',
70-
origin: 'auto.function.sveltekit',
70+
attributes: {
71+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.sveltekit',
72+
},
7173
name: routeId ? routeId : event.url.pathname,
7274
status: 'ok',
7375
metadata: {
@@ -132,9 +134,11 @@ export function wrapServerLoadWithSentry<T extends (...args: any) => any>(origSe
132134
const { dynamicSamplingContext, traceparentData, propagationContext } = getTracePropagationData(event);
133135
getCurrentScope().setPropagationContext(propagationContext);
134136

135-
const traceLoadContext: TransactionContext = {
137+
const traceLoadContext: StartSpanOptions = {
136138
op: 'function.sveltekit.server.load',
137-
origin: 'auto.function.sveltekit',
139+
attributes: {
140+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.function.sveltekit',
141+
},
138142
name: routeId ? routeId : event.url.pathname,
139143
status: 'ok',
140144
metadata: {

0 commit comments

Comments
 (0)