Skip to content

Commit bbf37d5

Browse files
committed
set method better
1 parent 5ef23d2 commit bbf37d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/astro/src/server/middleware.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
getIsolationScope,
77
getRootSpan,
88
objectify,
9+
SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD,
910
spanToJSON,
1011
stripUrlQueryAndFragment,
1112
winterCGRequestToRequestData,
@@ -166,7 +167,6 @@ async function enhanceHttpServerSpan(
166167
} finally {
167168
await flushIfServerless();
168169
}
169-
170170
}
171171

172172
async function instrumentRequestStartHttpServerSpan(
@@ -216,6 +216,8 @@ async function instrumentRequestStartHttpServerSpan(
216216
const attributes: SpanAttributes = {
217217
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.astro',
218218
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: source,
219+
[SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD]: method,
220+
// This is here for backwards compatibility, we used to set this here before
219221
method,
220222
url: stripUrlQueryAndFragment(ctx.url.href),
221223
};

0 commit comments

Comments
 (0)