Skip to content

Commit

Permalink
fix(astro): Remove method from span op (#9603)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AbhiPrasad authored Nov 21, 2023
1 parent 48e2337 commit 2f17bb1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/astro/src/server/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export const handleRequest: (options?: MiddlewareOptions) => MiddlewareResponseH
const res = await startSpan(
{
name: `${method} ${interpolateRouteFromUrlAndParams(ctx.url.pathname, ctx.params)}`,
op: `http.server.${method.toLowerCase()}`,
op: 'http.server',
origin: 'auto.http.astro',
status: 'ok',
...traceparentData,
Expand Down
2 changes: 1 addition & 1 deletion packages/astro/test/server/middleware.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('sentryMiddleware', () => {
source: 'route',
},
name: 'GET /users/[id]/details',
op: 'http.server.get',
op: 'http.server',
origin: 'auto.http.astro',
status: 'ok',
},
Expand Down

0 comments on commit 2f17bb1

Please sign in to comment.