Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const client = new DenoClient({
stackParser: createStackParser(nodeStackLineParser()),
beforeSendTransaction(event) {
const spans = event.spans ?? [];
if (spans.some(s => s.op === 'db' && s.data?.['sentry.origin'] === 'auto.db.orchestrion.mysql')) {
if (spans.some(s => s.op === 'db' && s.data?.['sentry.origin'] === 'auto.db.mysql')) {
nested = true;
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,5 @@ Deno.test('amqplib instrumentation: orchestrion:amqplib:publish channel produces
assertEquals(publishSpan!.description, 'publish my-exchange');
assertEquals(publishSpan!.data?.['messaging.destination.name'], 'my-exchange');
assertEquals(publishSpan!.data?.['messaging.system'], 'rabbitmq');
assertEquals(publishSpan!.data?.['sentry.origin'], 'auto.amqplib.orchestrion.publisher');
assertEquals(publishSpan!.data?.['sentry.origin'], 'auto.amqplib.publisher');
});
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ Deno.test('anthropic instrumentation: orchestrion @anthropic-ai/sdk:chat channel
assertEquals(aiSpan!.data?.['gen_ai.request.model'], 'claude-3-5-sonnet-latest');
assertEquals(aiSpan!.data?.['gen_ai.response.model'], 'claude-3-5-sonnet-20241022');
assertEquals(aiSpan!.data?.['gen_ai.usage.total_tokens'], 15);
assertEquals(aiSpan!.data?.['sentry.origin'], 'auto.ai.orchestrion.anthropic');
assertEquals(aiSpan!.data?.['sentry.origin'], 'auto.ai.anthropic');
});
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,5 @@ Deno.test('aws-sdk instrumentation: orchestrion @smithy/smithy-client:send chann
assertEquals(awsSpan!.data?.['rpc.service'], 'CloudWatch');
assertEquals(awsSpan!.data?.['rpc.method'], 'DescribeAlarms');
assertEquals(awsSpan!.data?.['cloud.region'], 'us-east-1');
assertEquals(awsSpan!.data?.['sentry.origin'], 'auto.aws.orchestrion.aws_sdk');
assertEquals(awsSpan!.data?.['sentry.origin'], 'auto.aws.aws_sdk');
});
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ Deno.test('firebase instrumentation: orchestrion @firebase/firestore:add-doc cha
assertEquals(fsSpan!.data?.['db.namespace'], '[DEFAULT]');
assertEquals(fsSpan!.data?.['db.system.name'], 'firebase.firestore');
assertEquals(fsSpan!.data?.['firebase.firestore.options.projectId'], 'demo-project');
assertEquals(fsSpan!.data?.['sentry.origin'], 'auto.firebase.orchestrion.firestore');
assertEquals(fsSpan!.data?.['sentry.origin'], 'auto.firebase.firestore');
});
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ Deno.test('generic-pool instrumentation: orchestrion:generic-pool:acquire channe
poolSpan,
`expected a generic-pool.acquire span, got descriptions: ${parent.spans?.map(s => s.description).join(', ')}`,
);
assertEquals(poolSpan!.data?.['sentry.origin'], 'auto.db.orchestrion.generic_pool');
assertEquals(poolSpan!.data?.['sentry.origin'], 'auto.db.generic_pool');
});
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,5 @@ Deno.test('google-genai instrumentation: orchestrion @google/genai:generate-cont
assertEquals(aiSpan!.data?.['gen_ai.request.model'], 'gemini-1.5-flash');
assertEquals(aiSpan!.data?.['gen_ai.response.model'], 'gemini-1.5-flash-002');
assertEquals(aiSpan!.data?.['gen_ai.usage.total_tokens'], 15);
assertEquals(aiSpan!.data?.['sentry.origin'], 'auto.ai.orchestrion.google_genai');
assertEquals(aiSpan!.data?.['sentry.origin'], 'auto.ai.google_genai');
});
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ Deno.test('hapi instrumentation: orchestrion:@hapi/hapi:route channel wraps the
assertEquals(hapiSpan!.description, 'GET /hello');
assertEquals(hapiSpan!.data?.['hapi.type'], 'router');
assertEquals(hapiSpan!.data?.['http.route'], '/hello');
assertEquals(hapiSpan!.data?.['sentry.origin'], 'auto.http.orchestrion.hapi');
assertEquals(hapiSpan!.data?.['sentry.origin'], 'auto.http.hapi');
});
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,5 @@ Deno.test('kafkajs instrumentation: orchestrion:kafkajs:send_batch channel produ
assertEquals(kafkaSpan!.description, 'send my-topic');
assertEquals(kafkaSpan!.data?.['messaging.system'], 'kafka');
assertEquals(kafkaSpan!.data?.['messaging.destination.name'], 'my-topic');
assertEquals(kafkaSpan!.data?.['sentry.origin'], 'auto.kafkajs.orchestrion.producer');
assertEquals(kafkaSpan!.data?.['sentry.origin'], 'auto.kafkajs.producer');
});
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ Deno.test('koa instrumentation: orchestrion:koa:use channel wraps middleware int
const koaSpan = parent.spans?.find(s => s.op === 'middleware.koa');
assertExists(koaSpan, `expected a middleware.koa child span, got ops: ${parent.spans?.map(s => s.op).join(', ')}`);
assertEquals(koaSpan!.description, 'myMiddleware');
assertEquals(koaSpan!.data?.['sentry.origin'], 'auto.http.orchestrion.koa');
assertEquals(koaSpan!.data?.['sentry.origin'], 'auto.http.koa');
});
Original file line number Diff line number Diff line change
Expand Up @@ -62,5 +62,5 @@ Deno.test('mongodb instrumentation: orchestrion:mongodb:command channel produces
assertEquals(mongoSpan!.data?.['db.operation'], 'find');
assertEquals(mongoSpan!.data?.['net.peer.name'], '127.0.0.1');
assertEquals(mongoSpan!.data?.['net.peer.port'], 27017);
assertEquals(mongoSpan!.data?.['sentry.origin'], 'auto.db.orchestrion.mongo');
assertEquals(mongoSpan!.data?.['sentry.origin'], 'auto.db.mongo');
});
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,5 @@ Deno.test('mongoose instrumentation: orchestrion:mongoose:model_save channel pro
assertEquals(mongooseSpan!.data?.['db.user'], 'root');
assertEquals(mongooseSpan!.data?.['net.peer.name'], '127.0.0.1');
assertEquals(mongooseSpan!.data?.['net.peer.port'], 27017);
assertEquals(mongooseSpan!.data?.['sentry.origin'], 'auto.db.orchestrion.mongoose');
assertEquals(mongooseSpan!.data?.['sentry.origin'], 'auto.db.mongoose');
});
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,5 @@ Deno.test('mysql instrumentation: orchestrion:mysql:query channel produces a nes
assertEquals(mysqlSpan!.data?.['net.peer.name'], '127.0.0.1');
assertEquals(mysqlSpan!.data?.['net.peer.port'], 3306);
assertEquals(mysqlSpan!.data?.['db.user'], 'root');
assertEquals(mysqlSpan!.data?.['sentry.origin'], 'auto.db.orchestrion.mysql');
assertEquals(mysqlSpan!.data?.['sentry.origin'], 'auto.db.mysql');
});
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ Deno.test('mysql2 instrumentation: orchestrion:mysql2:query channel produces a n
assertEquals(mysqlSpan!.data?.['db.user'], 'root');
assertEquals(mysqlSpan!.data?.['net.peer.name'], '127.0.0.1');
assertEquals(mysqlSpan!.data?.['net.peer.port'], 3306);
assertEquals(mysqlSpan!.data?.['sentry.origin'], 'auto.db.orchestrion.mysql2');
assertEquals(mysqlSpan!.data?.['sentry.origin'], 'auto.db.mysql2');
});
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ Deno.test('openai instrumentation: orchestrion:openai:chat channel produces a ne
assertEquals(aiSpan!.data?.['gen_ai.request.model'], 'gpt-4o');
assertEquals(aiSpan!.data?.['gen_ai.response.model'], 'gpt-4o-2024-08-06');
assertEquals(aiSpan!.data?.['gen_ai.usage.total_tokens'], 15);
assertEquals(aiSpan!.data?.['sentry.origin'], 'auto.ai.orchestrion.openai');
assertEquals(aiSpan!.data?.['sentry.origin'], 'auto.ai.openai');
});
Original file line number Diff line number Diff line change
Expand Up @@ -95,5 +95,5 @@ Deno.test('pg instrumentation: orchestrion:pg:query channel produces a nested db
assertEquals(pgSpan!.data?.['net.peer.name'], '127.0.0.1');
assertEquals(pgSpan!.data?.['net.peer.port'], 5432);
assertEquals(pgSpan!.data?.['db.user'], 'root');
assertEquals(pgSpan!.data?.['sentry.origin'], 'auto.db.orchestrion.postgres');
assertEquals(pgSpan!.data?.['sentry.origin'], 'auto.db.postgres');
});
Original file line number Diff line number Diff line change
Expand Up @@ -57,5 +57,5 @@ Deno.test('postgres.js instrumentation: orchestrion:postgres:handle channel prod
assertEquals(pgSpan!.data?.['db.query.text'], 'SELECT name FROM users');
// Set by the resolve wrapper from the `command` passed to `query.resolve`.
assertEquals(pgSpan!.data?.['db.operation.name'], 'SELECT');
assertEquals(pgSpan!.data?.['sentry.origin'], 'auto.db.orchestrion.postgresjs');
assertEquals(pgSpan!.data?.['sentry.origin'], 'auto.db.postgresjs');
});
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,5 @@ Deno.test('tedious instrumentation: orchestrion:tedious:execSql channel produces
assertEquals(tediousSpan!.data?.['db.statement'], 'SELECT 1');
assertEquals(tediousSpan!.data?.['net.peer.name'], '127.0.0.1');
assertEquals(tediousSpan!.data?.['net.peer.port'], 1433);
assertEquals(tediousSpan!.data?.['sentry.origin'], 'auto.db.orchestrion.tedious');
assertEquals(tediousSpan!.data?.['sentry.origin'], 'auto.db.tedious');
});
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test('Instruments ioredis automatically', async ({ baseURL }) => {
expect(spans).toContainEqual(
expect.objectContaining({
op: 'db',
origin: 'auto.db.orchestrion.redis',
origin: 'auto.db.redis',
description: 'set test-key [1 other arguments]',
status: 'ok',
data: expect.objectContaining({
Expand All @@ -30,7 +30,7 @@ test('Instruments ioredis automatically', async ({ baseURL }) => {
expect(spans).toContainEqual(
expect.objectContaining({
op: 'db',
origin: 'auto.db.orchestrion.redis',
origin: 'auto.db.redis',
description: 'get test-key',
status: 'ok',
data: expect.objectContaining({
Expand All @@ -55,7 +55,7 @@ test('Instruments mysql automatically', async ({ baseURL }) => {
expect(spans).toContainEqual(
expect.objectContaining({
op: 'db',
origin: 'auto.db.orchestrion.mysql',
origin: 'auto.db.mysql',
description: 'SELECT 1 + 1 AS solution',
status: 'ok',
data: expect.objectContaining({
Expand All @@ -71,7 +71,7 @@ test('Instruments mysql automatically', async ({ baseURL }) => {
expect(spans).toContainEqual(
expect.objectContaining({
op: 'db',
origin: 'auto.db.orchestrion.mysql',
origin: 'auto.db.mysql',
description: 'SELECT NOW()',
status: 'ok',
data: expect.objectContaining({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ test('mysql queries emit a db span with orchestrion-channel attributes', async (

const firstQuery = dbSpans.find(span => span.description === 'SELECT 1 + 1 AS solution');
expect(firstQuery).toBeDefined();
expect(firstQuery!.data?.['sentry.origin']).toBe('auto.db.orchestrion.mysql');
expect(firstQuery!.data?.['sentry.origin']).toBe('auto.db.mysql');
expect(firstQuery!.data?.['db.system']).toBe('mysql');
expect(firstQuery!.data?.['db.statement']).toBe('SELECT 1 + 1 AS solution');
expect(firstQuery!.data?.['net.peer.port']).toBe(3306);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ test('a real mysql query emits a db span with orchestrion-channel attributes', a

const firstQuery = dbSpans.find(span => span.description === 'SELECT 1 + 1 AS solution');
expect(firstQuery).toBeDefined();
expect(firstQuery!.data?.['sentry.origin']).toBe('auto.db.orchestrion.mysql');
expect(firstQuery!.data?.['sentry.origin']).toBe('auto.db.mysql');
expect(firstQuery!.data?.['db.system']).toBe('mysql');
expect(firstQuery!.data?.['db.statement']).toBe('SELECT 1 + 1 AS solution');
expect(firstQuery!.data?.['net.peer.name']).toBe('127.0.0.1');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test.describe('orchestrion DB instrumentation', () => {
expect(spans).toContainEqual(
expect.objectContaining({
op: 'db',
origin: 'auto.db.orchestrion.redis',
origin: 'auto.db.redis',
description: 'set test-key [1 other arguments]',
status: 'ok',
data: expect.objectContaining({
Expand All @@ -34,7 +34,7 @@ test.describe('orchestrion DB instrumentation', () => {
expect(spans).toContainEqual(
expect.objectContaining({
op: 'db',
origin: 'auto.db.orchestrion.redis',
origin: 'auto.db.redis',
description: 'get test-key',
status: 'ok',
data: expect.objectContaining({
Expand All @@ -61,7 +61,7 @@ test.describe('orchestrion DB instrumentation', () => {
expect(spans).toContainEqual(
expect.objectContaining({
op: 'db',
origin: 'auto.db.orchestrion.mysql',
origin: 'auto.db.mysql',
description: 'SELECT 1 + 1 AS solution',
status: 'ok',
data: expect.objectContaining({
Expand All @@ -77,7 +77,7 @@ test.describe('orchestrion DB instrumentation', () => {
expect(spans).toContainEqual(
expect.objectContaining({
op: 'db',
origin: 'auto.db.orchestrion.mysql',
origin: 'auto.db.mysql',
description: 'SELECT NOW()',
status: 'ok',
data: expect.objectContaining({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test('mysql queries emit a db span with orchestrion-channel attributes', async (

const firstQuery = dbSpans.find(span => span.description === 'SELECT 1 + 1 AS solution');
expect(firstQuery).toBeDefined();
expect(firstQuery!.data?.['sentry.origin']).toBe('auto.db.orchestrion.mysql');
expect(firstQuery!.data?.['sentry.origin']).toBe('auto.db.mysql');
expect(firstQuery!.data?.['db.system']).toBe('mysql');
expect(firstQuery!.data?.['db.statement']).toBe('SELECT 1 + 1 AS solution');
expect(firstQuery!.data?.['net.peer.port']).toBe(3306);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ test('pg queries emit a db span with orchestrion-channel attributes', async ({ b

const firstQuery = dbSpans.find(span => span.description === 'SELECT 1 + 1 AS solution');
expect(firstQuery).toBeDefined();
expect(firstQuery!.data?.['sentry.origin']).toBe('auto.db.orchestrion.postgres');
expect(firstQuery!.data?.['sentry.origin']).toBe('auto.db.postgres');
expect(firstQuery!.data?.['db.system']).toBe('postgresql');
expect(firstQuery!.data?.['db.statement']).toBe('SELECT 1 + 1 AS solution');
expect(firstQuery!.data?.['net.peer.port']).toBe(5432);
Expand Down
Loading
Loading