From eac1aed3a92775a4e004a59416ee39a1d0f613ae Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 21 Oct 2026 11:24:52 +0200 Subject: [PATCH 1/3] ref!: Rename `diagnostic_channel` span origins Drop the suffix from the graphql origin (`auto.graphql`), since there is only one graphql instrumentation path. For redis, mysql2 and mongoose, rename it to `native_channel` to make clear these spans come from the library's own tracing channels rather than orchestrion-injected ones. Co-Authored-By: Claude Opus 5.5 --- .../suites/orchestrion-graphql/test.ts | 2 +- .../test-applications/nuxt-4/tests/db-drivers.test.ts | 2 +- .../test-applications/nuxt-5/tests/db-mongoose.test.ts | 2 +- .../graphql/useOperationNameForRootSpan/test.ts | 2 +- .../suites/tracing/apollo-graphql/resolvers/test.ts | 2 +- .../suites/tracing/apollo-graphql/test.ts | 8 ++++---- .../apollo-graphql/useOperationNameForRootSpan/test.ts | 10 +++++----- .../tracing/graphql-tracing-channel/resolvers/test.ts | 4 ++-- .../suites/tracing/graphql-tracing-channel/test.ts | 6 +++--- .../suites/tracing/ioredis-dc/test.ts | 2 +- .../suites/tracing/mongoose-tracing-channel/test.ts | 10 +++++----- .../suites/tracing/mysql2-tracing-channel/test.ts | 6 +++--- .../suites/tracing/redis-dc/test.ts | 2 +- dev-packages/test-utils/src/bundler-instrumentation.ts | 2 +- .../server-utils/src/integrations/graphql/constants.ts | 2 +- .../integrations/mongoose/mongoose-dc-subscriber.ts | 2 +- .../src/integrations/mysql2/mysql2-dc-subscriber.ts | 2 +- .../src/integrations/redis/redis-dc-subscriber.ts | 2 +- .../integrations/mysql2/mysql2-dc-subscriber.test.ts | 4 ++-- 19 files changed, 36 insertions(+), 36 deletions(-) diff --git a/dev-packages/deno-integration-tests/suites/orchestrion-graphql/test.ts b/dev-packages/deno-integration-tests/suites/orchestrion-graphql/test.ts index 2497b4f6eef9..031022d62aa7 100644 --- a/dev-packages/deno-integration-tests/suites/orchestrion-graphql/test.ts +++ b/dev-packages/deno-integration-tests/suites/orchestrion-graphql/test.ts @@ -44,7 +44,7 @@ async function assertParseSpan(channelName: string): Promise { const parseSpan = parent.spans?.find(s => s.description === 'graphql.parse'); assertExists(parseSpan, `expected a graphql.parse span, got: ${parent.spans?.map(s => s.description).join(', ')}`); assertEquals(parseSpan!.op, 'graphql'); - assertEquals(parseSpan!.data?.['sentry.origin'], 'auto.graphql.diagnostic_channel'); + assertEquals(parseSpan!.data?.['sentry.origin'], 'auto.graphql'); } Deno.test('graphql instrumentation: included in default integrations (Deno 2.8.0+)', () => { diff --git a/dev-packages/e2e-tests/test-applications/nuxt-4/tests/db-drivers.test.ts b/dev-packages/e2e-tests/test-applications/nuxt-4/tests/db-drivers.test.ts index 5b1bccedab4d..38000686a79b 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-4/tests/db-drivers.test.ts +++ b/dev-packages/e2e-tests/test-applications/nuxt-4/tests/db-drivers.test.ts @@ -83,7 +83,7 @@ test('Instruments mongoose automatically', async ({ baseURL }) => { expect(getSpanOp(rootSpan!)).toBe('http.server'); const mongooseSpans = spans.filter( - span => span.attributes['sentry.origin']?.value === 'auto.db.mongoose.diagnostic_channel', + span => span.attributes['sentry.origin']?.value === 'auto.db.mongoose.native_channel', ); expect(mongooseSpans).toHaveLength(2); diff --git a/dev-packages/e2e-tests/test-applications/nuxt-5/tests/db-mongoose.test.ts b/dev-packages/e2e-tests/test-applications/nuxt-5/tests/db-mongoose.test.ts index e48c97ed1af6..5d3ba010670f 100644 --- a/dev-packages/e2e-tests/test-applications/nuxt-5/tests/db-mongoose.test.ts +++ b/dev-packages/e2e-tests/test-applications/nuxt-5/tests/db-mongoose.test.ts @@ -24,7 +24,7 @@ test('Instruments mongoose automatically', async ({ baseURL }) => { const spans = await spansPromise; const mongooseSpans = spans.filter( - span => span.attributes['sentry.origin']?.value === 'auto.db.mongoose.diagnostic_channel', + span => span.attributes['sentry.origin']?.value === 'auto.db.mongoose.native_channel', ); expect(mongooseSpans).toHaveLength(2); diff --git a/dev-packages/node-integration-tests/suites/aws-serverless/graphql/useOperationNameForRootSpan/test.ts b/dev-packages/node-integration-tests/suites/aws-serverless/graphql/useOperationNameForRootSpan/test.ts index 723e6a9e3d95..2682c27f45dc 100644 --- a/dev-packages/node-integration-tests/suites/aws-serverless/graphql/useOperationNameForRootSpan/test.ts +++ b/dev-packages/node-integration-tests/suites/aws-serverless/graphql/useOperationNameForRootSpan/test.ts @@ -29,7 +29,7 @@ describe('graphqlIntegration', () => { type: 'string', }); expect(executeSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql.diagnostic_channel', + value: 'auto.graphql', type: 'string', }); }, diff --git a/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/resolvers/test.ts b/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/resolvers/test.ts index b3603e18873e..6712483a6204 100644 --- a/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/resolvers/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/resolvers/test.ts @@ -24,7 +24,7 @@ describe('GraphQL/Apollo Tests > resolve spans', () => { expect(executeSpan?.attributes['graphql.processing.type']).toEqual({ value: 'execute', type: 'string' }); expect(executeSpan?.attributes['graphql.document']).toEqual({ value: '{hello}', type: 'string' }); expect(executeSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql.diagnostic_channel', + value: 'auto.graphql', type: 'string', }); const parseSpan = children.find(span => span.attributes['graphql.processing.type']?.value === 'parse'); diff --git a/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/test.ts b/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/test.ts index 40193bff052a..e1ef15305008 100644 --- a/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/test.ts @@ -33,7 +33,7 @@ describe('GraphQL/Apollo Tests', () => { expect(executeSpan?.attributes['graphql.operation.type']).toEqual({ value: 'query', type: 'string' }); expect(executeSpan?.attributes['graphql.document']).toEqual({ value: '{hello}', type: 'string' }); expect(executeSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql.diagnostic_channel', + value: 'auto.graphql', type: 'string', }); }, @@ -88,7 +88,7 @@ describe('GraphQL/Apollo Tests', () => { type: 'string', }); expect(mutationSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql.diagnostic_channel', + value: 'auto.graphql', type: 'string', }); }, @@ -134,7 +134,7 @@ describe('GraphQL/Apollo Tests', () => { type: 'string', }); expect(executeSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql.diagnostic_channel', + value: 'auto.graphql', type: 'string', }); }, @@ -193,7 +193,7 @@ describe('GraphQL/Apollo Tests', () => { type: 'string', }); expect(mutationSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql.diagnostic_channel', + value: 'auto.graphql', type: 'string', }); }, diff --git a/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/useOperationNameForRootSpan/test.ts b/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/useOperationNameForRootSpan/test.ts index 9ef795290bae..ff9da4398279 100644 --- a/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/useOperationNameForRootSpan/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/useOperationNameForRootSpan/test.ts @@ -36,7 +36,7 @@ describe('GraphQL/Apollo Tests > useOperationNameForRootSpan', () => { type: 'string', }); expect(getHelloSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql.diagnostic_channel', + value: 'auto.graphql', type: 'string', }); expect(getHelloSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); @@ -85,7 +85,7 @@ describe('GraphQL/Apollo Tests > useOperationNameForRootSpan', () => { type: 'string', }); expect(testMutationSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql.diagnostic_channel', + value: 'auto.graphql', type: 'string', }); expect(testMutationSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); @@ -122,7 +122,7 @@ describe('GraphQL/Apollo Tests > useOperationNameForRootSpan', () => { expect(executeSpan?.attributes['graphql.operation.type']).toEqual({ value: 'query', type: 'string' }); expect(executeSpan?.attributes['graphql.document']).toEqual({ value: 'query {hello}', type: 'string' }); expect(executeSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql.diagnostic_channel', + value: 'auto.graphql', type: 'string', }); expect(executeSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); @@ -165,7 +165,7 @@ describe('GraphQL/Apollo Tests > useOperationNameForRootSpan', () => { type: 'string', }); expect(getHelloSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql.diagnostic_channel', + value: 'auto.graphql', type: 'string', }); expect(getHelloSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); @@ -184,7 +184,7 @@ describe('GraphQL/Apollo Tests > useOperationNameForRootSpan', () => { type: 'string', }); expect(getWorldSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql.diagnostic_channel', + value: 'auto.graphql', type: 'string', }); expect(getWorldSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); diff --git a/dev-packages/node-integration-tests/suites/tracing/graphql-tracing-channel/resolvers/test.ts b/dev-packages/node-integration-tests/suites/tracing/graphql-tracing-channel/resolvers/test.ts index 430b0ebfda3a..722eb183df34 100644 --- a/dev-packages/node-integration-tests/suites/tracing/graphql-tracing-channel/resolvers/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/graphql-tracing-channel/resolvers/test.ts @@ -51,7 +51,7 @@ describe.runIf(supports({ min: 22 }))('GraphQL tracing channel Test > resolve sp expect(helloResolverSpan?.name).toBe('GraphQL resolve'); expect(helloResolverSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); expect(helloResolverSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql.diagnostic_channel', + value: 'auto.graphql', type: 'string', }); expect(helloResolverSpan?.attributes['graphql.field.name']).toEqual({ value: 'hello', type: 'string' }); @@ -65,7 +65,7 @@ describe.runIf(supports({ min: 22 }))('GraphQL tracing channel Test > resolve sp expect(userResolverSpan?.name).toBe('GraphQL resolve'); expect(userResolverSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); expect(userResolverSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql.diagnostic_channel', + value: 'auto.graphql', type: 'string', }); expect(userResolverSpan?.attributes['graphql.field.name']).toEqual({ value: 'user', type: 'string' }); diff --git a/dev-packages/node-integration-tests/suites/tracing/graphql-tracing-channel/test.ts b/dev-packages/node-integration-tests/suites/tracing/graphql-tracing-channel/test.ts index c41add10805e..5bc9bac4e74c 100644 --- a/dev-packages/node-integration-tests/suites/tracing/graphql-tracing-channel/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/graphql-tracing-channel/test.ts @@ -41,7 +41,7 @@ describe.runIf(supports({ min: 22 }))('GraphQL tracing channel Test', () => { expect(executeSpan?.name).toBe('GraphQL query'); expect(executeSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); expect(executeSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql.diagnostic_channel', + value: 'auto.graphql', type: 'string', }); expect(executeSpan?.attributes['graphql.operation.type']).toEqual({ value: 'query', type: 'string' }); @@ -54,7 +54,7 @@ describe.runIf(supports({ min: 22 }))('GraphQL tracing channel Test', () => { expect(getUserSpan?.name).toBe('GraphQL query'); expect(getUserSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); expect(getUserSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql.diagnostic_channel', + value: 'auto.graphql', type: 'string', }); expect(getUserSpan?.attributes['graphql.operation.type']).toEqual({ value: 'query', type: 'string' }); @@ -71,7 +71,7 @@ describe.runIf(supports({ min: 22 }))('GraphQL tracing channel Test', () => { expect(loginSpan?.name).toBe('GraphQL mutation'); expect(loginSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); expect(loginSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql.diagnostic_channel', + value: 'auto.graphql', type: 'string', }); expect(loginSpan?.attributes['graphql.operation.name']).toEqual({ value: 'Login', type: 'string' }); diff --git a/dev-packages/node-integration-tests/suites/tracing/ioredis-dc/test.ts b/dev-packages/node-integration-tests/suites/tracing/ioredis-dc/test.ts index 71db70a5425a..fe1cc5bb7b09 100644 --- a/dev-packages/node-integration-tests/suites/tracing/ioredis-dc/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/ioredis-dc/test.ts @@ -34,7 +34,7 @@ describeWithDockerCompose( cleanupChildProcesses(); }); - const ORIGIN = 'auto.db.redis.diagnostic_channel'; + const ORIGIN = 'auto.db.redis.native_channel'; const SEGMENT_NAME = 'Test Span IORedis DC'; const HOST = '127.0.0.1'; const PORT = 6382; diff --git a/dev-packages/node-integration-tests/suites/tracing/mongoose-tracing-channel/test.ts b/dev-packages/node-integration-tests/suites/tracing/mongoose-tracing-channel/test.ts index 5795d880503b..56efaad69243 100644 --- a/dev-packages/node-integration-tests/suites/tracing/mongoose-tracing-channel/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/mongoose-tracing-channel/test.ts @@ -48,7 +48,7 @@ describe('Mongoose tracing channel Test', () => { [DB_OPERATION_NAME]: { type: 'string', value: operation }, [DB_SYSTEM_NAME]: { type: 'string', value: 'mongodb' }, [SENTRY_OP]: { type: 'string', value: DB }, - [SENTRY_ORIGIN]: { type: 'string', value: 'auto.db.mongoose.diagnostic_channel' }, + [SENTRY_ORIGIN]: { type: 'string', value: 'auto.db.mongoose.native_channel' }, [SENTRY_TRACE_LIFECYCLE]: { type: 'string', value: 'stream' }, [SERVER_ADDRESS]: { type: 'string', value: expect.any(String) }, [SERVER_PORT]: { type: 'integer', value: expect.any(Number) }, @@ -98,7 +98,7 @@ describe('Mongoose tracing channel Test', () => { expect(spans.find(span => span.attributes[SENTRY_ORIGIN]?.value === 'auto.db.mongoose')).toBeUndefined(); // ...while the diagnostics-channel path is active. expect( - spans.find(span => span.attributes[SENTRY_ORIGIN]?.value === 'auto.db.mongoose.diagnostic_channel'), + spans.find(span => span.attributes[SENTRY_ORIGIN]?.value === 'auto.db.mongoose.native_channel'), ).toBeDefined(); }, }) @@ -131,7 +131,7 @@ describe('Mongoose tracing channel Test', () => { const mongooseSave = spans.find( span => span.name === 'save blogposts' && - span.attributes[SENTRY_ORIGIN]?.value === 'auto.db.mongoose.diagnostic_channel', + span.attributes[SENTRY_ORIGIN]?.value === 'auto.db.mongoose.native_channel', ); expect(mongooseSave).toBeDefined(); // the underlying mongodb driver span must parent to the mongoose channel span, @@ -157,7 +157,7 @@ describe('Mongoose tracing channel Test', () => { const cursorFind = spans.find( span => span.name === 'find blogposts' && - span.attributes[SENTRY_ORIGIN]?.value === 'auto.db.mongoose.diagnostic_channel', + span.attributes[SENTRY_ORIGIN]?.value === 'auto.db.mongoose.native_channel', ); expect(cursorFind).toBeDefined(); expect(cursorFind?.attributes[DB_QUERY_TEXT]).toBeUndefined(); @@ -184,7 +184,7 @@ describe('Mongoose tracing channel Test', () => { const aggregateSpan = container.items.find( item => item.name === 'aggregate blogposts' && - item.attributes[SENTRY_ORIGIN]?.value === 'auto.db.mongoose.diagnostic_channel', + item.attributes[SENTRY_ORIGIN]?.value === 'auto.db.mongoose.native_channel', ); expect(aggregateSpan).toBeDefined(); expect(aggregateSpan?.status).toBe('error'); diff --git a/dev-packages/node-integration-tests/suites/tracing/mysql2-tracing-channel/test.ts b/dev-packages/node-integration-tests/suites/tracing/mysql2-tracing-channel/test.ts index 6e67cc51482d..cffe56665a4c 100644 --- a/dev-packages/node-integration-tests/suites/tracing/mysql2-tracing-channel/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/mysql2-tracing-channel/test.ts @@ -24,7 +24,7 @@ describe('mysql2 tracing channel Test', () => { const expectedQuerySpan = (queryText: string) => expect.objectContaining({ attributes: expect.objectContaining({ - [SENTRY_ORIGIN]: { type: 'string', value: 'auto.db.mysql2.diagnostic_channel' }, + [SENTRY_ORIGIN]: { type: 'string', value: 'auto.db.mysql2.native_channel' }, [DB_SYSTEM_NAME]: { type: 'string', value: 'mysql' }, [DB_OPERATION_NAME]: { type: 'string', value: 'SELECT' }, [DB_QUERY_TEXT]: { type: 'string', value: queryText }, @@ -47,7 +47,7 @@ describe('mysql2 tracing channel Test', () => { expect.objectContaining({ attributes: expect.objectContaining({ [SENTRY_OP]: { type: 'string', value: DB }, - [SENTRY_ORIGIN]: { type: 'string', value: 'auto.db.mysql2.diagnostic_channel' }, + [SENTRY_ORIGIN]: { type: 'string', value: 'auto.db.mysql2.native_channel' }, [DB_QUERY_TEXT]: { type: 'string', value: 'SELECT * FROM does_not_exist' }, }), name: 'SELECT does_not_exist', @@ -72,7 +72,7 @@ describe('mysql2 tracing channel Test', () => { expect(spans.find(span => span.attributes[SENTRY_ORIGIN]?.value === 'auto.db.mysql2')).toBeUndefined(); // ...while the diagnostics-channel path is active. expect( - spans.find(span => span.attributes[SENTRY_ORIGIN]?.value === 'auto.db.mysql2.diagnostic_channel'), + spans.find(span => span.attributes[SENTRY_ORIGIN]?.value === 'auto.db.mysql2.native_channel'), ).toBeDefined(); }, }) diff --git a/dev-packages/node-integration-tests/suites/tracing/redis-dc/test.ts b/dev-packages/node-integration-tests/suites/tracing/redis-dc/test.ts index a5bf7450724d..a9f10789dc48 100644 --- a/dev-packages/node-integration-tests/suites/tracing/redis-dc/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/redis-dc/test.ts @@ -66,7 +66,7 @@ describeWithDockerCompose( }); }); - const ORIGIN = 'auto.db.redis.diagnostic_channel'; + const ORIGIN = 'auto.db.redis.native_channel'; const SEGMENT_NAME = 'Test Span Redis 5 DC'; const HOST = '127.0.0.1'; const PORT = 6381; diff --git a/dev-packages/test-utils/src/bundler-instrumentation.ts b/dev-packages/test-utils/src/bundler-instrumentation.ts index 3e14a4084f74..294d2e28e14c 100644 --- a/dev-packages/test-utils/src/bundler-instrumentation.ts +++ b/dev-packages/test-utils/src/bundler-instrumentation.ts @@ -37,7 +37,7 @@ export interface InstrumentationFixture { const FIXTURES: Record = { graphql: { moduleName: 'graphql', - origin: 'auto.graphql.diagnostic_channel', + origin: 'auto.graphql', sourceMarker: 'GraphQLSchema', assertResult: result => (result as { data?: { hello?: string } })?.data?.hello === 'world', }, diff --git a/packages/server-utils/src/integrations/graphql/constants.ts b/packages/server-utils/src/integrations/graphql/constants.ts index 38c292ef7a9b..145fb730ae36 100644 --- a/packages/server-utils/src/integrations/graphql/constants.ts +++ b/packages/server-utils/src/integrations/graphql/constants.ts @@ -1,7 +1,7 @@ // Shared by both graphql paths (orchestrion for v14–16, diagnostics channels for >= 17) so they emit // identical spans. -export const ORIGIN = 'auto.graphql.diagnostic_channel'; +export const ORIGIN = 'auto.graphql'; export const SPAN_NAME_PARSE = 'graphql.parse'; export const SPAN_NAME_VALIDATE = 'graphql.validate'; diff --git a/packages/server-utils/src/integrations/mongoose/mongoose-dc-subscriber.ts b/packages/server-utils/src/integrations/mongoose/mongoose-dc-subscriber.ts index 9739ba070096..e7e9e3c44c71 100644 --- a/packages/server-utils/src/integrations/mongoose/mongoose-dc-subscriber.ts +++ b/packages/server-utils/src/integrations/mongoose/mongoose-dc-subscriber.ts @@ -27,7 +27,7 @@ export const MONGOOSE_DC_CHANNEL_MODEL_INSERT_MANY = 'mongoose:model:insertMany' export const MONGOOSE_DC_CHANNEL_MODEL_BULK_WRITE = 'mongoose:model:bulkWrite'; export const MONGOOSE_DC_CHANNEL_CURSOR_NEXT = 'mongoose:cursor:next'; -const ORIGIN = 'auto.db.mongoose.diagnostic_channel'; +const ORIGIN = 'auto.db.mongoose.native_channel'; const DB_SYSTEM_NAME_VALUE_MONGODB = 'mongodb'; // Cap recursion so a self-referential or pathologically deep query can never diff --git a/packages/server-utils/src/integrations/mysql2/mysql2-dc-subscriber.ts b/packages/server-utils/src/integrations/mysql2/mysql2-dc-subscriber.ts index 6ba7d1699d01..72d065956713 100644 --- a/packages/server-utils/src/integrations/mysql2/mysql2-dc-subscriber.ts +++ b/packages/server-utils/src/integrations/mysql2/mysql2-dc-subscriber.ts @@ -23,7 +23,7 @@ export const MYSQL2_DC_CHANNEL_EXECUTE = 'mysql2:execute'; export const MYSQL2_DC_CHANNEL_CONNECT = 'mysql2:connect'; export const MYSQL2_DC_CHANNEL_POOL_CONNECT = 'mysql2:pool:connect'; -const ORIGIN = 'auto.db.mysql2.diagnostic_channel'; +const ORIGIN = 'auto.db.mysql2.native_channel'; const DB_SYSTEM_NAME_VALUE_MYSQL = 'mysql'; // Leading keyword of a SQL statement (SELECT, INSERT, …) → `db.operation.name`. diff --git a/packages/server-utils/src/integrations/redis/redis-dc-subscriber.ts b/packages/server-utils/src/integrations/redis/redis-dc-subscriber.ts index de092c109bd7..5db9dc2e5458 100644 --- a/packages/server-utils/src/integrations/redis/redis-dc-subscriber.ts +++ b/packages/server-utils/src/integrations/redis/redis-dc-subscriber.ts @@ -27,7 +27,7 @@ export const REDIS_DC_CHANNEL_CONNECT = 'node-redis:connect'; export const IOREDIS_DC_CHANNEL_COMMAND = 'ioredis:command'; export const IOREDIS_DC_CHANNEL_CONNECT = 'ioredis:connect'; -const ORIGIN = 'auto.db.redis.diagnostic_channel'; +const ORIGIN = 'auto.db.redis.native_channel'; const DB_SYSTEM_NAME_VALUE_REDIS = 'redis'; /** diff --git a/packages/server-utils/test/integrations/mysql2/mysql2-dc-subscriber.test.ts b/packages/server-utils/test/integrations/mysql2/mysql2-dc-subscriber.test.ts index 4f03a86e835d..f414f8ee1bf0 100644 --- a/packages/server-utils/test/integrations/mysql2/mysql2-dc-subscriber.test.ts +++ b/packages/server-utils/test/integrations/mysql2/mysql2-dc-subscriber.test.ts @@ -199,7 +199,7 @@ describe('subscribeMysql2DiagnosticChannels', () => { const json = spanToJSON(span!); expect(json.name).toBe('SELECT solution FROM maths'); expect(json.attributes['sentry.op']).toBe('db'); - expect(json.attributes['sentry.origin']).toBe('auto.db.mysql2.diagnostic_channel'); + expect(json.attributes['sentry.origin']).toBe('auto.db.mysql2.native_channel'); expect(json.attributes['db.system.name']).toBe('mysql'); expect(json.attributes['db.operation.name']).toBe('SELECT'); // reported regardless of trace lifecycle, even though only span streaming names the span after it @@ -358,7 +358,7 @@ describe('subscribeMysql2DiagnosticChannels', () => { const json = spanToJSON(span!); expect(json.name).toBe('mysql2.connect'); expect(json.attributes['sentry.op']).toBe('db'); - expect(json.attributes['sentry.origin']).toBe('auto.db.mysql2.diagnostic_channel'); + expect(json.attributes['sentry.origin']).toBe('auto.db.mysql2.native_channel'); expect(json.attributes['db.system.name']).toBe('mysql'); expect(json.attributes['db.namespace']).toBe('test'); expect(json.attributes['server.address']).toBe('127.0.0.1'); From 4020369702b7cff4d7d02a0674f02b84e09f513d Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 21 Oct 2026 11:33:10 +0200 Subject: [PATCH 2/3] ref!: Align fetch and gRPC span origins - auto.http.wintercg_fetch -> auto.http.fetch, matching the Bun, Deno and Cloudflare fetch integrations. - auto.grpc.serverless -> auto.grpc.google_cloud, naming the integration. Co-Authored-By: Claude Opus 5.5 --- .../nextjs-pages-dir/tests/middleware.test.ts | 2 +- packages/core/test/lib/integrations/fetch.test.ts | 4 ++-- .../src/integrations/google-cloud-grpc.ts | 2 +- .../test/integrations/google-cloud-grpc.test.ts | 2 +- packages/vercel-edge/src/integrations/wintercg-fetch.ts | 2 +- packages/vercel-edge/test/wintercg-fetch.test.ts | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/dev-packages/e2e-tests/test-applications/nextjs-pages-dir/tests/middleware.test.ts b/dev-packages/e2e-tests/test-applications/nextjs-pages-dir/tests/middleware.test.ts index 3d0d3a2fad06..1fe66e615032 100644 --- a/dev-packages/e2e-tests/test-applications/nextjs-pages-dir/tests/middleware.test.ts +++ b/dev-packages/e2e-tests/test-applications/nextjs-pages-dir/tests/middleware.test.ts @@ -77,6 +77,6 @@ test('Should trace outgoing fetch requests inside middleware', async ({ request 'server.address': { value: 'localhost', type: 'string' }, 'server.port': { value: 3030, type: 'integer' }, 'sentry.op': { value: 'http.client', type: 'string' }, - 'sentry.origin': { value: 'auto.http.wintercg_fetch', type: 'string' }, + 'sentry.origin': { value: 'auto.http.fetch', type: 'string' }, }); }); diff --git a/packages/core/test/lib/integrations/fetch.test.ts b/packages/core/test/lib/integrations/fetch.test.ts index 4c332b479fa0..0cdd7bf223e4 100644 --- a/packages/core/test/lib/integrations/fetch.test.ts +++ b/packages/core/test/lib/integrations/fetch.test.ts @@ -83,7 +83,7 @@ describe('createFetchIntegration', () => { it('uses the span origin it was created with', () => { const winterCGFetchIntegration = createFetchIntegration({ name: 'WinterCGFetch', - spanOrigin: 'auto.http.wintercg_fetch', + spanOrigin: 'auto.http.fetch', }); const handler = setupIntegration(winterCGFetchIntegration(), client); @@ -94,7 +94,7 @@ describe('createFetchIntegration', () => { expect.any(Function), expect.any(Function), expect.any(Object), - expect.objectContaining({ spanOrigin: 'auto.http.wintercg_fetch' }), + expect.objectContaining({ spanOrigin: 'auto.http.fetch' }), ); }); diff --git a/packages/google-cloud-serverless/src/integrations/google-cloud-grpc.ts b/packages/google-cloud-serverless/src/integrations/google-cloud-grpc.ts index e0cb9816f13f..d0cddf656a2e 100644 --- a/packages/google-cloud-serverless/src/integrations/google-cloud-grpc.ts +++ b/packages/google-cloud-serverless/src/integrations/google-cloud-grpc.ts @@ -106,7 +106,7 @@ export function fillGrpcFunction(stub: Stub, serviceIdentifier: string, methodNa onlyIfParent: true, attributes: { [SENTRY_OP]: GRPC, - [SENTRY_ORIGIN]: 'auto.grpc.serverless', + [SENTRY_ORIGIN]: 'auto.grpc.google_cloud', [RPC_SYSTEM_NAME]: 'grpc', [RPC_SERVICE]: serviceIdentifier, [RPC_METHOD]: methodName, diff --git a/packages/google-cloud-serverless/test/integrations/google-cloud-grpc.test.ts b/packages/google-cloud-serverless/test/integrations/google-cloud-grpc.test.ts index 9d9aa0dcedf7..93d3a5f8c331 100644 --- a/packages/google-cloud-serverless/test/integrations/google-cloud-grpc.test.ts +++ b/packages/google-cloud-serverless/test/integrations/google-cloud-grpc.test.ts @@ -145,7 +145,7 @@ describe('GoogleCloudGrpc tracing', () => { onlyIfParent: true, attributes: { [SENTRY_OP]: 'grpc', - [SENTRY_ORIGIN]: 'auto.grpc.serverless', + [SENTRY_ORIGIN]: 'auto.grpc.google_cloud', 'rpc.system.name': 'grpc', 'rpc.service': 'test-service', 'rpc.method': 'unaryMethod', diff --git a/packages/vercel-edge/src/integrations/wintercg-fetch.ts b/packages/vercel-edge/src/integrations/wintercg-fetch.ts index 1922782e193b..881b521979eb 100644 --- a/packages/vercel-edge/src/integrations/wintercg-fetch.ts +++ b/packages/vercel-edge/src/integrations/wintercg-fetch.ts @@ -5,5 +5,5 @@ import { createFetchIntegration } from '@sentry/core'; */ export const winterCGFetchIntegration = createFetchIntegration({ name: 'WinterCGFetch', - spanOrigin: 'auto.http.wintercg_fetch', + spanOrigin: 'auto.http.fetch', }); diff --git a/packages/vercel-edge/test/wintercg-fetch.test.ts b/packages/vercel-edge/test/wintercg-fetch.test.ts index 85c24eb11683..12ac8567ed73 100644 --- a/packages/vercel-edge/test/wintercg-fetch.test.ts +++ b/packages/vercel-edge/test/wintercg-fetch.test.ts @@ -17,7 +17,7 @@ describe('winterCGFetchIntegration', () => { expect(getDefaultIntegrations().map(integration => integration.name)).toContain('WinterCGFetch'); }); - it('creates `http.client` spans with the `auto.http.wintercg_fetch` origin', async () => { + it('creates `http.client` spans with the `auto.http.fetch` origin', async () => { vi.stubGlobal('fetch', () => Promise.resolve(new Response('ok'))); const transactions: TransactionEvent[] = []; @@ -44,6 +44,6 @@ describe('winterCGFetchIntegration', () => { const clientSpan = parent?.spans?.find(span => span.op === 'http.client'); expect(clientSpan).toBeDefined(); - expect(clientSpan?.origin).toBe('auto.http.wintercg_fetch'); + expect(clientSpan?.origin).toBe('auto.http.fetch'); }); }); From c4ac3a7712f89a0639d5de9472d1906296150134 Mon Sep 17 00:00:00 2001 From: Francesco Novy Date: Wed, 21 Oct 2026 11:39:13 +0200 Subject: [PATCH 3/3] ref!: Use `auto.graphql.graphql` as graphql span origin Keep the integration name in the origin, like every other integration (`auto..`). Co-Authored-By: Claude Opus 5.5 --- .../suites/orchestrion-graphql/test.ts | 2 +- .../graphql/useOperationNameForRootSpan/test.ts | 2 +- .../suites/tracing/apollo-graphql/resolvers/test.ts | 2 +- .../suites/tracing/apollo-graphql/test.ts | 8 ++++---- .../apollo-graphql/useOperationNameForRootSpan/test.ts | 10 +++++----- .../tracing/graphql-tracing-channel/resolvers/test.ts | 4 ++-- .../suites/tracing/graphql-tracing-channel/test.ts | 6 +++--- dev-packages/test-utils/src/bundler-instrumentation.ts | 2 +- .../server-utils/src/integrations/graphql/constants.ts | 2 +- 9 files changed, 19 insertions(+), 19 deletions(-) diff --git a/dev-packages/deno-integration-tests/suites/orchestrion-graphql/test.ts b/dev-packages/deno-integration-tests/suites/orchestrion-graphql/test.ts index 031022d62aa7..e4f0af5eb2e5 100644 --- a/dev-packages/deno-integration-tests/suites/orchestrion-graphql/test.ts +++ b/dev-packages/deno-integration-tests/suites/orchestrion-graphql/test.ts @@ -44,7 +44,7 @@ async function assertParseSpan(channelName: string): Promise { const parseSpan = parent.spans?.find(s => s.description === 'graphql.parse'); assertExists(parseSpan, `expected a graphql.parse span, got: ${parent.spans?.map(s => s.description).join(', ')}`); assertEquals(parseSpan!.op, 'graphql'); - assertEquals(parseSpan!.data?.['sentry.origin'], 'auto.graphql'); + assertEquals(parseSpan!.data?.['sentry.origin'], 'auto.graphql.graphql'); } Deno.test('graphql instrumentation: included in default integrations (Deno 2.8.0+)', () => { diff --git a/dev-packages/node-integration-tests/suites/aws-serverless/graphql/useOperationNameForRootSpan/test.ts b/dev-packages/node-integration-tests/suites/aws-serverless/graphql/useOperationNameForRootSpan/test.ts index 2682c27f45dc..102fe9342712 100644 --- a/dev-packages/node-integration-tests/suites/aws-serverless/graphql/useOperationNameForRootSpan/test.ts +++ b/dev-packages/node-integration-tests/suites/aws-serverless/graphql/useOperationNameForRootSpan/test.ts @@ -29,7 +29,7 @@ describe('graphqlIntegration', () => { type: 'string', }); expect(executeSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql', + value: 'auto.graphql.graphql', type: 'string', }); }, diff --git a/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/resolvers/test.ts b/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/resolvers/test.ts index 6712483a6204..81e907a26dd2 100644 --- a/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/resolvers/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/resolvers/test.ts @@ -24,7 +24,7 @@ describe('GraphQL/Apollo Tests > resolve spans', () => { expect(executeSpan?.attributes['graphql.processing.type']).toEqual({ value: 'execute', type: 'string' }); expect(executeSpan?.attributes['graphql.document']).toEqual({ value: '{hello}', type: 'string' }); expect(executeSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql', + value: 'auto.graphql.graphql', type: 'string', }); const parseSpan = children.find(span => span.attributes['graphql.processing.type']?.value === 'parse'); diff --git a/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/test.ts b/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/test.ts index e1ef15305008..d3b3775c3b52 100644 --- a/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/test.ts @@ -33,7 +33,7 @@ describe('GraphQL/Apollo Tests', () => { expect(executeSpan?.attributes['graphql.operation.type']).toEqual({ value: 'query', type: 'string' }); expect(executeSpan?.attributes['graphql.document']).toEqual({ value: '{hello}', type: 'string' }); expect(executeSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql', + value: 'auto.graphql.graphql', type: 'string', }); }, @@ -88,7 +88,7 @@ describe('GraphQL/Apollo Tests', () => { type: 'string', }); expect(mutationSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql', + value: 'auto.graphql.graphql', type: 'string', }); }, @@ -134,7 +134,7 @@ describe('GraphQL/Apollo Tests', () => { type: 'string', }); expect(executeSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql', + value: 'auto.graphql.graphql', type: 'string', }); }, @@ -193,7 +193,7 @@ describe('GraphQL/Apollo Tests', () => { type: 'string', }); expect(mutationSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql', + value: 'auto.graphql.graphql', type: 'string', }); }, diff --git a/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/useOperationNameForRootSpan/test.ts b/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/useOperationNameForRootSpan/test.ts index ff9da4398279..46a14b5b8f2b 100644 --- a/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/useOperationNameForRootSpan/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/apollo-graphql/useOperationNameForRootSpan/test.ts @@ -36,7 +36,7 @@ describe('GraphQL/Apollo Tests > useOperationNameForRootSpan', () => { type: 'string', }); expect(getHelloSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql', + value: 'auto.graphql.graphql', type: 'string', }); expect(getHelloSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); @@ -85,7 +85,7 @@ describe('GraphQL/Apollo Tests > useOperationNameForRootSpan', () => { type: 'string', }); expect(testMutationSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql', + value: 'auto.graphql.graphql', type: 'string', }); expect(testMutationSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); @@ -122,7 +122,7 @@ describe('GraphQL/Apollo Tests > useOperationNameForRootSpan', () => { expect(executeSpan?.attributes['graphql.operation.type']).toEqual({ value: 'query', type: 'string' }); expect(executeSpan?.attributes['graphql.document']).toEqual({ value: 'query {hello}', type: 'string' }); expect(executeSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql', + value: 'auto.graphql.graphql', type: 'string', }); expect(executeSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); @@ -165,7 +165,7 @@ describe('GraphQL/Apollo Tests > useOperationNameForRootSpan', () => { type: 'string', }); expect(getHelloSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql', + value: 'auto.graphql.graphql', type: 'string', }); expect(getHelloSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); @@ -184,7 +184,7 @@ describe('GraphQL/Apollo Tests > useOperationNameForRootSpan', () => { type: 'string', }); expect(getWorldSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql', + value: 'auto.graphql.graphql', type: 'string', }); expect(getWorldSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); diff --git a/dev-packages/node-integration-tests/suites/tracing/graphql-tracing-channel/resolvers/test.ts b/dev-packages/node-integration-tests/suites/tracing/graphql-tracing-channel/resolvers/test.ts index 722eb183df34..445579549e48 100644 --- a/dev-packages/node-integration-tests/suites/tracing/graphql-tracing-channel/resolvers/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/graphql-tracing-channel/resolvers/test.ts @@ -51,7 +51,7 @@ describe.runIf(supports({ min: 22 }))('GraphQL tracing channel Test > resolve sp expect(helloResolverSpan?.name).toBe('GraphQL resolve'); expect(helloResolverSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); expect(helloResolverSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql', + value: 'auto.graphql.graphql', type: 'string', }); expect(helloResolverSpan?.attributes['graphql.field.name']).toEqual({ value: 'hello', type: 'string' }); @@ -65,7 +65,7 @@ describe.runIf(supports({ min: 22 }))('GraphQL tracing channel Test > resolve sp expect(userResolverSpan?.name).toBe('GraphQL resolve'); expect(userResolverSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); expect(userResolverSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql', + value: 'auto.graphql.graphql', type: 'string', }); expect(userResolverSpan?.attributes['graphql.field.name']).toEqual({ value: 'user', type: 'string' }); diff --git a/dev-packages/node-integration-tests/suites/tracing/graphql-tracing-channel/test.ts b/dev-packages/node-integration-tests/suites/tracing/graphql-tracing-channel/test.ts index 5bc9bac4e74c..067217ae619e 100644 --- a/dev-packages/node-integration-tests/suites/tracing/graphql-tracing-channel/test.ts +++ b/dev-packages/node-integration-tests/suites/tracing/graphql-tracing-channel/test.ts @@ -41,7 +41,7 @@ describe.runIf(supports({ min: 22 }))('GraphQL tracing channel Test', () => { expect(executeSpan?.name).toBe('GraphQL query'); expect(executeSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); expect(executeSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql', + value: 'auto.graphql.graphql', type: 'string', }); expect(executeSpan?.attributes['graphql.operation.type']).toEqual({ value: 'query', type: 'string' }); @@ -54,7 +54,7 @@ describe.runIf(supports({ min: 22 }))('GraphQL tracing channel Test', () => { expect(getUserSpan?.name).toBe('GraphQL query'); expect(getUserSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); expect(getUserSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql', + value: 'auto.graphql.graphql', type: 'string', }); expect(getUserSpan?.attributes['graphql.operation.type']).toEqual({ value: 'query', type: 'string' }); @@ -71,7 +71,7 @@ describe.runIf(supports({ min: 22 }))('GraphQL tracing channel Test', () => { expect(loginSpan?.name).toBe('GraphQL mutation'); expect(loginSpan?.attributes['sentry.op']).toEqual({ value: 'graphql', type: 'string' }); expect(loginSpan?.attributes['sentry.origin']).toEqual({ - value: 'auto.graphql', + value: 'auto.graphql.graphql', type: 'string', }); expect(loginSpan?.attributes['graphql.operation.name']).toEqual({ value: 'Login', type: 'string' }); diff --git a/dev-packages/test-utils/src/bundler-instrumentation.ts b/dev-packages/test-utils/src/bundler-instrumentation.ts index 294d2e28e14c..6cafc6fd8e5f 100644 --- a/dev-packages/test-utils/src/bundler-instrumentation.ts +++ b/dev-packages/test-utils/src/bundler-instrumentation.ts @@ -37,7 +37,7 @@ export interface InstrumentationFixture { const FIXTURES: Record = { graphql: { moduleName: 'graphql', - origin: 'auto.graphql', + origin: 'auto.graphql.graphql', sourceMarker: 'GraphQLSchema', assertResult: result => (result as { data?: { hello?: string } })?.data?.hello === 'world', }, diff --git a/packages/server-utils/src/integrations/graphql/constants.ts b/packages/server-utils/src/integrations/graphql/constants.ts index 145fb730ae36..7a6f556d0c6d 100644 --- a/packages/server-utils/src/integrations/graphql/constants.ts +++ b/packages/server-utils/src/integrations/graphql/constants.ts @@ -1,7 +1,7 @@ // Shared by both graphql paths (orchestrion for v14–16, diagnostics channels for >= 17) so they emit // identical spans. -export const ORIGIN = 'auto.graphql'; +export const ORIGIN = 'auto.graphql.graphql'; export const SPAN_NAME_PARSE = 'graphql.parse'; export const SPAN_NAME_VALIDATE = 'graphql.validate';