From 605a0c5f1e565037acf9e0c4c7eb7c90766e9782 Mon Sep 17 00:00:00 2001 From: Severin Neumann Date: Tue, 4 May 2021 10:47:56 +0200 Subject: [PATCH 1/5] refactor(semantic-conventions): use semantic conventions for pg --- examples/postgres/package.json | 4 +-- .../package.json | 3 +- .../src/enums.ts | 27 +++----------- .../src/pg.ts | 15 ++++---- .../src/utils.ts | 20 +++++------ .../test/pg-pool.test.ts | 35 +++++++++---------- .../test/pg.test.ts | 31 ++++++++-------- 7 files changed, 59 insertions(+), 76 deletions(-) diff --git a/examples/postgres/package.json b/examples/postgres/package.json index d4525cd9de3..876aa68f6d9 100644 --- a/examples/postgres/package.json +++ b/examples/postgres/package.json @@ -35,11 +35,11 @@ "@opentelemetry/exporter-zipkin": "^0.19.0", "@opentelemetry/instrumentation": "^0.19.0", "@opentelemetry/instrumentation-http": "^0.19.0", - "@opentelemetry/instrumentation-pg": "^0.15.0", + "@opentelemetry/instrumentation-pg": "file:///Users/neumanns/Projects/opentelemetry-js-contrib/plugins/node/opentelemetry-instrumentation-pg", "@opentelemetry/node": "^0.19.0", "@opentelemetry/tracing": "^0.19.0", "express": "^4.17.1", - "pg": "^7.12.1" + "pg": "^8.6.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js#readme", "devDependencies": { diff --git a/plugins/node/opentelemetry-instrumentation-pg/package.json b/plugins/node/opentelemetry-instrumentation-pg/package.json index ff936999d96..fb756cedc7d 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/package.json +++ b/plugins/node/opentelemetry-instrumentation-pg/package.json @@ -70,6 +70,7 @@ }, "dependencies": { "@opentelemetry/api": "^1.0.0-rc.0", - "@opentelemetry/instrumentation": "^0.19.0" + "@opentelemetry/instrumentation": "^0.19.0", + "@opentelemetry/semantic-conventions": "^0.19.0" } } diff --git a/plugins/node/opentelemetry-instrumentation-pg/src/enums.ts b/plugins/node/opentelemetry-instrumentation-pg/src/enums.ts index 435a531c8a6..994de4cb4f4 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/src/enums.ts +++ b/plugins/node/opentelemetry-instrumentation-pg/src/enums.ts @@ -14,27 +14,10 @@ * limitations under the License. */ +// Postgresql specific attributes not covered by semantic conventions export enum AttributeNames { - // required by https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/data-database.md - COMPONENT = 'component', - DB_TYPE = 'db.type', - DB_INSTANCE = 'db.instance', - DB_STATEMENT = 'db.statement', - PEER_ADDRESS = 'peer.address', - PEER_HOSTNAME = 'peer.host', - - // optional - DB_USER = 'db.user', - PEER_PORT = 'peer.port', - PEER_IPV4 = 'peer.ipv4', - PEER_IPV6 = 'peer.ipv6', - PEER_SERVICE = 'peer.service', - - // PG specific -- not specified by spec - PG_VALUES = 'pg.values', - PG_PLAN = 'pg.plan', - - // PG-POOL specific -- not specified by spec - IDLE_TIMEOUT_MILLIS = 'idle.timeout.millis', - MAX_CLIENT = 'max', + PG_VALUES = 'db.postgresql.values', + PG_PLAN = 'db.postgresql.plan', + IDLE_TIMEOUT_MILLIS = 'db.postgresql.idle.timeout.millis', + MAX_CLIENT = 'db.postgresql.max.client', } diff --git a/plugins/node/opentelemetry-instrumentation-pg/src/pg.ts b/plugins/node/opentelemetry-instrumentation-pg/src/pg.ts index 1e2cca96a34..358f970ea7a 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/src/pg.ts +++ b/plugins/node/opentelemetry-instrumentation-pg/src/pg.ts @@ -39,6 +39,7 @@ import { } from './types'; import * as utils from './utils'; import { AttributeNames } from './enums'; +import { SemanticAttributes, DbSystemValues } from '@opentelemetry/semantic-conventions'; import { VERSION } from './version'; export interface PgInstrumentationConfig extends InstrumentationConfig { @@ -54,7 +55,6 @@ const PG_POOL_COMPONENT = 'pg-pool'; export class PgInstrumentation extends InstrumentationBase { static readonly COMPONENT = 'pg'; - static readonly DB_TYPE = 'sql'; static readonly BASE_SPAN_NAME = PgInstrumentation.COMPONENT + '.query'; @@ -227,13 +227,12 @@ export class PgInstrumentation extends InstrumentationBase { const span = plugin.tracer.startSpan(`${PG_POOL_COMPONENT}.connect`, { kind: SpanKind.CLIENT, attributes: { - [AttributeNames.COMPONENT]: PgInstrumentation.COMPONENT, // required - [AttributeNames.DB_TYPE]: PgInstrumentation.DB_TYPE, // required - [AttributeNames.DB_INSTANCE]: this.options.database, // required - [AttributeNames.PEER_HOSTNAME]: this.options.host, // required - [AttributeNames.PEER_ADDRESS]: jdbcString, // required - [AttributeNames.PEER_PORT]: this.options.port, - [AttributeNames.DB_USER]: this.options.user, + [SemanticAttributes.DB_SYSTEM]: DbSystemValues.POSTGRESQL, + [SemanticAttributes.DB_NAME]: this.options.database, // required + [SemanticAttributes.NET_PEER_NAME]: this.options.host, // required + [SemanticAttributes.DB_CONNECTION_STRING]: jdbcString, // required + [SemanticAttributes.NET_PEER_PORT]: this.options.port, + [SemanticAttributes.DB_USER]: this.options.user, [AttributeNames.IDLE_TIMEOUT_MILLIS]: this.options .idleTimeoutMillis, [AttributeNames.MAX_CLIENT]: this.options.maxClient, diff --git a/plugins/node/opentelemetry-instrumentation-pg/src/utils.ts b/plugins/node/opentelemetry-instrumentation-pg/src/utils.ts index 950d4e28f70..43613e3c065 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/src/utils.ts +++ b/plugins/node/opentelemetry-instrumentation-pg/src/utils.ts @@ -15,6 +15,7 @@ */ import { Span, SpanStatusCode, Tracer, SpanKind } from '@opentelemetry/api'; +import { SemanticAttributes, DbSystemValues } from '@opentelemetry/semantic-conventions'; import { AttributeNames } from './enums'; import { PgClientExtended, @@ -51,13 +52,12 @@ function pgStartSpan(tracer: Tracer, client: PgClientExtended, name: string) { return tracer.startSpan(name, { kind: SpanKind.CLIENT, attributes: { - [AttributeNames.COMPONENT]: PgInstrumentation.COMPONENT, // required - [AttributeNames.DB_INSTANCE]: client.connectionParameters.database, // required - [AttributeNames.DB_TYPE]: PgInstrumentation.DB_TYPE, // required - [AttributeNames.PEER_ADDRESS]: jdbcString, // required - [AttributeNames.PEER_HOSTNAME]: client.connectionParameters.host, // required - [AttributeNames.PEER_PORT]: client.connectionParameters.port, - [AttributeNames.DB_USER]: client.connectionParameters.user, + [SemanticAttributes.DB_NAME]: client.connectionParameters.database, // required + [SemanticAttributes.DB_SYSTEM]: DbSystemValues.POSTGRESQL, // required + [SemanticAttributes.DB_CONNECTION_STRING]: jdbcString, // required + [SemanticAttributes.NET_PEER_NAME]: client.connectionParameters.host, // required + [SemanticAttributes.NET_PEER_PORT]: client.connectionParameters.port, + [SemanticAttributes.DB_USER]: client.connectionParameters.user, }, }); } @@ -76,7 +76,7 @@ export function handleConfigQuery( // Set attributes if (queryConfig.text) { - span.setAttribute(AttributeNames.DB_STATEMENT, queryConfig.text); + span.setAttribute(SemanticAttributes.DB_STATEMENT, queryConfig.text); } if ( instrumentationConfig.enhancedDatabaseReporting && @@ -109,7 +109,7 @@ export function handleParameterizedQuery( const span = pgStartSpan(tracer, this, name); // Set attributes - span.setAttribute(AttributeNames.DB_STATEMENT, query); + span.setAttribute(SemanticAttributes.DB_STATEMENT, query); if (instrumentationConfig.enhancedDatabaseReporting) { span.setAttribute(AttributeNames.PG_VALUES, arrayStringifyHelper(values)); } @@ -129,7 +129,7 @@ export function handleTextQuery( const span = pgStartSpan(tracer, this, name); // Set attributes - span.setAttribute(AttributeNames.DB_STATEMENT, query); + span.setAttribute(SemanticAttributes.DB_STATEMENT, query); return span; } diff --git a/plugins/node/opentelemetry-instrumentation-pg/test/pg-pool.test.ts b/plugins/node/opentelemetry-instrumentation-pg/test/pg-pool.test.ts index c28eda899b9..766fad85390 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/test/pg-pool.test.ts +++ b/plugins/node/opentelemetry-instrumentation-pg/test/pg-pool.test.ts @@ -36,6 +36,7 @@ import * as assert from 'assert'; import * as pg from 'pg'; import * as pgPool from 'pg-pool'; import { AttributeNames } from '../src/enums'; +import { SemanticAttributes, DbSystemValues } from '@opentelemetry/semantic-conventions'; const memoryExporter = new InMemorySpanExporter(); @@ -52,25 +53,23 @@ const CONFIG = { }; const DEFAULT_PGPOOL_ATTRIBUTES = { - [AttributeNames.COMPONENT]: PgInstrumentation.COMPONENT, - [AttributeNames.DB_INSTANCE]: CONFIG.database, - [AttributeNames.DB_TYPE]: PgInstrumentation.DB_TYPE, - [AttributeNames.PEER_HOSTNAME]: CONFIG.host, - [AttributeNames.PEER_ADDRESS]: `jdbc:postgresql://${CONFIG.host}:${CONFIG.port}/${CONFIG.database}`, - [AttributeNames.PEER_PORT]: CONFIG.port, - [AttributeNames.DB_USER]: CONFIG.user, + [SemanticAttributes.DB_SYSTEM]: DbSystemValues.POSTGRESQL, + [SemanticAttributes.DB_NAME]: CONFIG.database, + [SemanticAttributes.NET_PEER_NAME]: CONFIG.host, + [SemanticAttributes.DB_CONNECTION_STRING]: `jdbc:postgresql://${CONFIG.host}:${CONFIG.port}/${CONFIG.database}`, + [SemanticAttributes.NET_PEER_PORT]: CONFIG.port, + [SemanticAttributes.DB_USER]: CONFIG.user, [AttributeNames.MAX_CLIENT]: CONFIG.maxClient, [AttributeNames.IDLE_TIMEOUT_MILLIS]: CONFIG.idleTimeoutMillis, }; const DEFAULT_PG_ATTRIBUTES = { - [AttributeNames.COMPONENT]: PgInstrumentation.COMPONENT, - [AttributeNames.DB_INSTANCE]: CONFIG.database, - [AttributeNames.DB_TYPE]: PgInstrumentation.DB_TYPE, - [AttributeNames.PEER_HOSTNAME]: CONFIG.host, - [AttributeNames.PEER_ADDRESS]: `jdbc:postgresql://${CONFIG.host}:${CONFIG.port}/${CONFIG.database}`, - [AttributeNames.PEER_PORT]: CONFIG.port, - [AttributeNames.DB_USER]: CONFIG.user, + [SemanticAttributes.DB_SYSTEM]: DbSystemValues.POSTGRESQL, + [SemanticAttributes.DB_NAME]: CONFIG.database, + [SemanticAttributes.NET_PEER_NAME]: CONFIG.host, + [SemanticAttributes.DB_CONNECTION_STRING]: `jdbc:postgresql://${CONFIG.host}:${CONFIG.port}/${CONFIG.database}`, + [SemanticAttributes.NET_PEER_PORT]: CONFIG.port, + [SemanticAttributes.DB_USER]: CONFIG.user, }; const unsetStatus: SpanStatus = { @@ -162,7 +161,7 @@ describe('pg-pool@2.x', () => { }; const pgAttributes = { ...DEFAULT_PG_ATTRIBUTES, - [AttributeNames.DB_STATEMENT]: 'SELECT NOW()', + [SemanticAttributes.DB_STATEMENT]: 'SELECT NOW()', }; const events: TimedEvent[] = []; const span = provider.getTracer('test-pg-pool').startSpan('test span'); @@ -186,7 +185,7 @@ describe('pg-pool@2.x', () => { }; const pgAttributes = { ...DEFAULT_PG_ATTRIBUTES, - [AttributeNames.DB_STATEMENT]: 'SELECT NOW()', + [SemanticAttributes.DB_STATEMENT]: 'SELECT NOW()', }; const events: TimedEvent[] = []; const parentSpan = provider @@ -242,7 +241,7 @@ describe('pg-pool@2.x', () => { }; const pgAttributes = { ...DEFAULT_PG_ATTRIBUTES, - [AttributeNames.DB_STATEMENT]: 'SELECT NOW()', + [SemanticAttributes.DB_STATEMENT]: 'SELECT NOW()', }; const events: TimedEvent[] = []; const span = provider.getTracer('test-pg-pool').startSpan('test span'); @@ -261,7 +260,7 @@ describe('pg-pool@2.x', () => { }; const pgAttributes = { ...DEFAULT_PG_ATTRIBUTES, - [AttributeNames.DB_STATEMENT]: 'SELECT NOW()', + [SemanticAttributes.DB_STATEMENT]: 'SELECT NOW()', }; const events: TimedEvent[] = []; const parentSpan = provider diff --git a/plugins/node/opentelemetry-instrumentation-pg/test/pg.test.ts b/plugins/node/opentelemetry-instrumentation-pg/test/pg.test.ts index 4182cfd015c..8dd104c9761 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/test/pg.test.ts +++ b/plugins/node/opentelemetry-instrumentation-pg/test/pg.test.ts @@ -36,6 +36,7 @@ import * as assert from 'assert'; import type * as pg from 'pg'; import { PgInstrumentation } from '../src'; import { AttributeNames } from '../src/enums'; +import { SemanticAttributes, DbSystemValues } from '@opentelemetry/semantic-conventions'; const memoryExporter = new InMemorySpanExporter(); @@ -49,14 +50,14 @@ const CONFIG = { : 54320, }; + const DEFAULT_ATTRIBUTES = { - [AttributeNames.COMPONENT]: PgInstrumentation.COMPONENT, - [AttributeNames.DB_INSTANCE]: CONFIG.database, - [AttributeNames.DB_TYPE]: PgInstrumentation.DB_TYPE, - [AttributeNames.PEER_HOSTNAME]: CONFIG.host, - [AttributeNames.PEER_ADDRESS]: `jdbc:postgresql://${CONFIG.host}:${CONFIG.port}/${CONFIG.database}`, - [AttributeNames.PEER_PORT]: CONFIG.port, - [AttributeNames.DB_USER]: CONFIG.user, + [SemanticAttributes.DB_SYSTEM]: DbSystemValues.POSTGRESQL, + [SemanticAttributes.DB_NAME]: CONFIG.database, + [SemanticAttributes.NET_PEER_NAME]: CONFIG.host, + [SemanticAttributes.DB_CONNECTION_STRING]: `jdbc:postgresql://${CONFIG.host}:${CONFIG.port}/${CONFIG.database}`, + [SemanticAttributes.NET_PEER_PORT]: CONFIG.port, + [SemanticAttributes.DB_USER]: CONFIG.user, }; const unsetStatus: SpanStatus = { @@ -200,7 +201,7 @@ describe('pg@7.x', () => { it('should intercept client.query(text, callback)', done => { const attributes = { ...DEFAULT_ATTRIBUTES, - [AttributeNames.DB_STATEMENT]: 'SELECT NOW()', + [SemanticAttributes.DB_STATEMENT]: 'SELECT NOW()', }; const events: TimedEvent[] = []; const span = tracer.startSpan('test span'); @@ -220,7 +221,7 @@ describe('pg@7.x', () => { const values = ['0']; const attributes = { ...DEFAULT_ATTRIBUTES, - [AttributeNames.DB_STATEMENT]: query, + [SemanticAttributes.DB_STATEMENT]: query, }; const events: TimedEvent[] = []; const span = tracer.startSpan('test span'); @@ -239,7 +240,7 @@ describe('pg@7.x', () => { const query = 'SELECT NOW()'; const attributes = { ...DEFAULT_ATTRIBUTES, - [AttributeNames.DB_STATEMENT]: query, + [SemanticAttributes.DB_STATEMENT]: query, }; const events: TimedEvent[] = []; const span = tracer.startSpan('test span'); @@ -261,7 +262,7 @@ describe('pg@7.x', () => { const query = 'SELECT NOW()'; const attributes = { ...DEFAULT_ATTRIBUTES, - [AttributeNames.DB_STATEMENT]: query, + [SemanticAttributes.DB_STATEMENT]: query, }; const events: TimedEvent[] = []; const span = tracer.startSpan('test span'); @@ -281,7 +282,7 @@ describe('pg@7.x', () => { const values = ['0']; const attributes = { ...DEFAULT_ATTRIBUTES, - [AttributeNames.DB_STATEMENT]: query, + [SemanticAttributes.DB_STATEMENT]: query, }; const events: TimedEvent[] = []; const span = tracer.startSpan('test span'); @@ -301,7 +302,7 @@ describe('pg@7.x', () => { const values = ['0']; const attributes = { ...DEFAULT_ATTRIBUTES, - [AttributeNames.DB_STATEMENT]: query, + [SemanticAttributes.DB_STATEMENT]: query, }; const events: TimedEvent[] = []; const span = tracer.startSpan('test span'); @@ -326,7 +327,7 @@ describe('pg@7.x', () => { const attributes = { ...DEFAULT_ATTRIBUTES, [AttributeNames.PG_PLAN]: name, - [AttributeNames.DB_STATEMENT]: query, + [SemanticAttributes.DB_STATEMENT]: query, }; const events: TimedEvent[] = []; const span = tracer.startSpan('test span'); @@ -350,7 +351,7 @@ describe('pg@7.x', () => { const query = 'SELECT NOW()'; const attributes = { ...DEFAULT_ATTRIBUTES, - [AttributeNames.DB_STATEMENT]: query, + [SemanticAttributes.DB_STATEMENT]: query, }; const events: TimedEvent[] = []; const span = tracer.startSpan('test span'); From 112f395f0ed3dc06aa8dd6a512f90a28ef6342f4 Mon Sep 17 00:00:00 2001 From: Severin Neumann Date: Tue, 4 May 2021 10:49:26 +0200 Subject: [PATCH 2/5] refactor(semantic-conventions): fix styles for pg --- plugins/node/opentelemetry-instrumentation-pg/src/pg.ts | 5 ++++- plugins/node/opentelemetry-instrumentation-pg/src/utils.ts | 5 ++++- .../opentelemetry-instrumentation-pg/test/pg-pool.test.ts | 5 ++++- .../node/opentelemetry-instrumentation-pg/test/pg.test.ts | 6 ++++-- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/plugins/node/opentelemetry-instrumentation-pg/src/pg.ts b/plugins/node/opentelemetry-instrumentation-pg/src/pg.ts index 358f970ea7a..00496a190ea 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/src/pg.ts +++ b/plugins/node/opentelemetry-instrumentation-pg/src/pg.ts @@ -39,7 +39,10 @@ import { } from './types'; import * as utils from './utils'; import { AttributeNames } from './enums'; -import { SemanticAttributes, DbSystemValues } from '@opentelemetry/semantic-conventions'; +import { + SemanticAttributes, + DbSystemValues, +} from '@opentelemetry/semantic-conventions'; import { VERSION } from './version'; export interface PgInstrumentationConfig extends InstrumentationConfig { diff --git a/plugins/node/opentelemetry-instrumentation-pg/src/utils.ts b/plugins/node/opentelemetry-instrumentation-pg/src/utils.ts index 43613e3c065..8d70757cab0 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/src/utils.ts +++ b/plugins/node/opentelemetry-instrumentation-pg/src/utils.ts @@ -15,7 +15,10 @@ */ import { Span, SpanStatusCode, Tracer, SpanKind } from '@opentelemetry/api'; -import { SemanticAttributes, DbSystemValues } from '@opentelemetry/semantic-conventions'; +import { + SemanticAttributes, + DbSystemValues, +} from '@opentelemetry/semantic-conventions'; import { AttributeNames } from './enums'; import { PgClientExtended, diff --git a/plugins/node/opentelemetry-instrumentation-pg/test/pg-pool.test.ts b/plugins/node/opentelemetry-instrumentation-pg/test/pg-pool.test.ts index 766fad85390..df49d973874 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/test/pg-pool.test.ts +++ b/plugins/node/opentelemetry-instrumentation-pg/test/pg-pool.test.ts @@ -36,7 +36,10 @@ import * as assert from 'assert'; import * as pg from 'pg'; import * as pgPool from 'pg-pool'; import { AttributeNames } from '../src/enums'; -import { SemanticAttributes, DbSystemValues } from '@opentelemetry/semantic-conventions'; +import { + SemanticAttributes, + DbSystemValues, +} from '@opentelemetry/semantic-conventions'; const memoryExporter = new InMemorySpanExporter(); diff --git a/plugins/node/opentelemetry-instrumentation-pg/test/pg.test.ts b/plugins/node/opentelemetry-instrumentation-pg/test/pg.test.ts index 8dd104c9761..4837846bcae 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/test/pg.test.ts +++ b/plugins/node/opentelemetry-instrumentation-pg/test/pg.test.ts @@ -36,7 +36,10 @@ import * as assert from 'assert'; import type * as pg from 'pg'; import { PgInstrumentation } from '../src'; import { AttributeNames } from '../src/enums'; -import { SemanticAttributes, DbSystemValues } from '@opentelemetry/semantic-conventions'; +import { + SemanticAttributes, + DbSystemValues, +} from '@opentelemetry/semantic-conventions'; const memoryExporter = new InMemorySpanExporter(); @@ -50,7 +53,6 @@ const CONFIG = { : 54320, }; - const DEFAULT_ATTRIBUTES = { [SemanticAttributes.DB_SYSTEM]: DbSystemValues.POSTGRESQL, [SemanticAttributes.DB_NAME]: CONFIG.database, From 178a6f174f92ede02eceaae0c6e35722e020b7db Mon Sep 17 00:00:00 2001 From: Severin Neumann Date: Tue, 4 May 2021 16:57:52 +0200 Subject: [PATCH 3/5] refactor(semantic-conventions): undo package.json changes for postgres example --- examples/postgres/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/postgres/package.json b/examples/postgres/package.json index 876aa68f6d9..34c2a7f57d1 100644 --- a/examples/postgres/package.json +++ b/examples/postgres/package.json @@ -35,7 +35,7 @@ "@opentelemetry/exporter-zipkin": "^0.19.0", "@opentelemetry/instrumentation": "^0.19.0", "@opentelemetry/instrumentation-http": "^0.19.0", - "@opentelemetry/instrumentation-pg": "file:///Users/neumanns/Projects/opentelemetry-js-contrib/plugins/node/opentelemetry-instrumentation-pg", + "@opentelemetry/instrumentation-pg": "^0.15.0", "@opentelemetry/node": "^0.19.0", "@opentelemetry/tracing": "^0.19.0", "express": "^4.17.1", From 1250ab3dbd2c1c0d1691c57079a738c44093145e Mon Sep 17 00:00:00 2001 From: Severin Neumann Date: Fri, 7 May 2021 22:57:35 +0200 Subject: [PATCH 4/5] refactor(semantic-conventions): fix version in pg example --- examples/postgres/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/postgres/package.json b/examples/postgres/package.json index 34c2a7f57d1..bd4414b987a 100644 --- a/examples/postgres/package.json +++ b/examples/postgres/package.json @@ -35,7 +35,7 @@ "@opentelemetry/exporter-zipkin": "^0.19.0", "@opentelemetry/instrumentation": "^0.19.0", "@opentelemetry/instrumentation-http": "^0.19.0", - "@opentelemetry/instrumentation-pg": "^0.15.0", + "@opentelemetry/instrumentation-pg": "^0.16.0", "@opentelemetry/node": "^0.19.0", "@opentelemetry/tracing": "^0.19.0", "express": "^4.17.1", From a7bcd614a482a851daf7d4bdb596fda1f91cffe2 Mon Sep 17 00:00:00 2001 From: vmarchaud Date: Sat, 8 May 2021 10:13:10 +0200 Subject: [PATCH 5/5] Merge branch 'main' into fix-pg-semantic-conventions --- .../opentelemetry-instrumentation-aws-lambda/package.json | 4 ++-- .../node/opentelemetry-instrumentation-bunyan/package.json | 4 ++-- .../node/opentelemetry-instrumentation-express/package.json | 4 ++-- .../node/opentelemetry-instrumentation-graphql/package.json | 4 ++-- .../node/opentelemetry-instrumentation-hapi/package.json | 4 ++-- .../node/opentelemetry-instrumentation-ioredis/package.json | 5 ++--- plugins/node/opentelemetry-instrumentation-koa/package.json | 6 +++--- .../node/opentelemetry-instrumentation-mongodb/package.json | 4 ++-- .../node/opentelemetry-instrumentation-mysql/package.json | 4 ++-- plugins/node/opentelemetry-instrumentation-pg/package.json | 6 +++--- .../node/opentelemetry-instrumentation-pino/package.json | 4 ++-- .../node/opentelemetry-instrumentation-redis/package.json | 4 ++-- .../node/opentelemetry-instrumentation-restify/package.json | 4 ++-- .../package.json | 1 - 14 files changed, 28 insertions(+), 30 deletions(-) diff --git a/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json b/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json index 91f49bc91db..ef41aae7e8c 100644 --- a/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json +++ b/plugins/node/opentelemetry-instrumentation-aws-lambda/package.json @@ -42,7 +42,6 @@ }, "devDependencies": { "@opentelemetry/node": "0.19.0", - "@types/aws-lambda": "8.10.76", "@types/mocha": "7.0.2", "@types/node": "14.14.43", "codecov": "3.8.1", @@ -58,6 +57,7 @@ "@opentelemetry/instrumentation": "^0.19.0", "@opentelemetry/resources": "^0.19.0", "@opentelemetry/semantic-conventions": "^0.19.0", - "@opentelemetry/tracing": "^0.19.0" + "@opentelemetry/tracing": "^0.19.0", + "@types/aws-lambda": "8.10.76" } } diff --git a/plugins/node/opentelemetry-instrumentation-bunyan/package.json b/plugins/node/opentelemetry-instrumentation-bunyan/package.json index 9aea67646ac..839cfc40c9e 100644 --- a/plugins/node/opentelemetry-instrumentation-bunyan/package.json +++ b/plugins/node/opentelemetry-instrumentation-bunyan/package.json @@ -45,7 +45,6 @@ "@opentelemetry/context-async-hooks": "0.19.0", "@opentelemetry/node": "0.19.0", "@opentelemetry/tracing": "0.19.0", - "@types/bunyan": "1.8.6", "@types/mocha": "7.0.2", "@types/node": "14.14.43", "@types/sinon": "9.0.11", @@ -61,6 +60,7 @@ }, "dependencies": { "@opentelemetry/api": "^1.0.0-rc.0", - "@opentelemetry/instrumentation": "^0.19.0" + "@opentelemetry/instrumentation": "^0.19.0", + "@types/bunyan": "1.8.6" } } diff --git a/plugins/node/opentelemetry-instrumentation-express/package.json b/plugins/node/opentelemetry-instrumentation-express/package.json index f8209757d80..0dbef8ab346 100644 --- a/plugins/node/opentelemetry-instrumentation-express/package.json +++ b/plugins/node/opentelemetry-instrumentation-express/package.json @@ -45,7 +45,6 @@ "@opentelemetry/context-async-hooks": "0.19.0", "@opentelemetry/node": "0.19.0", "@opentelemetry/tracing": "0.19.0", - "@types/express": "4.17.11", "@types/mocha": "7.0.2", "@types/node": "14.14.43", "codecov": "3.8.1", @@ -61,6 +60,7 @@ "@opentelemetry/api": "^1.0.0-rc.0", "@opentelemetry/core": "^0.19.0", "@opentelemetry/instrumentation": "^0.19.0", - "@opentelemetry/semantic-conventions": "^0.19.0" + "@opentelemetry/semantic-conventions": "^0.19.0", + "@types/express": "4.17.11" } } diff --git a/plugins/node/opentelemetry-instrumentation-graphql/package.json b/plugins/node/opentelemetry-instrumentation-graphql/package.json index f6fb3af929f..8c821bdafc2 100644 --- a/plugins/node/opentelemetry-instrumentation-graphql/package.json +++ b/plugins/node/opentelemetry-instrumentation-graphql/package.json @@ -44,7 +44,6 @@ }, "devDependencies": { "@opentelemetry/tracing": "0.19.0", - "@types/graphql": "14.5.0", "@types/mocha": "8.2.2", "@types/node": "14.14.43", "codecov": "3.8.1", @@ -58,6 +57,7 @@ }, "dependencies": { "@opentelemetry/api": "^1.0.0-rc.0", - "@opentelemetry/instrumentation": "^0.19.0" + "@opentelemetry/instrumentation": "^0.19.0", + "@types/graphql": "14.5.0" } } diff --git a/plugins/node/opentelemetry-instrumentation-hapi/package.json b/plugins/node/opentelemetry-instrumentation-hapi/package.json index eebf3043bf9..1ee63dad8b4 100644 --- a/plugins/node/opentelemetry-instrumentation-hapi/package.json +++ b/plugins/node/opentelemetry-instrumentation-hapi/package.json @@ -45,7 +45,6 @@ "@opentelemetry/context-async-hooks": "0.19.0", "@opentelemetry/node": "0.19.0", "@opentelemetry/tracing": "0.19.0", - "@types/hapi__hapi": "20.0.8", "@types/mocha": "7.0.2", "@types/node": "12.20.11", "codecov": "3.8.1", @@ -60,6 +59,7 @@ "dependencies": { "@opentelemetry/api": "^1.0.0-rc.0", "@opentelemetry/instrumentation": "^0.19.0", - "@opentelemetry/semantic-conventions": "^0.19.0" + "@opentelemetry/semantic-conventions": "^0.19.0", + "@types/hapi__hapi": "20.0.8" } } diff --git a/plugins/node/opentelemetry-instrumentation-ioredis/package.json b/plugins/node/opentelemetry-instrumentation-ioredis/package.json index cef7ce084c2..7e33ca6563b 100644 --- a/plugins/node/opentelemetry-instrumentation-ioredis/package.json +++ b/plugins/node/opentelemetry-instrumentation-ioredis/package.json @@ -48,10 +48,8 @@ "@opentelemetry/node": "0.19.0", "@opentelemetry/test-utils": "^0.16.0", "@opentelemetry/tracing": "0.19.0", - "@types/ioredis": "4.26.1", "@types/mocha": "7.0.2", "@types/node": "14.14.43", - "@types/shimmer": "1.0.1", "codecov": "3.8.1", "cross-env": "7.0.3", "gts": "3.1.0", @@ -65,6 +63,7 @@ "dependencies": { "@opentelemetry/api": "^1.0.0-rc.0", "@opentelemetry/instrumentation": "^0.19.0", - "@opentelemetry/semantic-conventions": "^0.19.0" + "@opentelemetry/semantic-conventions": "^0.19.0", + "@types/ioredis": "4.26.0" } } diff --git a/plugins/node/opentelemetry-instrumentation-koa/package.json b/plugins/node/opentelemetry-instrumentation-koa/package.json index da41d1e00a5..1e2c3d6c392 100644 --- a/plugins/node/opentelemetry-instrumentation-koa/package.json +++ b/plugins/node/opentelemetry-instrumentation-koa/package.json @@ -47,8 +47,6 @@ "@opentelemetry/context-async-hooks": "0.19.0", "@opentelemetry/node": "0.19.0", "@opentelemetry/tracing": "0.19.0", - "@types/koa": "2.13.1", - "@types/koa__router": "8.0.4", "@types/mocha": "7.0.2", "@types/node": "12.20.11", "codecov": "3.8.1", @@ -63,6 +61,8 @@ "dependencies": { "@opentelemetry/api": "^1.0.0-rc.0", "@opentelemetry/instrumentation": "^0.19.0", - "@opentelemetry/semantic-conventions": "^0.19.0" + "@opentelemetry/semantic-conventions": "^0.19.0", + "@types/koa": "2.13.1", + "@types/koa__router": "8.0.4" } } diff --git a/plugins/node/opentelemetry-instrumentation-mongodb/package.json b/plugins/node/opentelemetry-instrumentation-mongodb/package.json index 600274dd7ad..bdaf3a30327 100644 --- a/plugins/node/opentelemetry-instrumentation-mongodb/package.json +++ b/plugins/node/opentelemetry-instrumentation-mongodb/package.json @@ -47,7 +47,6 @@ "@opentelemetry/node": "0.19.0", "@opentelemetry/tracing": "0.19.0", "@types/mocha": "7.0.2", - "@types/mongodb": "3.6.12", "@types/node": "14.14.43", "codecov": "3.8.1", "gts": "3.1.0", @@ -61,6 +60,7 @@ "dependencies": { "@opentelemetry/api": "^1.0.0-rc.0", "@opentelemetry/instrumentation": "^0.19.0", - "@opentelemetry/semantic-conventions": "^0.19.0" + "@opentelemetry/semantic-conventions": "^0.19.0", + "@types/mongodb": "3.6.12" } } diff --git a/plugins/node/opentelemetry-instrumentation-mysql/package.json b/plugins/node/opentelemetry-instrumentation-mysql/package.json index 98639bc45b8..9382004acaf 100644 --- a/plugins/node/opentelemetry-instrumentation-mysql/package.json +++ b/plugins/node/opentelemetry-instrumentation-mysql/package.json @@ -45,7 +45,6 @@ "@opentelemetry/test-utils": "^0.16.0", "@opentelemetry/tracing": "0.19.0", "@types/mocha": "7.0.2", - "@types/mysql": "2.15.18", "@types/node": "14.14.43", "codecov": "3.8.1", "gts": "3.1.0", @@ -59,6 +58,7 @@ "dependencies": { "@opentelemetry/api": "^1.0.0-rc.0", "@opentelemetry/instrumentation": "^0.19.0", - "@opentelemetry/semantic-conventions": "^0.19.0" + "@opentelemetry/semantic-conventions": "^0.19.0", + "@types/mysql": "2.15.18" } } diff --git a/plugins/node/opentelemetry-instrumentation-pg/package.json b/plugins/node/opentelemetry-instrumentation-pg/package.json index dd430b98d50..656f59630b4 100644 --- a/plugins/node/opentelemetry-instrumentation-pg/package.json +++ b/plugins/node/opentelemetry-instrumentation-pg/package.json @@ -53,8 +53,6 @@ "@opentelemetry/tracing": "0.19.0", "@types/mocha": "7.0.2", "@types/node": "14.14.43", - "@types/pg": "7.14.11", - "@types/pg-pool": "2.0.2", "codecov": "3.8.1", "cross-env": "7.0.3", "gts": "3.1.0", @@ -69,6 +67,8 @@ "dependencies": { "@opentelemetry/api": "^1.0.0-rc.0", "@opentelemetry/instrumentation": "^0.19.0", - "@opentelemetry/semantic-conventions": "^0.19.0" + "@opentelemetry/semantic-conventions": "^0.19.0", + "@types/pg": "7.14.11", + "@types/pg-pool": "2.0.2" } } diff --git a/plugins/node/opentelemetry-instrumentation-pino/package.json b/plugins/node/opentelemetry-instrumentation-pino/package.json index e731dbeb6b3..9c39e6ca108 100644 --- a/plugins/node/opentelemetry-instrumentation-pino/package.json +++ b/plugins/node/opentelemetry-instrumentation-pino/package.json @@ -47,7 +47,6 @@ "@opentelemetry/tracing": "0.19.0", "@types/mocha": "7.0.2", "@types/node": "14.14.43", - "@types/pino": "6.3.8", "@types/semver": "7.3.5", "@types/sinon": "9.0.11", "codecov": "3.8.1", @@ -64,6 +63,7 @@ "dependencies": { "@opentelemetry/api": "^1.0.0-rc.0", "@opentelemetry/instrumentation": "^0.19.0", - "semver": "^7.3.5" + "semver": "^7.3.5", + "@types/pino": "6.3.8" } } diff --git a/plugins/node/opentelemetry-instrumentation-redis/package.json b/plugins/node/opentelemetry-instrumentation-redis/package.json index 91753c361ac..c44742b1699 100644 --- a/plugins/node/opentelemetry-instrumentation-redis/package.json +++ b/plugins/node/opentelemetry-instrumentation-redis/package.json @@ -49,7 +49,6 @@ "@opentelemetry/tracing": "0.19.0", "@types/mocha": "7.0.2", "@types/node": "14.14.43", - "@types/redis": "2.8.28", "codecov": "3.8.1", "cross-env": "7.0.3", "gts": "3.1.0", @@ -63,6 +62,7 @@ "dependencies": { "@opentelemetry/api": "^1.0.0-rc.0", "@opentelemetry/instrumentation": "^0.19.0", - "@opentelemetry/semantic-conventions": "^0.19.0" + "@opentelemetry/semantic-conventions": "^0.19.0", + "@types/redis": "2.8.28" } } diff --git a/plugins/node/opentelemetry-instrumentation-restify/package.json b/plugins/node/opentelemetry-instrumentation-restify/package.json index 0c9937c21a9..85a44efea90 100644 --- a/plugins/node/opentelemetry-instrumentation-restify/package.json +++ b/plugins/node/opentelemetry-instrumentation-restify/package.json @@ -46,7 +46,6 @@ "@opentelemetry/tracing": "0.19.0", "@types/mocha": "7.0.2", "@types/node": "14.14.43", - "@types/restify": "4.3.7", "codecov": "3.8.1", "gts": "3.1.0", "mocha": "7.2.0", @@ -59,6 +58,7 @@ "dependencies": { "@opentelemetry/api": "^1.0.0-rc.0", "@opentelemetry/instrumentation": "^0.19.0", - "@opentelemetry/semantic-conventions": "^0.19.0" + "@opentelemetry/semantic-conventions": "^0.19.0", + "@types/restify": "4.3.7" } } diff --git a/plugins/web/opentelemetry-instrumentation-user-interaction/package.json b/plugins/web/opentelemetry-instrumentation-user-interaction/package.json index 88f1c973e33..88d6efe0616 100644 --- a/plugins/web/opentelemetry-instrumentation-user-interaction/package.json +++ b/plugins/web/opentelemetry-instrumentation-user-interaction/package.json @@ -54,7 +54,6 @@ "@types/jquery": "3.5.5", "@types/mocha": "7.0.2", "@types/node": "14.14.43", - "@types/shimmer": "1.0.1", "@types/sinon": "9.0.11", "@types/webpack-env": "1.16.0", "babel-loader": "8.2.2",