From 3711b52cf30b3ccd8570b16f8db6fceaaff1efb6 Mon Sep 17 00:00:00 2001 From: Martin Sonnberger Date: Mon, 27 Jul 2026 15:44:12 +0200 Subject: [PATCH 1/3] feat(node)!: Use `function.gcp` span op for Firebase functions --- .../node-firebase/tests/functions.test.ts | 20 +++++++++++++++++-- .../firebase/otel/patches/functions.ts | 3 ++- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/dev-packages/e2e-tests/test-applications/node-firebase/tests/functions.test.ts b/dev-packages/e2e-tests/test-applications/node-firebase/tests/functions.test.ts index 77acc210d0a6..c5b8b7573a03 100644 --- a/dev-packages/e2e-tests/test-applications/node-firebase/tests/functions.test.ts +++ b/dev-packages/e2e-tests/test-applications/node-firebase/tests/functions.test.ts @@ -24,12 +24,12 @@ test.fixme('should only call the function once without any extra calls', async ( 'faas.provider': 'firebase', 'faas.trigger': 'http.request', 'sentry.kind': 'server', - 'sentry.op': 'http.request', + 'sentry.op': 'function.gcp', 'sentry.origin': 'auto.firebase.orchestrion.functions', 'sentry.sample_rate': expect.any(Number), 'sentry.source': 'route', }, - op: 'http.request', + op: 'function.gcp', origin: 'auto.firebase.orchestrion.functions', span_id: expect.any(String), status: 'ok', @@ -101,13 +101,29 @@ test.fixme('should create a document and trigger onDocumentCreated and another w 'faas.provider': 'firebase', 'faas.trigger': 'http.request', 'sentry.kind': 'server', +<<<<<<< HEAD 'sentry.op': 'http.request', 'sentry.origin': 'auto.firebase.orchestrion.functions', +||||||| parent of e1785e3201 (feat(node)!: Use `function.gcp` span op for Firebase functions) + 'sentry.op': 'http.request', + 'sentry.origin': 'auto.firebase.otel.functions', +======= + 'sentry.op': 'function.gcp', + 'sentry.origin': 'auto.firebase.otel.functions', +>>>>>>> e1785e3201 (feat(node)!: Use `function.gcp` span op for Firebase functions) 'sentry.sample_rate': expect.any(Number), 'sentry.source': 'route', }, +<<<<<<< HEAD op: 'http.request', origin: 'auto.firebase.orchestrion.functions', +||||||| parent of e1785e3201 (feat(node)!: Use `function.gcp` span op for Firebase functions) + op: 'http.request', + origin: 'auto.firebase.otel.functions', +======= + op: 'function.gcp', + origin: 'auto.firebase.otel.functions', +>>>>>>> e1785e3201 (feat(node)!: Use `function.gcp` span op for Firebase functions) span_id: expect.any(String), status: 'ok', trace_id: expect.any(String), diff --git a/packages/node/src/integrations/tracing/firebase/otel/patches/functions.ts b/packages/node/src/integrations/tracing/firebase/otel/patches/functions.ts index e54167d43d27..c98bd5e1d80b 100644 --- a/packages/node/src/integrations/tracing/firebase/otel/patches/functions.ts +++ b/packages/node/src/integrations/tracing/firebase/otel/patches/functions.ts @@ -2,6 +2,7 @@ import type { InstrumentationBase } from '@opentelemetry/instrumentation'; import { InstrumentationNodeModuleDefinition, isWrapped } from '@opentelemetry/instrumentation'; import { InstrumentationNodeModuleFile } from '../../../InstrumentationNodeModuleFile'; import { SENTRY_KIND } from '@sentry/conventions/attributes'; +import { FAAS_FUNCTION_GCP_SPAN_OP } from '@sentry/conventions/op'; import type { SpanAttributes } from '@sentry/core'; import { captureException, @@ -87,7 +88,7 @@ export function patchV2Functions { From 83e79459d1c3ba7d70f88d975cbfa45876170be8 Mon Sep 17 00:00:00 2001 From: Martin Sonnberger Date: Tue, 28 Jul 2026 12:08:33 +0200 Subject: [PATCH 2/3] use sentry.op --- .../integrations/tracing/firebase/otel/patches/functions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/node/src/integrations/tracing/firebase/otel/patches/functions.ts b/packages/node/src/integrations/tracing/firebase/otel/patches/functions.ts index c98bd5e1d80b..c06eca1dade0 100644 --- a/packages/node/src/integrations/tracing/firebase/otel/patches/functions.ts +++ b/packages/node/src/integrations/tracing/firebase/otel/patches/functions.ts @@ -1,7 +1,7 @@ import type { InstrumentationBase } from '@opentelemetry/instrumentation'; import { InstrumentationNodeModuleDefinition, isWrapped } from '@opentelemetry/instrumentation'; import { InstrumentationNodeModuleFile } from '../../../InstrumentationNodeModuleFile'; -import { SENTRY_KIND } from '@sentry/conventions/attributes'; +import { SENTRY_KIND, SENTRY_OP } from '@sentry/conventions/attributes'; import { FAAS_FUNCTION_GCP_SPAN_OP } from '@sentry/conventions/op'; import type { SpanAttributes } from '@sentry/core'; import { @@ -69,6 +69,7 @@ export function patchV2Functions { From 2c8a0b1397e8af762766ac037b9c4d8d5356e6f3 Mon Sep 17 00:00:00 2001 From: Martin Sonnberger Date: Tue, 28 Jul 2026 12:18:03 +0200 Subject: [PATCH 3/3] whoops --- .../node-firebase/tests/functions.test.ts | 20 ++----------------- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/dev-packages/e2e-tests/test-applications/node-firebase/tests/functions.test.ts b/dev-packages/e2e-tests/test-applications/node-firebase/tests/functions.test.ts index c5b8b7573a03..60ad8cea5adc 100644 --- a/dev-packages/e2e-tests/test-applications/node-firebase/tests/functions.test.ts +++ b/dev-packages/e2e-tests/test-applications/node-firebase/tests/functions.test.ts @@ -101,29 +101,13 @@ test.fixme('should create a document and trigger onDocumentCreated and another w 'faas.provider': 'firebase', 'faas.trigger': 'http.request', 'sentry.kind': 'server', -<<<<<<< HEAD - 'sentry.op': 'http.request', - 'sentry.origin': 'auto.firebase.orchestrion.functions', -||||||| parent of e1785e3201 (feat(node)!: Use `function.gcp` span op for Firebase functions) - 'sentry.op': 'http.request', - 'sentry.origin': 'auto.firebase.otel.functions', -======= 'sentry.op': 'function.gcp', - 'sentry.origin': 'auto.firebase.otel.functions', ->>>>>>> e1785e3201 (feat(node)!: Use `function.gcp` span op for Firebase functions) + 'sentry.origin': 'auto.firebase.orchestrion.functions', 'sentry.sample_rate': expect.any(Number), 'sentry.source': 'route', }, -<<<<<<< HEAD - op: 'http.request', - origin: 'auto.firebase.orchestrion.functions', -||||||| parent of e1785e3201 (feat(node)!: Use `function.gcp` span op for Firebase functions) - op: 'http.request', - origin: 'auto.firebase.otel.functions', -======= op: 'function.gcp', - origin: 'auto.firebase.otel.functions', ->>>>>>> e1785e3201 (feat(node)!: Use `function.gcp` span op for Firebase functions) + origin: 'auto.firebase.orchestrion.functions', span_id: expect.any(String), status: 'ok', trace_id: expect.any(String),