From 9ab9cfa5c383922e928eab12bb9d2db8972af65b Mon Sep 17 00:00:00 2001 From: Rauno Viskus Date: Tue, 7 Sep 2021 18:44:33 +0300 Subject: [PATCH 1/6] chore: use renamed packages --- package-lock.json | 131 ++++++++++++------ package.json | 6 +- src/SplunkBatchSpanProcessor.ts | 4 +- src/instrumentations/logging.ts | 2 +- src/options.ts | 4 +- src/tracing.ts | 2 +- test/exporter.test.ts | 2 +- test/options.test.ts | 2 +- test/propagation.test.ts | 5 +- .../tracing.jaeger-thrift-http.test.ts | 4 +- .../tracing.jaeger-thrift-splunk.test.ts | 4 +- test/tracing/tracing.test.ts | 4 +- 12 files changed, 110 insertions(+), 60 deletions(-) diff --git a/package-lock.json b/package-lock.json index 7783151c..6179cfee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -978,9 +978,9 @@ "dev": true }, "@opentelemetry/api": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.2.tgz", - "integrity": "sha512-DCF9oC89ao8/EJUqrp/beBlDR8Bp2R43jqtzayqCoomIvkwTuPfLcHdVhIGRR69GFlkykFjcDW+V92t0AS7Tww==" + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@opentelemetry/api/-/api-1.0.3.tgz", + "integrity": "sha512-puWxACExDe9nxbBB3lOymQFrLYml2dVOrd7USiVRnSbgXE+KwBu+HxFvxrzfqsiSda9IWsXJG1ef7C1O2/GmKQ==" }, "@opentelemetry/api-metrics": { "version": "0.24.0", @@ -1270,26 +1270,6 @@ } } }, - "@opentelemetry/node": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/node/-/node-0.23.0.tgz", - "integrity": "sha512-StG3UQmcm/D6ZCoiAvNcFN1K9pm4zIf+uzS7L2HToOh83iwjvBYuMDwMPNTSH8eKM+2+OYOVtud4bn9wF5aLGA==", - "requires": { - "@opentelemetry/context-async-hooks": "0.23.0", - "@opentelemetry/core": "0.23.0", - "@opentelemetry/propagator-b3": "0.23.0", - "@opentelemetry/propagator-jaeger": "0.23.0", - "@opentelemetry/tracing": "0.23.0", - "semver": "^7.1.3" - }, - "dependencies": { - "@opentelemetry/context-async-hooks": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-0.23.0.tgz", - "integrity": "sha512-aM+sSnNe5GL66KaHx4QJFVOvK817LE32bhc29BW9KlamieqxfDnSelPoNPra85FWlxzLXPGowU7sW5rexSRAtA==" - } - } - }, "@opentelemetry/propagator-b3": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-0.23.0.tgz", @@ -1298,14 +1278,6 @@ "@opentelemetry/core": "0.23.0" } }, - "@opentelemetry/propagator-jaeger": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-0.23.0.tgz", - "integrity": "sha512-N94k3dwnA4KeTUp2BE2ytADp4XYU4EWreo1tVwBVDpowjXY9WkVsDsZD6QA/PUvJJQZCzexSS5ERnHGoVRcOmQ==", - "requires": { - "@opentelemetry/core": "0.23.0" - } - }, "@opentelemetry/resources": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.23.0.tgz", @@ -1315,22 +1287,97 @@ "@opentelemetry/semantic-conventions": "0.23.0" } }, + "@opentelemetry/sdk-trace-base": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-base/-/sdk-trace-base-0.25.0.tgz", + "integrity": "sha512-TInkLSF/ThM3GNVM+9tgnCVjyNLnRxvAkG585Fhu0HNwaEtCTUwI0r7AvMRIREOreeRWttBG6kvT0LOKdo8yjw==", + "requires": { + "@opentelemetry/core": "0.25.0", + "@opentelemetry/resources": "0.25.0", + "@opentelemetry/semantic-conventions": "0.25.0", + "lodash.merge": "^4.6.2" + }, + "dependencies": { + "@opentelemetry/core": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-0.25.0.tgz", + "integrity": "sha512-8OTWF4vfCENU112XB5ElLqf0eq/FhsY0SBvvY65vB3+fbZ2Oi+CPsRASrUZWGtC9MJ5rK2lBlY+/jI4a/NPPBg==", + "requires": { + "@opentelemetry/semantic-conventions": "0.25.0", + "semver": "^7.3.5" + } + }, + "@opentelemetry/resources": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.25.0.tgz", + "integrity": "sha512-O46u53vDBlxCML8O9dIjsRcCC2VT5ri1upwhp02ITobgJ16aVD/iScCo1lPl/x2E7yq9uwzMINENiiYZRFb6XA==", + "requires": { + "@opentelemetry/core": "0.25.0", + "@opentelemetry/semantic-conventions": "0.25.0" + } + }, + "@opentelemetry/semantic-conventions": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.25.0.tgz", + "integrity": "sha512-V3N+MDBiv0TUlorbgiSqk6CvcP876CYUk/41Tg6s8OIyvniTwprE6vPvFQayuABiVkGlHOxv1Mlvp0w4qNdnVg==" + } + } + }, + "@opentelemetry/sdk-trace-node": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-trace-node/-/sdk-trace-node-0.25.0.tgz", + "integrity": "sha512-j3bI3uhopgowdrJWIWkee/W5j0zeNk5Wydi7YGLayci+g/Ue3QYJaKlqaK2V7Rda1N8GY5d+k1CGQ3vE0DCOoQ==", + "requires": { + "@opentelemetry/context-async-hooks": "0.25.0", + "@opentelemetry/core": "0.25.0", + "@opentelemetry/propagator-b3": "0.25.0", + "@opentelemetry/propagator-jaeger": "0.25.0", + "@opentelemetry/sdk-trace-base": "0.25.0", + "semver": "^7.3.5" + }, + "dependencies": { + "@opentelemetry/context-async-hooks": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-0.25.0.tgz", + "integrity": "sha512-XNjlBalbN82qCfkgPpof6g3oU/LZoyoGGrluA+cy4AKWjJ9FdEZqKwX2p2WHxEuWm8TrHh5HxqEXH5OH2o/5tw==" + }, + "@opentelemetry/core": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-0.25.0.tgz", + "integrity": "sha512-8OTWF4vfCENU112XB5ElLqf0eq/FhsY0SBvvY65vB3+fbZ2Oi+CPsRASrUZWGtC9MJ5rK2lBlY+/jI4a/NPPBg==", + "requires": { + "@opentelemetry/semantic-conventions": "0.25.0", + "semver": "^7.3.5" + } + }, + "@opentelemetry/propagator-b3": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-0.25.0.tgz", + "integrity": "sha512-FMdy4YOZO56w2+pxsXWARWa+2F8N7fHW+ZfSFB937Q/oyOZ/2dhj3Ep12gqIH/qV6+kAblgiqOAMyOcnwBCUog==", + "requires": { + "@opentelemetry/core": "0.25.0" + } + }, + "@opentelemetry/propagator-jaeger": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-jaeger/-/propagator-jaeger-0.25.0.tgz", + "integrity": "sha512-GipAgda8xTQa5YrnCQBzWVcUQO7vMsz2AROFse3QXnmgdKz07bIBQFqQLXvr4SHr38LiOVpZWe7Nvfqtuz/0HA==", + "requires": { + "@opentelemetry/core": "0.25.0" + } + }, + "@opentelemetry/semantic-conventions": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.25.0.tgz", + "integrity": "sha512-V3N+MDBiv0TUlorbgiSqk6CvcP876CYUk/41Tg6s8OIyvniTwprE6vPvFQayuABiVkGlHOxv1Mlvp0w4qNdnVg==" + } + } + }, "@opentelemetry/semantic-conventions": { "version": "0.23.0", "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.23.0.tgz", "integrity": "sha512-Tzo+VGR1zlzLbjVI+7mlDJ2xuaUsue4scWvFlK+fzcUfn9siF4NWbxoC2X6Br2B/g4dsq1OAwAYsPVYIEoY2rQ==" }, - "@opentelemetry/tracing": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/tracing/-/tracing-0.23.0.tgz", - "integrity": "sha512-3vNLS55bE0CG1RBDz7+wAAKpLjbl8fhQKqM4MvTy/LYHSolgyM5BNutSb/TcA9LtWvkdI0djgFXxeRig1OFqoQ==", - "requires": { - "@opentelemetry/core": "0.23.0", - "@opentelemetry/resources": "0.23.0", - "@opentelemetry/semantic-conventions": "0.23.0", - "lodash.merge": "^4.6.2" - } - }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", diff --git a/package.json b/package.json index a1f69647..3e900b1f 100644 --- a/package.json +++ b/package.json @@ -90,17 +90,17 @@ "winston": "3.3.3" }, "dependencies": { - "@opentelemetry/api": "^1.0.2", + "@opentelemetry/api": "^1.0.3", "@opentelemetry/context-async-hooks": "~0.24.0", "@opentelemetry/core": "~0.23.0", "@opentelemetry/exporter-collector-proto": "^0.24.0", "@opentelemetry/exporter-jaeger": "^0.24.0", "@opentelemetry/instrumentation": "~0.23.0", - "@opentelemetry/node": "~0.23.0", "@opentelemetry/propagator-b3": "~0.23.0", "@opentelemetry/resources": "~0.23.0", + "@opentelemetry/sdk-trace-base": "^0.25.0", + "@opentelemetry/sdk-trace-node": "^0.25.0", "@opentelemetry/semantic-conventions": "~0.23.0", - "@opentelemetry/tracing": "~0.23.0", "@types/sonic-boom": "^0.7.0", "jaeger-client": "^3.18.1", "semver": "^7.3.5" diff --git a/src/SplunkBatchSpanProcessor.ts b/src/SplunkBatchSpanProcessor.ts index dc68a65f..1683119e 100644 --- a/src/SplunkBatchSpanProcessor.ts +++ b/src/SplunkBatchSpanProcessor.ts @@ -14,8 +14,8 @@ * limitations under the License. */ import { context, Context, propagation } from '@opentelemetry/api'; -import { Span } from '@opentelemetry/tracing'; -import { BatchSpanProcessor } from '@opentelemetry/tracing'; +import { Span } from '@opentelemetry/sdk-trace-base'; +import { BatchSpanProcessor } from '@opentelemetry/sdk-trace-base'; export const SYNTHETIC_RUN_ID_FIELD = 'Synthetics-RunId'; diff --git a/src/instrumentations/logging.ts b/src/instrumentations/logging.ts index 52d442c5..9f400518 100644 --- a/src/instrumentations/logging.ts +++ b/src/instrumentations/logging.ts @@ -15,7 +15,7 @@ */ import { Options } from '../options'; -import { Span } from '@opentelemetry/tracing'; +import { Span } from '@opentelemetry/sdk-trace-base'; import { ResourceAttributes } from '@opentelemetry/semantic-conventions'; // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/src/options.ts b/src/options.ts index 1fcaa100..8ef24b1b 100644 --- a/src/options.ts +++ b/src/options.ts @@ -16,7 +16,7 @@ import * as assert from 'assert'; import * as util from 'util'; -import { SpanExporter, SpanProcessor } from '@opentelemetry/tracing'; +import { SpanExporter, SpanProcessor } from '@opentelemetry/sdk-trace-base'; import { InstrumentationOption } from '@opentelemetry/instrumentation'; import { B3Propagator, B3InjectEncoding } from '@opentelemetry/propagator-b3'; @@ -24,7 +24,7 @@ import { getInstrumentations } from './instrumentations'; import { CollectorTraceExporter } from '@opentelemetry/exporter-collector-proto'; import { JaegerExporter } from '@opentelemetry/exporter-jaeger'; import { EnvResourceDetector } from './resource'; -import { NodeTracerConfig } from '@opentelemetry/node'; +import { NodeTracerConfig } from '@opentelemetry/sdk-trace-node'; import { ResourceAttributes } from '@opentelemetry/semantic-conventions'; import { TextMapPropagator } from '@opentelemetry/api'; import { diff --git a/src/tracing.ts b/src/tracing.ts index 59a44f82..212283d6 100644 --- a/src/tracing.ts +++ b/src/tracing.ts @@ -15,7 +15,7 @@ */ import { context, propagation, trace } from '@opentelemetry/api'; -import { NodeTracerProvider } from '@opentelemetry/node'; +import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { registerInstrumentations } from '@opentelemetry/instrumentation'; import { configureHttpInstrumentation } from './instrumentations/http'; diff --git a/test/exporter.test.ts b/test/exporter.test.ts index 63380702..5c93fd16 100644 --- a/test/exporter.test.ts +++ b/test/exporter.test.ts @@ -20,7 +20,7 @@ import { Span, SimpleSpanProcessor, BasicTracerProvider, -} from '@opentelemetry/tracing'; +} from '@opentelemetry/sdk-trace-base'; const { trace, SpanKind, diff --git a/test/options.test.ts b/test/options.test.ts index 9f6bac0e..705384b2 100644 --- a/test/options.test.ts +++ b/test/options.test.ts @@ -24,7 +24,7 @@ import { SpanExporter, SpanProcessor, InMemorySpanExporter, -} from '@opentelemetry/tracing'; +} from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; import * as sinon from 'sinon'; diff --git a/test/propagation.test.ts b/test/propagation.test.ts index ee15a39c..c7451c38 100644 --- a/test/propagation.test.ts +++ b/test/propagation.test.ts @@ -26,7 +26,10 @@ import { } from '@opentelemetry/api'; import { startTracing, stopTracing } from '../src/tracing'; import { CompositePropagator, RandomIdGenerator } from '@opentelemetry/core'; -import { InMemorySpanExporter, SpanProcessor } from '@opentelemetry/tracing'; +import { + InMemorySpanExporter, + SpanProcessor, +} from '@opentelemetry/sdk-trace-base'; import { SYNTHETIC_RUN_ID_FIELD } from '../src/SplunkBatchSpanProcessor'; import { defaultSpanProcessorFactory } from '../src/options'; import * as utils from './utils'; diff --git a/test/tracing/tracing.jaeger-thrift-http.test.ts b/test/tracing/tracing.jaeger-thrift-http.test.ts index cdf086f5..cd5afa1a 100644 --- a/test/tracing/tracing.jaeger-thrift-http.test.ts +++ b/test/tracing/tracing.jaeger-thrift-http.test.ts @@ -21,8 +21,8 @@ import { SimpleSpanProcessor, ConsoleSpanExporter, InMemorySpanExporter, -} from '@opentelemetry/tracing'; -import { NodeTracerProvider } from '@opentelemetry/node'; +} from '@opentelemetry/sdk-trace-base'; +import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { JaegerExporter } from '@opentelemetry/exporter-jaeger'; import { startTracing, stopTracing } from '../../src/tracing'; diff --git a/test/tracing/tracing.jaeger-thrift-splunk.test.ts b/test/tracing/tracing.jaeger-thrift-splunk.test.ts index 9f727aed..b7889c29 100644 --- a/test/tracing/tracing.jaeger-thrift-splunk.test.ts +++ b/test/tracing/tracing.jaeger-thrift-splunk.test.ts @@ -21,8 +21,8 @@ import { SimpleSpanProcessor, ConsoleSpanExporter, InMemorySpanExporter, -} from '@opentelemetry/tracing'; -import { NodeTracerProvider } from '@opentelemetry/node'; +} from '@opentelemetry/sdk-trace-base'; +import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { JaegerExporter } from '@opentelemetry/exporter-jaeger'; import { startTracing, stopTracing } from '../../src/tracing'; diff --git a/test/tracing/tracing.test.ts b/test/tracing/tracing.test.ts index 3d8262cf..6486593a 100644 --- a/test/tracing/tracing.test.ts +++ b/test/tracing/tracing.test.ts @@ -21,8 +21,8 @@ import { SimpleSpanProcessor, ConsoleSpanExporter, InMemorySpanExporter, -} from '@opentelemetry/tracing'; -import { NodeTracerProvider } from '@opentelemetry/node'; +} from '@opentelemetry/sdk-trace-base'; +import { NodeTracerProvider } from '@opentelemetry/sdk-trace-node'; import { CollectorTraceExporter } from '@opentelemetry/exporter-collector-proto'; import { startTracing, stopTracing } from '../../src/tracing'; From f5c1a8dd53fb98ddda7fd14f36a3405fed01806c Mon Sep 17 00:00:00 2001 From: Rauno Viskus Date: Tue, 7 Sep 2021 18:59:26 +0300 Subject: [PATCH 2/6] chore: update OTel deps --- package-lock.json | 312 +++++++++++--------------------- package.json | 18 +- src/instrumentations/logging.ts | 10 +- src/options.ts | 10 +- test/options.test.ts | 6 +- 5 files changed, 127 insertions(+), 229 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6179cfee..e67debab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -985,182 +985,82 @@ "@opentelemetry/api-metrics": { "version": "0.24.0", "resolved": "https://registry.npmjs.org/@opentelemetry/api-metrics/-/api-metrics-0.24.0.tgz", - "integrity": "sha512-hdpkMeVlRGTuMshD2ZFaDjA/U0cZTkxUkJFvS/4yOiWfw+kEASmGE+U0/i9lbdQKuCR7X1rXSjbcYumlHcMG+A==" + "integrity": "sha512-hdpkMeVlRGTuMshD2ZFaDjA/U0cZTkxUkJFvS/4yOiWfw+kEASmGE+U0/i9lbdQKuCR7X1rXSjbcYumlHcMG+A==", + "dev": true }, "@opentelemetry/context-async-hooks": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-0.24.0.tgz", - "integrity": "sha512-Db8AgMByBEFKLJGSUBlNq4Un/Tqzj5W0hTxx3hIic8DvBwqbvUvkMGuiQYLKE2Ay21cLYMT01xK4TEKz0OxADw==" + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/context-async-hooks/-/context-async-hooks-0.25.0.tgz", + "integrity": "sha512-XNjlBalbN82qCfkgPpof6g3oU/LZoyoGGrluA+cy4AKWjJ9FdEZqKwX2p2WHxEuWm8TrHh5HxqEXH5OH2o/5tw==" }, "@opentelemetry/core": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-0.23.0.tgz", - "integrity": "sha512-7COVsnGEW96ITjc0waWYo/R27sFqjPUg4SCoP8XL48zAGr9zjzeuJoQe/xVchs7op//qOeeEEeBxiBvXy2QS0Q==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-0.25.0.tgz", + "integrity": "sha512-8OTWF4vfCENU112XB5ElLqf0eq/FhsY0SBvvY65vB3+fbZ2Oi+CPsRASrUZWGtC9MJ5rK2lBlY+/jI4a/NPPBg==", "requires": { - "@opentelemetry/semantic-conventions": "0.23.0", - "semver": "^7.1.3" + "@opentelemetry/semantic-conventions": "0.25.0", + "semver": "^7.3.5" } }, "@opentelemetry/exporter-collector": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-collector/-/exporter-collector-0.24.0.tgz", - "integrity": "sha512-lI/oW7JkGisUofY4g+YmgGSlHuHgjteqRj539IIugmd3/RlY8j2mmAfRK4bwcODTBrxzA8X8Ty/Yh8Ljg18c8Q==", - "requires": { - "@opentelemetry/api-metrics": "0.24.0", - "@opentelemetry/core": "0.24.0", - "@opentelemetry/metrics": "0.24.0", - "@opentelemetry/resources": "0.24.0", - "@opentelemetry/tracing": "0.24.0" + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-collector/-/exporter-collector-0.25.0.tgz", + "integrity": "sha512-xZYstLt4hz1aTloJaepWdjMMf9305MqwqbUWjcU/X9pOxvgFWRlchO6x/HQTw7ow0i/S+ShzC+greKnb+1WvLA==", + "requires": { + "@opentelemetry/api-metrics": "0.25.0", + "@opentelemetry/core": "0.25.0", + "@opentelemetry/resources": "0.25.0", + "@opentelemetry/sdk-metrics-base": "0.25.0", + "@opentelemetry/sdk-trace-base": "0.25.0" }, "dependencies": { - "@opentelemetry/core": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-0.24.0.tgz", - "integrity": "sha512-KpsfxBbFTZT9zaB4Es/fFLbvSzVl9Io/8UUu/TYl4/HgqkmyVInNlWTgRiKyz9nsHzFpGP1kdZJj+YIut0IFsw==", - "requires": { - "@opentelemetry/semantic-conventions": "0.24.0", - "semver": "^7.1.3" - } - }, - "@opentelemetry/resources": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.24.0.tgz", - "integrity": "sha512-uEr2m13IRkjQAjX6fsYqJ21aONCspRvuQunaCl8LbH1NS1Gj82TuRUHF6TM82ulBPK8pU+nrrqXKuky2cMcIzw==", - "requires": { - "@opentelemetry/core": "0.24.0", - "@opentelemetry/semantic-conventions": "0.24.0" - } - }, - "@opentelemetry/semantic-conventions": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.24.0.tgz", - "integrity": "sha512-a/szuMQV0Quy0/M7kKdglcbRSoorleyyOwbTNNJ32O+RBN766wbQlMTvdimImTmwYWGr+NJOni1EcC242WlRcA==" - }, - "@opentelemetry/tracing": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/tracing/-/tracing-0.24.0.tgz", - "integrity": "sha512-sTLEs1SIon3xV8vLe53PzfbU0FahoxL9NPY/CYvA1mwGbMu4zHkHAjqy1Tc8JmqRrfa+XrHkmzeSM4hrvloBaA==", - "requires": { - "@opentelemetry/core": "0.24.0", - "@opentelemetry/resources": "0.24.0", - "@opentelemetry/semantic-conventions": "0.24.0", - "lodash.merge": "^4.6.2" - } + "@opentelemetry/api-metrics": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-metrics/-/api-metrics-0.25.0.tgz", + "integrity": "sha512-9T0c9NQAEGRujUC7HzPa2/qZ5px/UvB2sfSU5CAKFRrAlDl2gn25B0oUbDqSRHW/IG1X2rnQ3z2bBQkJyJvE4g==" } } }, "@opentelemetry/exporter-collector-proto": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-collector-proto/-/exporter-collector-proto-0.24.0.tgz", - "integrity": "sha512-R50QDmz8Ufswj40qfSBDhXUToAdRfwIPMXCmw04pTkcIDv+9aBA6G5MemZgFddUaUyX8Bmf7FEvWqPqigEGrww==", - "requires": { - "@grpc/proto-loader": "^0.6.0", - "@opentelemetry/core": "0.24.0", - "@opentelemetry/exporter-collector": "0.24.0", - "@opentelemetry/metrics": "0.24.0", - "@opentelemetry/resources": "0.24.0", - "@opentelemetry/tracing": "0.24.0", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-collector-proto/-/exporter-collector-proto-0.25.0.tgz", + "integrity": "sha512-yNNXze8hYNdRVLBfhCmKhRY4siFLXpzUFbIQq6pjtXsLC5gCf/P/Ba0KUDfQIReqSEJkayi7WvTe74b3EeilTg==", + "requires": { + "@grpc/proto-loader": "^0.6.4", + "@opentelemetry/core": "0.25.0", + "@opentelemetry/exporter-collector": "0.25.0", + "@opentelemetry/resources": "0.25.0", + "@opentelemetry/sdk-metrics-base": "0.25.0", + "@opentelemetry/sdk-trace-base": "0.25.0", "protobufjs": "^6.9.0" - }, - "dependencies": { - "@opentelemetry/core": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-0.24.0.tgz", - "integrity": "sha512-KpsfxBbFTZT9zaB4Es/fFLbvSzVl9Io/8UUu/TYl4/HgqkmyVInNlWTgRiKyz9nsHzFpGP1kdZJj+YIut0IFsw==", - "requires": { - "@opentelemetry/semantic-conventions": "0.24.0", - "semver": "^7.1.3" - } - }, - "@opentelemetry/resources": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.24.0.tgz", - "integrity": "sha512-uEr2m13IRkjQAjX6fsYqJ21aONCspRvuQunaCl8LbH1NS1Gj82TuRUHF6TM82ulBPK8pU+nrrqXKuky2cMcIzw==", - "requires": { - "@opentelemetry/core": "0.24.0", - "@opentelemetry/semantic-conventions": "0.24.0" - } - }, - "@opentelemetry/semantic-conventions": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.24.0.tgz", - "integrity": "sha512-a/szuMQV0Quy0/M7kKdglcbRSoorleyyOwbTNNJ32O+RBN766wbQlMTvdimImTmwYWGr+NJOni1EcC242WlRcA==" - }, - "@opentelemetry/tracing": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/tracing/-/tracing-0.24.0.tgz", - "integrity": "sha512-sTLEs1SIon3xV8vLe53PzfbU0FahoxL9NPY/CYvA1mwGbMu4zHkHAjqy1Tc8JmqRrfa+XrHkmzeSM4hrvloBaA==", - "requires": { - "@opentelemetry/core": "0.24.0", - "@opentelemetry/resources": "0.24.0", - "@opentelemetry/semantic-conventions": "0.24.0", - "lodash.merge": "^4.6.2" - } - } } }, "@opentelemetry/exporter-jaeger": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-jaeger/-/exporter-jaeger-0.24.0.tgz", - "integrity": "sha512-k9XN+he1KPzWTsyhaMouK2s8svylvaKmBkC4xejl8llyRfjvc7X0yeMsc1Fk3pVlnqYPyvB7phS2MWtxujWkzw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/exporter-jaeger/-/exporter-jaeger-0.25.0.tgz", + "integrity": "sha512-ybCCBHNKMfW2oZy61Mdir0U4ikIwBCa4eNPGepYyUuvO+TbprWi5zBmGEtinlgkVKK3L1HTGMwpRPnnjxm41nA==", "requires": { - "@opentelemetry/core": "0.24.0", - "@opentelemetry/semantic-conventions": "0.24.0", - "@opentelemetry/tracing": "0.24.0", + "@opentelemetry/core": "0.25.0", + "@opentelemetry/sdk-trace-base": "0.25.0", + "@opentelemetry/semantic-conventions": "0.25.0", "jaeger-client": "^3.15.0" - }, - "dependencies": { - "@opentelemetry/core": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-0.24.0.tgz", - "integrity": "sha512-KpsfxBbFTZT9zaB4Es/fFLbvSzVl9Io/8UUu/TYl4/HgqkmyVInNlWTgRiKyz9nsHzFpGP1kdZJj+YIut0IFsw==", - "requires": { - "@opentelemetry/semantic-conventions": "0.24.0", - "semver": "^7.1.3" - } - }, - "@opentelemetry/resources": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.24.0.tgz", - "integrity": "sha512-uEr2m13IRkjQAjX6fsYqJ21aONCspRvuQunaCl8LbH1NS1Gj82TuRUHF6TM82ulBPK8pU+nrrqXKuky2cMcIzw==", - "requires": { - "@opentelemetry/core": "0.24.0", - "@opentelemetry/semantic-conventions": "0.24.0" - } - }, - "@opentelemetry/semantic-conventions": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.24.0.tgz", - "integrity": "sha512-a/szuMQV0Quy0/M7kKdglcbRSoorleyyOwbTNNJ32O+RBN766wbQlMTvdimImTmwYWGr+NJOni1EcC242WlRcA==" - }, - "@opentelemetry/tracing": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/tracing/-/tracing-0.24.0.tgz", - "integrity": "sha512-sTLEs1SIon3xV8vLe53PzfbU0FahoxL9NPY/CYvA1mwGbMu4zHkHAjqy1Tc8JmqRrfa+XrHkmzeSM4hrvloBaA==", - "requires": { - "@opentelemetry/core": "0.24.0", - "@opentelemetry/resources": "0.24.0", - "@opentelemetry/semantic-conventions": "0.24.0", - "lodash.merge": "^4.6.2" - } - } } }, "@opentelemetry/instrumentation": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.23.0.tgz", - "integrity": "sha512-1f6js0lIIPAWwR2EKPsUSowP2KloX+tv21QjWWp+BfFUcql+V6lh1RoNaxJWqFbe+BiZH7m+fD7UvJ2bWRQxdQ==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.25.0.tgz", + "integrity": "sha512-G9V2ISxrgUgdckZHZXu+kzeEgC76vRyZXlRdwXOT6VsJKHE+UENnC/502wNtPCFERgWSJ56W/51egkgkcKp6bA==", "requires": { - "@opentelemetry/api-metrics": "0.23.0", + "@opentelemetry/api-metrics": "0.25.0", "require-in-the-middle": "^5.0.3", "semver": "^7.3.2", "shimmer": "^1.2.1" }, "dependencies": { "@opentelemetry/api-metrics": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-metrics/-/api-metrics-0.23.0.tgz", - "integrity": "sha512-MGfH9aMnVktRTagYHvhksrk42vPDjTIz5N6Cxu31t6dgJa6iUYR6MemnOdphyLk73DUaqmR5s2Fn6jg0Xd9gqA==" + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-metrics/-/api-metrics-0.25.0.tgz", + "integrity": "sha512-9T0c9NQAEGRujUC7HzPa2/qZ5px/UvB2sfSU5CAKFRrAlDl2gn25B0oUbDqSRHW/IG1X2rnQ3z2bBQkJyJvE4g==" } } }, @@ -1189,15 +1089,15 @@ } }, "@opentelemetry/instrumentation-http": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.23.0.tgz", - "integrity": "sha512-Dvul+UPSBqeLebC3D5NcReVGAfgl32SeFhDYL6waigi693gpO71BSgfNScCeTxP+PwRyF9AoQCjKGlj5/U/vBw==", + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.25.0.tgz", + "integrity": "sha512-unQsS48RmAD/4za8gm8fvNCjrxq/iVxDJ+qO9PLbijET95ZTnS0FTq8rDS+/p9Q2X1REB1h9PmuCZc+3JehkcA==", "dev": true, "requires": { - "@opentelemetry/core": "0.23.0", - "@opentelemetry/instrumentation": "0.23.0", - "@opentelemetry/semantic-conventions": "0.23.0", - "semver": "^7.1.3" + "@opentelemetry/core": "0.25.0", + "@opentelemetry/instrumentation": "0.25.0", + "@opentelemetry/semantic-conventions": "0.25.0", + "semver": "^7.3.5" } }, "@opentelemetry/instrumentation-pino": { @@ -1209,6 +1109,26 @@ "@opentelemetry/instrumentation": "^0.23.0", "@types/pino": "6.3.8", "semver": "^7.3.5" + }, + "dependencies": { + "@opentelemetry/api-metrics": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-metrics/-/api-metrics-0.23.0.tgz", + "integrity": "sha512-MGfH9aMnVktRTagYHvhksrk42vPDjTIz5N6Cxu31t6dgJa6iUYR6MemnOdphyLk73DUaqmR5s2Fn6jg0Xd9gqA==", + "dev": true + }, + "@opentelemetry/instrumentation": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.23.0.tgz", + "integrity": "sha512-1f6js0lIIPAWwR2EKPsUSowP2KloX+tv21QjWWp+BfFUcql+V6lh1RoNaxJWqFbe+BiZH7m+fD7UvJ2bWRQxdQ==", + "dev": true, + "requires": { + "@opentelemetry/api-metrics": "0.23.0", + "require-in-the-middle": "^5.0.3", + "semver": "^7.3.2", + "shimmer": "^1.2.1" + } + } } }, "@opentelemetry/instrumentation-winston": { @@ -1234,57 +1154,39 @@ } } }, - "@opentelemetry/metrics": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/metrics/-/metrics-0.24.0.tgz", - "integrity": "sha512-QqmQCzrSuJE+sCOJ2xXNhctWPp/Am9ILs0Y01MDS08PRJoK20akKHM7eC4oU8ZdXphMg8rYgW2w7tY8rqvYnJg==", + "@opentelemetry/propagator-b3": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-0.25.0.tgz", + "integrity": "sha512-FMdy4YOZO56w2+pxsXWARWa+2F8N7fHW+ZfSFB937Q/oyOZ/2dhj3Ep12gqIH/qV6+kAblgiqOAMyOcnwBCUog==", "requires": { - "@opentelemetry/api-metrics": "0.24.0", - "@opentelemetry/core": "0.24.0", - "@opentelemetry/resources": "0.24.0", - "lodash.merge": "^4.6.2" - }, - "dependencies": { - "@opentelemetry/core": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-0.24.0.tgz", - "integrity": "sha512-KpsfxBbFTZT9zaB4Es/fFLbvSzVl9Io/8UUu/TYl4/HgqkmyVInNlWTgRiKyz9nsHzFpGP1kdZJj+YIut0IFsw==", - "requires": { - "@opentelemetry/semantic-conventions": "0.24.0", - "semver": "^7.1.3" - } - }, - "@opentelemetry/resources": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.24.0.tgz", - "integrity": "sha512-uEr2m13IRkjQAjX6fsYqJ21aONCspRvuQunaCl8LbH1NS1Gj82TuRUHF6TM82ulBPK8pU+nrrqXKuky2cMcIzw==", - "requires": { - "@opentelemetry/core": "0.24.0", - "@opentelemetry/semantic-conventions": "0.24.0" - } - }, - "@opentelemetry/semantic-conventions": { - "version": "0.24.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.24.0.tgz", - "integrity": "sha512-a/szuMQV0Quy0/M7kKdglcbRSoorleyyOwbTNNJ32O+RBN766wbQlMTvdimImTmwYWGr+NJOni1EcC242WlRcA==" - } + "@opentelemetry/core": "0.25.0" } }, - "@opentelemetry/propagator-b3": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/propagator-b3/-/propagator-b3-0.23.0.tgz", - "integrity": "sha512-bXojPjqncbhZtsX1tmIMB/dVLXI8ByoLLTBSHd5z6vJQA66LYtJX89xlIVZfiwuWIePqUnBJTmGEK95bDem6uw==", + "@opentelemetry/resources": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.25.0.tgz", + "integrity": "sha512-O46u53vDBlxCML8O9dIjsRcCC2VT5ri1upwhp02ITobgJ16aVD/iScCo1lPl/x2E7yq9uwzMINENiiYZRFb6XA==", "requires": { - "@opentelemetry/core": "0.23.0" + "@opentelemetry/core": "0.25.0", + "@opentelemetry/semantic-conventions": "0.25.0" } }, - "@opentelemetry/resources": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/resources/-/resources-0.23.0.tgz", - "integrity": "sha512-sAiaoQ0pOwjaaKySuwCUlvej/W9M5d+SxpcuBFUBUojqRlEAYDbx1FHClPnKtOysIb9rXJDQvM3xlH++7NQQzg==", + "@opentelemetry/sdk-metrics-base": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/sdk-metrics-base/-/sdk-metrics-base-0.25.0.tgz", + "integrity": "sha512-7fwPlAFB5Xw8mnVQfq0wqKNw3RXiAMad9T1bk5Sza9LK/L6hz8RTuHWCsFMsj+1OOSAaiPFuUMYrK1J75+2IAg==", "requires": { - "@opentelemetry/core": "0.23.0", - "@opentelemetry/semantic-conventions": "0.23.0" + "@opentelemetry/api-metrics": "0.25.0", + "@opentelemetry/core": "0.25.0", + "@opentelemetry/resources": "0.25.0", + "lodash.merge": "^4.6.2" + }, + "dependencies": { + "@opentelemetry/api-metrics": { + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/api-metrics/-/api-metrics-0.25.0.tgz", + "integrity": "sha512-9T0c9NQAEGRujUC7HzPa2/qZ5px/UvB2sfSU5CAKFRrAlDl2gn25B0oUbDqSRHW/IG1X2rnQ3z2bBQkJyJvE4g==" + } } }, "@opentelemetry/sdk-trace-base": { @@ -1374,9 +1276,9 @@ } }, "@opentelemetry/semantic-conventions": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.23.0.tgz", - "integrity": "sha512-Tzo+VGR1zlzLbjVI+7mlDJ2xuaUsue4scWvFlK+fzcUfn9siF4NWbxoC2X6Br2B/g4dsq1OAwAYsPVYIEoY2rQ==" + "version": "0.25.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.25.0.tgz", + "integrity": "sha512-V3N+MDBiv0TUlorbgiSqk6CvcP876CYUk/41Tg6s8OIyvniTwprE6vPvFQayuABiVkGlHOxv1Mlvp0w4qNdnVg==" }, "@protobufjs/aspromise": { "version": "1.1.2", @@ -1574,8 +1476,7 @@ "@types/node": { "version": "16.7.8", "resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.8.tgz", - "integrity": "sha512-8upnoQU0OPzbIkm+ZMM0zCeFCkw2s3mS0IWdx0+AAaWqm4fkBb0UJp8Edl7FVKRamYbpJC/aVsHpKWBIbiC7Zg==", - "dev": true + "integrity": "sha512-8upnoQU0OPzbIkm+ZMM0zCeFCkw2s3mS0IWdx0+AAaWqm4fkBb0UJp8Edl7FVKRamYbpJC/aVsHpKWBIbiC7Zg==" }, "@types/normalize-package-data": { "version": "2.4.1", @@ -6149,13 +6050,6 @@ "@types/long": "^4.0.1", "@types/node": ">=13.7.0", "long": "^4.0.0" - }, - "dependencies": { - "@types/node": { - "version": "16.7.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.7.1.tgz", - "integrity": "sha512-ncRdc45SoYJ2H4eWU9ReDfp3vtFqDYhjOsKlFFUDEn8V1Bgr2RjYal8YT5byfadWIRluhPFU6JiDOl0H6Sl87A==" - } } }, "protocols": { diff --git a/package.json b/package.json index 3e900b1f..8c9e1722 100644 --- a/package.json +++ b/package.json @@ -56,7 +56,7 @@ "@commitlint/config-conventional": "^13.1.0", "@octokit/core": "^3.5.1", "@opentelemetry/instrumentation-bunyan": "~0.24.0", - "@opentelemetry/instrumentation-http": "~0.23.0", + "@opentelemetry/instrumentation-http": "^0.25.0", "@opentelemetry/instrumentation-pino": "~0.23.0", "@opentelemetry/instrumentation-winston": "~0.24.0", "@types/bunyan": "1.8.7", @@ -91,16 +91,16 @@ }, "dependencies": { "@opentelemetry/api": "^1.0.3", - "@opentelemetry/context-async-hooks": "~0.24.0", - "@opentelemetry/core": "~0.23.0", - "@opentelemetry/exporter-collector-proto": "^0.24.0", - "@opentelemetry/exporter-jaeger": "^0.24.0", - "@opentelemetry/instrumentation": "~0.23.0", - "@opentelemetry/propagator-b3": "~0.23.0", - "@opentelemetry/resources": "~0.23.0", + "@opentelemetry/context-async-hooks": "^0.25.0", + "@opentelemetry/core": "^0.25.0", + "@opentelemetry/exporter-collector-proto": "^0.25.0", + "@opentelemetry/exporter-jaeger": "^0.25.0", + "@opentelemetry/instrumentation": "^0.25.0", + "@opentelemetry/propagator-b3": "^0.25.0", + "@opentelemetry/resources": "^0.25.0", "@opentelemetry/sdk-trace-base": "^0.25.0", "@opentelemetry/sdk-trace-node": "^0.25.0", - "@opentelemetry/semantic-conventions": "~0.23.0", + "@opentelemetry/semantic-conventions": "^0.25.0", "@types/sonic-boom": "^0.7.0", "jaeger-client": "^3.18.1", "semver": "^7.3.5" diff --git a/src/instrumentations/logging.ts b/src/instrumentations/logging.ts index 9f400518..9cdcb501 100644 --- a/src/instrumentations/logging.ts +++ b/src/instrumentations/logging.ts @@ -16,7 +16,7 @@ import { Options } from '../options'; import { Span } from '@opentelemetry/sdk-trace-base'; -import { ResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; // eslint-disable-next-line @typescript-eslint/no-explicit-any type LogRecord = Record; @@ -39,16 +39,18 @@ export function configureLogInjection( const logHook = (span: Span, record: LogRecord) => { record['service.name'] = - span.resource.attributes[ResourceAttributes.SERVICE_NAME]; + span.resource.attributes[SemanticResourceAttributes.SERVICE_NAME]; const version = - span.resource.attributes[ResourceAttributes.SERVICE_VERSION]; + span.resource.attributes[SemanticResourceAttributes.SERVICE_VERSION]; if (version !== undefined) { record['service.version'] = version; } const environment = - span.resource.attributes[ResourceAttributes.DEPLOYMENT_ENVIRONMENT]; + span.resource.attributes[ + SemanticResourceAttributes.DEPLOYMENT_ENVIRONMENT + ]; if (environment !== undefined) { record['service.environment'] = environment; } diff --git a/src/options.ts b/src/options.ts index 8ef24b1b..8a6918d4 100644 --- a/src/options.ts +++ b/src/options.ts @@ -25,7 +25,7 @@ import { CollectorTraceExporter } from '@opentelemetry/exporter-collector-proto' import { JaegerExporter } from '@opentelemetry/exporter-jaeger'; import { EnvResourceDetector } from './resource'; import { NodeTracerConfig } from '@opentelemetry/sdk-trace-node'; -import { ResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; import { TextMapPropagator } from '@opentelemetry/api'; import { CompositePropagator, @@ -91,12 +91,12 @@ export function _setDefaultOptions(options: Partial = {}): Options { const serviceName = options.serviceName || process.env.OTEL_SERVICE_NAME || - resource.attributes[ResourceAttributes.SERVICE_NAME] || + resource.attributes[SemanticResourceAttributes.SERVICE_NAME] || defaultServiceName; resource = resource.merge( new Resource({ - [ResourceAttributes.SERVICE_NAME]: serviceName, + [SemanticResourceAttributes.SERVICE_NAME]: serviceName, }) ); @@ -122,7 +122,9 @@ export function _setDefaultOptions(options: Partial = {}): Options { return { endpoint: options.endpoint, - serviceName: String(resource.attributes[ResourceAttributes.SERVICE_NAME]), + serviceName: String( + resource.attributes[SemanticResourceAttributes.SERVICE_NAME] + ), accessToken: options.accessToken, maxAttrLength: options.maxAttrLength, serverTimingEnabled: options.serverTimingEnabled, diff --git a/test/options.test.ts b/test/options.test.ts index 705384b2..742bddac 100644 --- a/test/options.test.ts +++ b/test/options.test.ts @@ -18,7 +18,7 @@ import { TextMapPropagator } from '@opentelemetry/api'; import { HttpBaggage } from '@opentelemetry/core'; import { InstrumentationBase } from '@opentelemetry/instrumentation'; import { Resource } from '@opentelemetry/resources'; -import { ResourceAttributes } from '@opentelemetry/semantic-conventions'; +import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions'; import { SimpleSpanProcessor, SpanExporter, @@ -63,7 +63,7 @@ describe('options', () => { instrumentations: [], tracerConfig: { resource: new Resource({ - [ResourceAttributes.SERVICE_NAME]: 'unnamed-node-service', + [SemanticResourceAttributes.SERVICE_NAME]: 'unnamed-node-service', }), }, spanExporterFactory: otlpSpanExporterFactory, @@ -136,7 +136,7 @@ describe('options', () => { assert.deepStrictEqual(options.tracerConfig, { resource: new Resource({ - [ResourceAttributes.SERVICE_NAME]: 'foobar', + [SemanticResourceAttributes.SERVICE_NAME]: 'foobar', }), }); }); From 2a1e72ce63cf82eae95c076b60c673ad5565005a Mon Sep 17 00:00:00 2001 From: Rauno Viskus Date: Tue, 7 Sep 2021 19:26:31 +0300 Subject: [PATCH 3/6] chore: update OTel dev deps --- package-lock.json | 87 +++++++++++++++++++++++++++++++++-------------- package.json | 6 ++-- 2 files changed, 64 insertions(+), 29 deletions(-) diff --git a/package-lock.json b/package-lock.json index e67debab..750672e3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1089,41 +1089,65 @@ } }, "@opentelemetry/instrumentation-http": { - "version": "0.25.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.25.0.tgz", - "integrity": "sha512-unQsS48RmAD/4za8gm8fvNCjrxq/iVxDJ+qO9PLbijET95ZTnS0FTq8rDS+/p9Q2X1REB1h9PmuCZc+3JehkcA==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-http/-/instrumentation-http-0.24.0.tgz", + "integrity": "sha512-LP0Iw24GFZvsAhUUFgmv8beG4vPEhDsgbHXOcGoSxHntnaDOY+5Df8y5CybSdt/DgqtkKr+3bs+TloeTHNu3Tw==", "dev": true, "requires": { - "@opentelemetry/core": "0.25.0", - "@opentelemetry/instrumentation": "0.25.0", - "@opentelemetry/semantic-conventions": "0.25.0", - "semver": "^7.3.5" + "@opentelemetry/core": "0.24.0", + "@opentelemetry/instrumentation": "0.24.0", + "@opentelemetry/semantic-conventions": "0.24.0", + "semver": "^7.1.3" + }, + "dependencies": { + "@opentelemetry/core": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/core/-/core-0.24.0.tgz", + "integrity": "sha512-KpsfxBbFTZT9zaB4Es/fFLbvSzVl9Io/8UUu/TYl4/HgqkmyVInNlWTgRiKyz9nsHzFpGP1kdZJj+YIut0IFsw==", + "dev": true, + "requires": { + "@opentelemetry/semantic-conventions": "0.24.0", + "semver": "^7.1.3" + } + }, + "@opentelemetry/instrumentation": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.24.0.tgz", + "integrity": "sha512-Kn581LUJrVsuV6j8KjNpNWFecyrLoc3GRiTpXUl48LVtm9CCbdwNZGe3PRmWN1Mb/bmWr/tt3GHcuhyUxAsY0A==", + "dev": true, + "requires": { + "@opentelemetry/api-metrics": "0.24.0", + "require-in-the-middle": "^5.0.3", + "semver": "^7.3.2", + "shimmer": "^1.2.1" + } + }, + "@opentelemetry/semantic-conventions": { + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/semantic-conventions/-/semantic-conventions-0.24.0.tgz", + "integrity": "sha512-a/szuMQV0Quy0/M7kKdglcbRSoorleyyOwbTNNJ32O+RBN766wbQlMTvdimImTmwYWGr+NJOni1EcC242WlRcA==", + "dev": true + } } }, "@opentelemetry/instrumentation-pino": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pino/-/instrumentation-pino-0.23.0.tgz", - "integrity": "sha512-TBGlwia/7IYy5q+lIlDOKgt/UPrQ8vUGZrWtSs2uvXFC4FDvrur7E7C/6ZLFcZ3ex4aVZXBUXpsIVlzWtcPkGg==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation-pino/-/instrumentation-pino-0.24.0.tgz", + "integrity": "sha512-Xp6Ct1zN3ut3A+KCvh5OwzJDKkvJsW717zo+8y+4ALkm+80M+xWjXYGe1WqkmAIsiKojMtHq5fPy95NbAKe3Ig==", "dev": true, "requires": { - "@opentelemetry/instrumentation": "^0.23.0", - "@types/pino": "6.3.8", + "@opentelemetry/instrumentation": "^0.24.0", + "@types/pino": "6.3.11", "semver": "^7.3.5" }, "dependencies": { - "@opentelemetry/api-metrics": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/api-metrics/-/api-metrics-0.23.0.tgz", - "integrity": "sha512-MGfH9aMnVktRTagYHvhksrk42vPDjTIz5N6Cxu31t6dgJa6iUYR6MemnOdphyLk73DUaqmR5s2Fn6jg0Xd9gqA==", - "dev": true - }, "@opentelemetry/instrumentation": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.23.0.tgz", - "integrity": "sha512-1f6js0lIIPAWwR2EKPsUSowP2KloX+tv21QjWWp+BfFUcql+V6lh1RoNaxJWqFbe+BiZH7m+fD7UvJ2bWRQxdQ==", + "version": "0.24.0", + "resolved": "https://registry.npmjs.org/@opentelemetry/instrumentation/-/instrumentation-0.24.0.tgz", + "integrity": "sha512-Kn581LUJrVsuV6j8KjNpNWFecyrLoc3GRiTpXUl48LVtm9CCbdwNZGe3PRmWN1Mb/bmWr/tt3GHcuhyUxAsY0A==", "dev": true, "requires": { - "@opentelemetry/api-metrics": "0.23.0", + "@opentelemetry/api-metrics": "0.24.0", "require-in-the-middle": "^5.0.3", "semver": "^7.3.2", "shimmer": "^1.2.1" @@ -1491,15 +1515,26 @@ "dev": true }, "@types/pino": { - "version": "6.3.8", - "resolved": "https://registry.npmjs.org/@types/pino/-/pino-6.3.8.tgz", - "integrity": "sha512-E47CmRy1FNMaCN8r0d8ECQOjXen9O0p6GGsUjLfmawlxRKosZ82WP1oWVKj+ikTkMDHxWzN5BuKmplo44ynrIg==", + "version": "6.3.11", + "resolved": "https://registry.npmjs.org/@types/pino/-/pino-6.3.11.tgz", + "integrity": "sha512-S7+fLONqSpHeW9d7TApUqO6VN47KYgOXhCNKwGBVLHObq8HhaAYlVqUNdfnvoXjCMiwE5xcPm/5R2ZUh8bgaXQ==", "dev": true, "requires": { "@types/node": "*", "@types/pino-pretty": "*", "@types/pino-std-serializers": "*", - "@types/sonic-boom": "*" + "sonic-boom": "^2.1.0" + }, + "dependencies": { + "sonic-boom": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-2.2.3.tgz", + "integrity": "sha512-dm32bzlBchhXoJZe0yLY/kdYsHtXhZphidIcCzJib1aEjfciZyvHJ3NjA1zh6jJCO/OBLfdjc5iw6jLS/Go2fg==", + "dev": true, + "requires": { + "atomic-sleep": "^1.0.0" + } + } } }, "@types/pino-pretty": { diff --git a/package.json b/package.json index 8c9e1722..7dedccee 100644 --- a/package.json +++ b/package.json @@ -55,9 +55,9 @@ "@commitlint/cli": "^13.1.0", "@commitlint/config-conventional": "^13.1.0", "@octokit/core": "^3.5.1", - "@opentelemetry/instrumentation-bunyan": "~0.24.0", - "@opentelemetry/instrumentation-http": "^0.25.0", - "@opentelemetry/instrumentation-pino": "~0.23.0", + "@opentelemetry/instrumentation-bunyan": "^0.24.0", + "@opentelemetry/instrumentation-http": "^0.24.0", + "@opentelemetry/instrumentation-pino": "^0.24.0", "@opentelemetry/instrumentation-winston": "~0.24.0", "@types/bunyan": "1.8.7", "@types/mocha": "9.0.0", From 49a43a84ee10ffb5a3602488c56806ccb66770e7 Mon Sep 17 00:00:00 2001 From: Rauno Viskus Date: Tue, 7 Sep 2021 19:29:54 +0300 Subject: [PATCH 4/6] Change files --- .../@splunk-otel-ba9ac324-9f97-419b-890e-aa3e6b8bd70a.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@splunk-otel-ba9ac324-9f97-419b-890e-aa3e6b8bd70a.json diff --git a/change/@splunk-otel-ba9ac324-9f97-419b-890e-aa3e6b8bd70a.json b/change/@splunk-otel-ba9ac324-9f97-419b-890e-aa3e6b8bd70a.json new file mode 100644 index 00000000..1dc05e0b --- /dev/null +++ b/change/@splunk-otel-ba9ac324-9f97-419b-890e-aa3e6b8bd70a.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Updated OTel dependencies", + "packageName": "@splunk/otel", + "email": "Rauno56@gmail.com", + "dependentChangeType": "patch" +} From 51dfb28adc65cbc52e2da890f185d89c37052998 Mon Sep 17 00:00:00 2001 From: Rauno Viskus Date: Wed, 8 Sep 2021 11:05:36 +0300 Subject: [PATCH 5/6] fix: use patch range for OTel packages --- package.json | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 7dedccee..ba65ef54 100644 --- a/package.json +++ b/package.json @@ -55,9 +55,9 @@ "@commitlint/cli": "^13.1.0", "@commitlint/config-conventional": "^13.1.0", "@octokit/core": "^3.5.1", - "@opentelemetry/instrumentation-bunyan": "^0.24.0", - "@opentelemetry/instrumentation-http": "^0.24.0", - "@opentelemetry/instrumentation-pino": "^0.24.0", + "@opentelemetry/instrumentation-bunyan": "~0.24.0", + "@opentelemetry/instrumentation-http": "~0.24.0", + "@opentelemetry/instrumentation-pino": "~0.24.0", "@opentelemetry/instrumentation-winston": "~0.24.0", "@types/bunyan": "1.8.7", "@types/mocha": "9.0.0", @@ -91,16 +91,16 @@ }, "dependencies": { "@opentelemetry/api": "^1.0.3", - "@opentelemetry/context-async-hooks": "^0.25.0", - "@opentelemetry/core": "^0.25.0", - "@opentelemetry/exporter-collector-proto": "^0.25.0", - "@opentelemetry/exporter-jaeger": "^0.25.0", - "@opentelemetry/instrumentation": "^0.25.0", - "@opentelemetry/propagator-b3": "^0.25.0", - "@opentelemetry/resources": "^0.25.0", - "@opentelemetry/sdk-trace-base": "^0.25.0", - "@opentelemetry/sdk-trace-node": "^0.25.0", - "@opentelemetry/semantic-conventions": "^0.25.0", + "@opentelemetry/context-async-hooks": "~0.25.0", + "@opentelemetry/core": "~0.25.0", + "@opentelemetry/exporter-collector-proto": "~0.25.0", + "@opentelemetry/exporter-jaeger": "~0.25.0", + "@opentelemetry/instrumentation": "~0.25.0", + "@opentelemetry/propagator-b3": "~0.25.0", + "@opentelemetry/resources": "~0.25.0", + "@opentelemetry/sdk-trace-base": "~0.25.0", + "@opentelemetry/sdk-trace-node": "~0.25.0", + "@opentelemetry/semantic-conventions": "~0.25.0", "@types/sonic-boom": "^0.7.0", "jaeger-client": "^3.18.1", "semver": "^7.3.5" From cde4316c8dfa267355d30cda931d0415f7ba685b Mon Sep 17 00:00:00 2001 From: Rauno Viskus Date: Wed, 8 Sep 2021 12:33:08 +0300 Subject: [PATCH 6/6] chore: trigger ci