Skip to content

Commit 29ee356

Browse files
committed
Clean up
1 parent 96641f9 commit 29ee356

File tree

2 files changed

+68
-82
lines changed
  • dev-packages/node-integration-tests/suites/tracing/postgresjs
  • packages/node/src/integrations/tracing

2 files changed

+68
-82
lines changed

dev-packages/node-integration-tests/suites/tracing/postgresjs/test.ts

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ describe('postgresjs auto instrumentation', () => {
2121
'db.query.text':
2222
'CREATE TABLE "User" ("id" SERIAL NOT NULL,"createdAt" TIMESTAMP(?) NOT NULL DEFAULT CURRENT_TIMESTAMP,"email" TEXT NOT NULL,"name" TEXT,CONSTRAINT "User_pkey" PRIMARY KEY ("id"))',
2323
'sentry.op': 'db',
24-
'sentry.origin': 'auto.db.otel.postgres',
24+
'sentry.origin': 'auto.db.otel.postgresjs',
2525
'server.address': 'localhost',
2626
'server.port': 5444,
2727
}),
2828
description:
2929
'CREATE TABLE "User" ("id" SERIAL NOT NULL,"createdAt" TIMESTAMP(?) NOT NULL DEFAULT CURRENT_TIMESTAMP,"email" TEXT NOT NULL,"name" TEXT,CONSTRAINT "User_pkey" PRIMARY KEY ("id"))',
3030
op: 'db',
3131
status: 'ok',
32-
origin: 'auto.db.otel.postgres',
32+
origin: 'auto.db.otel.postgresjs',
3333
parent_span_id: expect.any(String),
3434
span_id: expect.any(String),
3535
start_timestamp: expect.any(Number),
@@ -42,15 +42,15 @@ describe('postgresjs auto instrumentation', () => {
4242
'db.system.name': 'postgres',
4343
'db.operation.name': 'INSERT',
4444
'db.query.text': `INSERT INTO "User" ("email", "name") VALUES ('Foo', '${EXISTING_TEST_EMAIL}')`,
45-
'sentry.origin': 'auto.db.otel.postgres',
45+
'sentry.origin': 'auto.db.otel.postgresjs',
4646
'sentry.op': 'db',
4747
'server.address': 'localhost',
4848
'server.port': 5444,
4949
}),
5050
description: `INSERT INTO "User" ("email", "name") VALUES ('Foo', '${EXISTING_TEST_EMAIL}')`,
5151
op: 'db',
5252
status: 'ok',
53-
origin: 'auto.db.otel.postgres',
53+
origin: 'auto.db.otel.postgresjs',
5454
parent_span_id: expect.any(String),
5555
span_id: expect.any(String),
5656
start_timestamp: expect.any(Number),
@@ -64,14 +64,14 @@ describe('postgresjs auto instrumentation', () => {
6464
'db.operation.name': 'UPDATE',
6565
'db.query.text': `UPDATE "User" SET "name" = 'Foo' WHERE "email" = '${EXISTING_TEST_EMAIL}'`,
6666
'sentry.op': 'db',
67-
'sentry.origin': 'auto.db.otel.postgres',
67+
'sentry.origin': 'auto.db.otel.postgresjs',
6868
'server.address': 'localhost',
6969
'server.port': 5444,
7070
}),
7171
description: `UPDATE "User" SET "name" = 'Foo' WHERE "email" = '${EXISTING_TEST_EMAIL}'`,
7272
op: 'db',
7373
status: 'ok',
74-
origin: 'auto.db.otel.postgres',
74+
origin: 'auto.db.otel.postgresjs',
7575
parent_span_id: expect.any(String),
7676
span_id: expect.any(String),
7777
start_timestamp: expect.any(Number),
@@ -85,14 +85,14 @@ describe('postgresjs auto instrumentation', () => {
8585
'db.operation.name': 'SELECT',
8686
'db.query.text': `SELECT * FROM "User" WHERE "email" = '${EXISTING_TEST_EMAIL}'`,
8787
'sentry.op': 'db',
88-
'sentry.origin': 'auto.db.otel.postgres',
88+
'sentry.origin': 'auto.db.otel.postgresjs',
8989
'server.address': 'localhost',
9090
'server.port': 5444,
9191
}),
9292
description: `SELECT * FROM "User" WHERE "email" = '${EXISTING_TEST_EMAIL}'`,
9393
op: 'db',
9494
status: 'ok',
95-
origin: 'auto.db.otel.postgres',
95+
origin: 'auto.db.otel.postgresjs',
9696
parent_span_id: expect.any(String),
9797
span_id: expect.any(String),
9898
start_timestamp: expect.any(Number),
@@ -106,14 +106,14 @@ describe('postgresjs auto instrumentation', () => {
106106
'db.operation.name': 'SELECT',
107107
'db.query.text': 'SELECT * from generate_series(?,?) as x',
108108
'sentry.op': 'db',
109-
'sentry.origin': 'auto.db.otel.postgres',
109+
'sentry.origin': 'auto.db.otel.postgresjs',
110110
'server.address': 'localhost',
111111
'server.port': 5444,
112112
}),
113113
description: 'SELECT * from generate_series(?,?) as x',
114114
op: 'db',
115115
status: 'ok',
116-
origin: 'auto.db.otel.postgres',
116+
origin: 'auto.db.otel.postgresjs',
117117
parent_span_id: expect.any(String),
118118
span_id: expect.any(String),
119119
start_timestamp: expect.any(Number),
@@ -127,14 +127,14 @@ describe('postgresjs auto instrumentation', () => {
127127
'db.operation.name': 'DROP TABLE',
128128
'db.query.text': 'DROP TABLE "User"',
129129
'sentry.op': 'db',
130-
'sentry.origin': 'auto.db.otel.postgres',
130+
'sentry.origin': 'auto.db.otel.postgresjs',
131131
'server.address': 'localhost',
132132
'server.port': 5444,
133133
}),
134134
description: 'DROP TABLE "User"',
135135
op: 'db',
136136
status: 'ok',
137-
origin: 'auto.db.otel.postgres',
137+
origin: 'auto.db.otel.postgresjs',
138138
parent_span_id: expect.any(String),
139139
span_id: expect.any(String),
140140
start_timestamp: expect.any(Number),
@@ -145,19 +145,19 @@ describe('postgresjs auto instrumentation', () => {
145145
data: expect.objectContaining({
146146
'db.namespace': 'test_db',
147147
'db.system.name': 'postgres',
148-
// No db.operation.name here, as this is an errored span
148+
'db.operation.name': 'SELECT',
149149
'db.response.status_code': '42P01',
150150
'error.type': 'PostgresError',
151151
'db.query.text': `SELECT * FROM "User" WHERE "email" = '${NON_EXISTING_TEST_EMAIL}'`,
152152
'sentry.op': 'db',
153-
'sentry.origin': 'auto.db.otel.postgres',
153+
'sentry.origin': 'auto.db.otel.postgresjs',
154154
'server.address': 'localhost',
155155
'server.port': 5444,
156156
}),
157157
description: `SELECT * FROM "User" WHERE "email" = '${NON_EXISTING_TEST_EMAIL}'`,
158158
op: 'db',
159159
status: 'unknown_error',
160-
origin: 'auto.db.otel.postgres',
160+
origin: 'auto.db.otel.postgresjs',
161161
parent_span_id: expect.any(String),
162162
span_id: expect.any(String),
163163
start_timestamp: expect.any(Number),
@@ -216,15 +216,15 @@ describe('postgresjs auto instrumentation', () => {
216216
'db.query.text':
217217
'CREATE TABLE "User" ("id" SERIAL NOT NULL,"createdAt" TIMESTAMP(?) NOT NULL DEFAULT CURRENT_TIMESTAMP,"email" TEXT NOT NULL,"name" TEXT,CONSTRAINT "User_pkey" PRIMARY KEY ("id"))',
218218
'sentry.op': 'db',
219-
'sentry.origin': 'auto.db.otel.postgres',
219+
'sentry.origin': 'auto.db.otel.postgresjs',
220220
'server.address': 'localhost',
221221
'server.port': 5444,
222222
}),
223223
description:
224224
'CREATE TABLE "User" ("id" SERIAL NOT NULL,"createdAt" TIMESTAMP(?) NOT NULL DEFAULT CURRENT_TIMESTAMP,"email" TEXT NOT NULL,"name" TEXT,CONSTRAINT "User_pkey" PRIMARY KEY ("id"))',
225225
op: 'db',
226226
status: 'ok',
227-
origin: 'auto.db.otel.postgres',
227+
origin: 'auto.db.otel.postgresjs',
228228
parent_span_id: expect.any(String),
229229
span_id: expect.any(String),
230230
start_timestamp: expect.any(Number),
@@ -237,15 +237,15 @@ describe('postgresjs auto instrumentation', () => {
237237
'db.system.name': 'postgres',
238238
'db.operation.name': 'INSERT',
239239
'db.query.text': `INSERT INTO "User" ("email", "name") VALUES ('Foo', '${EXISTING_TEST_EMAIL}')`,
240-
'sentry.origin': 'auto.db.otel.postgres',
240+
'sentry.origin': 'auto.db.otel.postgresjs',
241241
'sentry.op': 'db',
242242
'server.address': 'localhost',
243243
'server.port': 5444,
244244
}),
245245
description: `INSERT INTO "User" ("email", "name") VALUES ('Foo', '${EXISTING_TEST_EMAIL}')`,
246246
op: 'db',
247247
status: 'ok',
248-
origin: 'auto.db.otel.postgres',
248+
origin: 'auto.db.otel.postgresjs',
249249
parent_span_id: expect.any(String),
250250
span_id: expect.any(String),
251251
start_timestamp: expect.any(Number),
@@ -259,14 +259,14 @@ describe('postgresjs auto instrumentation', () => {
259259
'db.operation.name': 'UPDATE',
260260
'db.query.text': `UPDATE "User" SET "name" = 'Foo' WHERE "email" = '${EXISTING_TEST_EMAIL}'`,
261261
'sentry.op': 'db',
262-
'sentry.origin': 'auto.db.otel.postgres',
262+
'sentry.origin': 'auto.db.otel.postgresjs',
263263
'server.address': 'localhost',
264264
'server.port': 5444,
265265
}),
266266
description: `UPDATE "User" SET "name" = 'Foo' WHERE "email" = '${EXISTING_TEST_EMAIL}'`,
267267
op: 'db',
268268
status: 'ok',
269-
origin: 'auto.db.otel.postgres',
269+
origin: 'auto.db.otel.postgresjs',
270270
parent_span_id: expect.any(String),
271271
span_id: expect.any(String),
272272
start_timestamp: expect.any(Number),
@@ -280,14 +280,14 @@ describe('postgresjs auto instrumentation', () => {
280280
'db.operation.name': 'SELECT',
281281
'db.query.text': `SELECT * FROM "User" WHERE "email" = '${EXISTING_TEST_EMAIL}'`,
282282
'sentry.op': 'db',
283-
'sentry.origin': 'auto.db.otel.postgres',
283+
'sentry.origin': 'auto.db.otel.postgresjs',
284284
'server.address': 'localhost',
285285
'server.port': 5444,
286286
}),
287287
description: `SELECT * FROM "User" WHERE "email" = '${EXISTING_TEST_EMAIL}'`,
288288
op: 'db',
289289
status: 'ok',
290-
origin: 'auto.db.otel.postgres',
290+
origin: 'auto.db.otel.postgresjs',
291291
parent_span_id: expect.any(String),
292292
span_id: expect.any(String),
293293
start_timestamp: expect.any(Number),
@@ -301,14 +301,14 @@ describe('postgresjs auto instrumentation', () => {
301301
'db.operation.name': 'SELECT',
302302
'db.query.text': 'SELECT * from generate_series(?,?) as x',
303303
'sentry.op': 'db',
304-
'sentry.origin': 'auto.db.otel.postgres',
304+
'sentry.origin': 'auto.db.otel.postgresjs',
305305
'server.address': 'localhost',
306306
'server.port': 5444,
307307
}),
308308
description: 'SELECT * from generate_series(?,?) as x',
309309
op: 'db',
310310
status: 'ok',
311-
origin: 'auto.db.otel.postgres',
311+
origin: 'auto.db.otel.postgresjs',
312312
parent_span_id: expect.any(String),
313313
span_id: expect.any(String),
314314
start_timestamp: expect.any(Number),
@@ -322,14 +322,14 @@ describe('postgresjs auto instrumentation', () => {
322322
'db.operation.name': 'DROP TABLE',
323323
'db.query.text': 'DROP TABLE "User"',
324324
'sentry.op': 'db',
325-
'sentry.origin': 'auto.db.otel.postgres',
325+
'sentry.origin': 'auto.db.otel.postgresjs',
326326
'server.address': 'localhost',
327327
'server.port': 5444,
328328
}),
329329
description: 'DROP TABLE "User"',
330330
op: 'db',
331331
status: 'ok',
332-
origin: 'auto.db.otel.postgres',
332+
origin: 'auto.db.otel.postgresjs',
333333
parent_span_id: expect.any(String),
334334
span_id: expect.any(String),
335335
start_timestamp: expect.any(Number),
@@ -340,19 +340,19 @@ describe('postgresjs auto instrumentation', () => {
340340
data: expect.objectContaining({
341341
'db.namespace': 'test_db',
342342
'db.system.name': 'postgres',
343-
// No db.operation.name here, as this is an errored span
343+
'db.operation.name': 'SELECT',
344344
'db.response.status_code': '42P01',
345345
'error.type': 'PostgresError',
346346
'db.query.text': `SELECT * FROM "User" WHERE "email" = '${NON_EXISTING_TEST_EMAIL}'`,
347347
'sentry.op': 'db',
348-
'sentry.origin': 'auto.db.otel.postgres',
348+
'sentry.origin': 'auto.db.otel.postgresjs',
349349
'server.address': 'localhost',
350350
'server.port': 5444,
351351
}),
352352
description: `SELECT * FROM "User" WHERE "email" = '${NON_EXISTING_TEST_EMAIL}'`,
353353
op: 'db',
354354
status: 'unknown_error',
355-
origin: 'auto.db.otel.postgres',
355+
origin: 'auto.db.otel.postgresjs',
356356
parent_span_id: expect.any(String),
357357
span_id: expect.any(String),
358358
start_timestamp: expect.any(Number),

0 commit comments

Comments
 (0)