Skip to content

Commit 54ddec6

Browse files
authored
fix(node): Make http integration spans have http span operation (#4224)
As per: https://develop.sentry.dev/sdk/performance/span-operations/#web-server
1 parent 349add8 commit 54ddec6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

packages/nextjs/test/integration/test/server/tracingHttp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module.exports = async ({ url: urlBase, argv }) => {
2525
spans: [
2626
{
2727
description: 'GET http://example.com/',
28-
op: 'request',
28+
op: 'http.client',
2929
status: 'ok',
3030
tags: { 'http.status_code': '200' },
3131
},

packages/node/src/integrations/http.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ function _createWrappedRequestMethodFactory(
114114
if (parentSpan) {
115115
span = parentSpan.startChild({
116116
description: `${requestOptions.method || 'GET'} ${requestUrl}`,
117-
op: 'request',
117+
op: 'http.client',
118118
});
119119

120120
const sentryTraceHeader = span.toTraceparent();

packages/node/test/integrations/http.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ describe('tracing', () => {
5252

5353
// our span is at index 1 because the transaction itself is at index 0
5454
expect(spans[1].description).toEqual('GET http://dogs.are.great/');
55-
expect(spans[1].op).toEqual('request');
55+
expect(spans[1].op).toEqual('http.client');
5656
});
5757

5858
it("doesn't create a span for outgoing sentry requests", () => {

0 commit comments

Comments
 (0)