Skip to content

Commit 2f17bb1

Browse files
authored
fix(astro): Remove method from span op (#9603)
Although adding method is nice to span op, it duplicates information that is already in span description. In addition, we want to reduce the total list of span ops as much as possible for cardinality reasons, `http.server` + span data about method is good enough to understand intent here.
1 parent 48e2337 commit 2f17bb1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/astro/src/server/middleware.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ export const handleRequest: (options?: MiddlewareOptions) => MiddlewareResponseH
8383
const res = await startSpan(
8484
{
8585
name: `${method} ${interpolateRouteFromUrlAndParams(ctx.url.pathname, ctx.params)}`,
86-
op: `http.server.${method.toLowerCase()}`,
86+
op: 'http.server',
8787
origin: 'auto.http.astro',
8888
status: 'ok',
8989
...traceparentData,

packages/astro/test/server/middleware.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ describe('sentryMiddleware', () => {
4747
source: 'route',
4848
},
4949
name: 'GET /users/[id]/details',
50-
op: 'http.server.get',
50+
op: 'http.server',
5151
origin: 'auto.http.astro',
5252
status: 'ok',
5353
},

0 commit comments

Comments
 (0)