Skip to content

Commit b64f9cb

Browse files
committed
update serverless
1 parent 6972ebe commit b64f9cb

File tree

6 files changed

+27
-27
lines changed

6 files changed

+27
-27
lines changed

packages/serverless/src/awslambda.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ export function wrapHandler<TEvent, TResult>(
292292
const transaction = hub.startTransaction({
293293
name: context.functionName,
294294
op: 'function.aws.lambda',
295-
origin: 'auto.http.serverless',
295+
origin: 'auto.function.serverless',
296296
...traceparentData,
297297
metadata: {
298298
dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext,

packages/serverless/src/gcpfunction/cloud_events.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function _wrapCloudEventFunction(
3535
const transaction = hub.startTransaction({
3636
name: context.type || '<unknown>',
3737
op: 'function.gcp.cloud_event',
38-
origin: 'auto.http.serverless.gpc_cloud_event',
38+
origin: 'auto.function.serverless.gcp_cloud_event',
3939
metadata: { source: 'component' },
4040
}) as ReturnType<typeof hub.startTransaction> | undefined;
4141

packages/serverless/src/gcpfunction/events.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function _wrapEventFunction<F extends EventFunction | EventFunctionWithCallback>
3737
const transaction = hub.startTransaction({
3838
name: context.eventType,
3939
op: 'function.gcp.event',
40-
origin: 'auto.http.serverless.gpc_event',
40+
origin: 'auto.function.serverless.gcp_event',
4141
metadata: { source: 'component' },
4242
}) as ReturnType<typeof hub.startTransaction> | undefined;
4343

packages/serverless/src/gcpfunction/http.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function _wrapHttpFunction(fn: HttpFunction, wrapOptions: Partial<HttpFunctionWr
7777
const transaction = hub.startTransaction({
7878
name: `${reqMethod} ${reqUrl}`,
7979
op: 'function.gcp.http',
80-
origin: 'auto.http.serverless.gpc_http',
80+
origin: 'auto.function.serverless.gcp_http',
8181
...traceparentData,
8282
metadata: {
8383
dynamicSamplingContext: traceparentData && !dynamicSamplingContext ? {} : dynamicSamplingContext,

packages/serverless/test/awslambda.test.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ describe('AWSLambda', () => {
194194
const fakeTransactionContext = {
195195
name: 'functionName',
196196
op: 'function.aws.lambda',
197-
origin: 'auto.http.serverless',
197+
origin: 'auto.function.serverless',
198198
metadata: { source: 'component' },
199199
};
200200

@@ -222,7 +222,7 @@ describe('AWSLambda', () => {
222222
const fakeTransactionContext = {
223223
name: 'functionName',
224224
op: 'function.aws.lambda',
225-
origin: 'auto.http.serverless',
225+
origin: 'auto.function.serverless',
226226
metadata: { source: 'component' },
227227
};
228228

@@ -263,7 +263,7 @@ describe('AWSLambda', () => {
263263
parentSpanId: '1121201211212012',
264264
parentSampled: false,
265265
op: 'function.aws.lambda',
266-
origin: 'auto.http.serverless',
266+
origin: 'auto.function.serverless',
267267
name: 'functionName',
268268
traceId: '12312012123120121231201212312012',
269269
metadata: {
@@ -298,7 +298,7 @@ describe('AWSLambda', () => {
298298
const fakeTransactionContext = {
299299
name: 'functionName',
300300
op: 'function.aws.lambda',
301-
origin: 'auto.http.serverless',
301+
origin: 'auto.function.serverless',
302302
traceId: '12312012123120121231201212312012',
303303
parentSpanId: '1121201211212012',
304304
parentSampled: false,
@@ -329,7 +329,7 @@ describe('AWSLambda', () => {
329329
const fakeTransactionContext = {
330330
name: 'functionName',
331331
op: 'function.aws.lambda',
332-
origin: 'auto.http.serverless',
332+
origin: 'auto.function.serverless',
333333
metadata: { source: 'component' },
334334
};
335335

@@ -368,7 +368,7 @@ describe('AWSLambda', () => {
368368
const fakeTransactionContext = {
369369
name: 'functionName',
370370
op: 'function.aws.lambda',
371-
origin: 'auto.http.serverless',
371+
origin: 'auto.function.serverless',
372372
metadata: { source: 'component' },
373373
};
374374

@@ -411,7 +411,7 @@ describe('AWSLambda', () => {
411411
const fakeTransactionContext = {
412412
name: 'functionName',
413413
op: 'function.aws.lambda',
414-
origin: 'auto.http.serverless',
414+
origin: 'auto.function.serverless',
415415
metadata: { source: 'component' },
416416
};
417417

@@ -450,7 +450,7 @@ describe('AWSLambda', () => {
450450
const fakeTransactionContext = {
451451
name: 'functionName',
452452
op: 'function.aws.lambda',
453-
origin: 'auto.http.serverless',
453+
origin: 'auto.function.serverless',
454454
metadata: { source: 'component' },
455455
};
456456

packages/serverless/test/gcpfunction.test.ts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ describe('GCPFunction', () => {
114114
const fakeTransactionContext = {
115115
name: 'POST /path',
116116
op: 'function.gcp.http',
117-
origin: 'auto.http.serverless.gpc_http',
117+
origin: 'auto.function.serverless.gcp_http',
118118
metadata: { source: 'route' },
119119
};
120120
// @ts-ignore see "Why @ts-ignore" note
@@ -148,7 +148,7 @@ describe('GCPFunction', () => {
148148
const fakeTransactionContext = {
149149
name: 'POST /path',
150150
op: 'function.gcp.http',
151-
origin: 'auto.http.serverless.gpc_http',
151+
origin: 'auto.function.serverless.gcp_http',
152152
traceId: '12312012123120121231201212312012',
153153
parentSpanId: '1121201211212012',
154154
parentSampled: false,
@@ -185,7 +185,7 @@ describe('GCPFunction', () => {
185185
const fakeTransactionContext = {
186186
name: 'POST /path',
187187
op: 'function.gcp.http',
188-
origin: 'auto.http.serverless.gpc_http',
188+
origin: 'auto.function.serverless.gcp_http',
189189
traceId: '12312012123120121231201212312012',
190190
parentSpanId: '1121201211212012',
191191
parentSampled: false,
@@ -279,7 +279,7 @@ describe('GCPFunction', () => {
279279
const fakeTransactionContext = {
280280
name: 'event.type',
281281
op: 'function.gcp.event',
282-
origin: 'auto.http.serverless.gpc_event',
282+
origin: 'auto.function.serverless.gcp_event',
283283
metadata: { source: 'component' },
284284
};
285285
// @ts-ignore see "Why @ts-ignore" note
@@ -307,7 +307,7 @@ describe('GCPFunction', () => {
307307
const fakeTransactionContext = {
308308
name: 'event.type',
309309
op: 'function.gcp.event',
310-
origin: 'auto.http.serverless.gpc_event',
310+
origin: 'auto.function.serverless.gcp_event',
311311
metadata: { source: 'component' },
312312
};
313313
// @ts-ignore see "Why @ts-ignore" note
@@ -340,7 +340,7 @@ describe('GCPFunction', () => {
340340
const fakeTransactionContext = {
341341
name: 'event.type',
342342
op: 'function.gcp.event',
343-
origin: 'auto.http.serverless.gpc_event',
343+
origin: 'auto.function.serverless.gcp_event',
344344
metadata: { source: 'component' },
345345
};
346346
// @ts-ignore see "Why @ts-ignore" note
@@ -372,7 +372,7 @@ describe('GCPFunction', () => {
372372
const fakeTransactionContext = {
373373
name: 'event.type',
374374
op: 'function.gcp.event',
375-
origin: 'auto.http.serverless.gpc_event',
375+
origin: 'auto.function.serverless.gcp_event',
376376
metadata: { source: 'component' },
377377
};
378378
// @ts-ignore see "Why @ts-ignore" note
@@ -402,7 +402,7 @@ describe('GCPFunction', () => {
402402
const fakeTransactionContext = {
403403
name: 'event.type',
404404
op: 'function.gcp.event',
405-
origin: 'auto.http.serverless.gpc_event',
405+
origin: 'auto.function.serverless.gcp_event',
406406
metadata: { source: 'component' },
407407
};
408408
// @ts-ignore see "Why @ts-ignore" note
@@ -430,7 +430,7 @@ describe('GCPFunction', () => {
430430
const fakeTransactionContext = {
431431
name: 'event.type',
432432
op: 'function.gcp.event',
433-
origin: 'auto.http.serverless.gpc_event',
433+
origin: 'auto.function.serverless.gcp_event',
434434
metadata: { source: 'component' },
435435
};
436436
// @ts-ignore see "Why @ts-ignore" note
@@ -459,7 +459,7 @@ describe('GCPFunction', () => {
459459
const fakeTransactionContext = {
460460
name: 'event.type',
461461
op: 'function.gcp.event',
462-
origin: 'auto.http.serverless.gpc_event',
462+
origin: 'auto.function.serverless.gcp_event',
463463
metadata: { source: 'component' },
464464
};
465465
// @ts-ignore see "Why @ts-ignore" note
@@ -499,7 +499,7 @@ describe('GCPFunction', () => {
499499
const fakeTransactionContext = {
500500
name: 'event.type',
501501
op: 'function.gcp.cloud_event',
502-
origin: 'auto.http.serverless.gpc_cloud_event',
502+
origin: 'auto.function.serverless.gcp_cloud_event',
503503
metadata: { source: 'component' },
504504
};
505505
// @ts-ignore see "Why @ts-ignore" note
@@ -527,7 +527,7 @@ describe('GCPFunction', () => {
527527
const fakeTransactionContext = {
528528
name: 'event.type',
529529
op: 'function.gcp.cloud_event',
530-
origin: 'auto.http.serverless.gpc_cloud_event',
530+
origin: 'auto.function.serverless.gcp_cloud_event',
531531
metadata: { source: 'component' },
532532
};
533533
// @ts-ignore see "Why @ts-ignore" note
@@ -557,7 +557,7 @@ describe('GCPFunction', () => {
557557
const fakeTransactionContext = {
558558
name: 'event.type',
559559
op: 'function.gcp.cloud_event',
560-
origin: 'auto.http.serverless.gpc_cloud_event',
560+
origin: 'auto.function.serverless.gcp_cloud_event',
561561
metadata: { source: 'component' },
562562
};
563563
// @ts-ignore see "Why @ts-ignore" note
@@ -585,7 +585,7 @@ describe('GCPFunction', () => {
585585
const fakeTransactionContext = {
586586
name: 'event.type',
587587
op: 'function.gcp.cloud_event',
588-
origin: 'auto.http.serverless.gpc_cloud_event',
588+
origin: 'auto.function.serverless.gcp_cloud_event',
589589
metadata: { source: 'component' },
590590
};
591591
// @ts-ignore see "Why @ts-ignore" note
@@ -614,7 +614,7 @@ describe('GCPFunction', () => {
614614
const fakeTransactionContext = {
615615
name: 'event.type',
616616
op: 'function.gcp.cloud_event',
617-
origin: 'auto.http.serverless.gpc_cloud_event',
617+
origin: 'auto.function.serverless.gcp_cloud_event',
618618
metadata: { source: 'component' },
619619
};
620620
// @ts-ignore see "Why @ts-ignore" note

0 commit comments

Comments
 (0)