Skip to content

Commit 3590cc2

Browse files
committed
switch to using route
1 parent 718a42a commit 3590cc2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/serverless/src/gcpfunction/http.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ function _wrapHttpFunction(fn: HttpFunction, wrapOptions: Partial<HttpFunctionWr
8787
name: `${reqMethod} ${reqUrl}`,
8888
op: 'gcp.function.http',
8989
...traceparentData,
90-
metadata: { baggage, source: 'url' },
90+
metadata: { baggage, source: 'route' },
9191
});
9292

9393
// getCurrentHub() is expected to use current active domain as a carrier

packages/serverless/test/gcpfunction.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ describe('GCPFunction', () => {
113113
expect(Sentry.startTransaction).toBeCalledWith({
114114
name: 'POST /path',
115115
op: 'gcp.function.http',
116-
metadata: { baggage: [{}, '', true], source: 'url' },
116+
metadata: { baggage: [{}, '', true], source: 'route' },
117117
});
118118
// @ts-ignore see "Why @ts-ignore" note
119119
expect(Sentry.fakeScope.setSpan).toBeCalledWith(Sentry.fakeTransaction);
@@ -153,7 +153,7 @@ describe('GCPFunction', () => {
153153
'',
154154
false,
155155
],
156-
source: 'url',
156+
source: 'route',
157157
},
158158
}),
159159
);
@@ -179,7 +179,7 @@ describe('GCPFunction', () => {
179179
traceId: '12312012123120121231201212312012',
180180
parentSpanId: '1121201211212012',
181181
parentSampled: false,
182-
metadata: { baggage: [{}, '', false], source: 'url' },
182+
metadata: { baggage: [{}, '', false], source: 'route' },
183183
});
184184
// @ts-ignore see "Why @ts-ignore" note
185185
expect(Sentry.fakeScope.setSpan).toBeCalledWith(Sentry.fakeTransaction);

0 commit comments

Comments
 (0)