From 586def466b8722200c084a1400798fad8f68dc6f Mon Sep 17 00:00:00 2001 From: Mend Renovate Date: Mon, 6 Nov 2023 11:27:06 +0100 Subject: [PATCH 1/3] chore(deps): update all patch versions (#4215) --- api/package.json | 6 +- experimental/packages/api-events/package.json | 2 +- experimental/packages/api-logs/package.json | 2 +- .../exporter-logs-otlp-grpc/package.json | 4 +- .../exporter-logs-otlp-http/package.json | 4 +- .../exporter-logs-otlp-proto/package.json | 4 +- .../exporter-trace-otlp-grpc/package.json | 4 +- .../exporter-trace-otlp-http/package.json | 4 +- .../exporter-trace-otlp-proto/package.json | 4 +- .../package.json | 4 +- .../package.json | 4 +- .../package.json | 4 +- .../package.json | 4 +- .../package.json | 4 +- .../package.json | 4 +- .../package.json | 6 +- .../package.json | 12 +- .../package.json | 4 +- .../package.json | 6 +- .../opentelemetry-sdk-node/package.json | 6 +- .../packages/otlp-exporter-base/package.json | 4 +- .../otlp-grpc-exporter-base/package.json | 4 +- .../otlp-proto-exporter-base/package.json | 4 +- .../packages/otlp-transformer/package.json | 2 +- experimental/packages/sdk-logs/package.json | 4 +- .../packages/shim-opencensus/package.json | 4 +- package-lock.json | 474 +++++++++--------- .../package.json | 2 +- .../package.json | 4 +- .../opentelemetry-context-zone/package.json | 4 +- packages/opentelemetry-core/package.json | 4 +- .../package.json | 6 +- .../package.json | 6 +- .../opentelemetry-propagator-b3/package.json | 2 +- .../package.json | 4 +- packages/opentelemetry-resources/package.json | 6 +- .../opentelemetry-sdk-trace-base/package.json | 4 +- .../opentelemetry-sdk-trace-node/package.json | 6 +- .../opentelemetry-sdk-trace-web/package.json | 6 +- .../package.json | 6 +- .../package.json | 2 +- packages/sdk-metrics/package.json | 6 +- 42 files changed, 327 insertions(+), 329 deletions(-) diff --git a/api/package.json b/api/package.json index 56efd5a672..5e8cdf6e4f 100644 --- a/api/package.json +++ b/api/package.json @@ -61,10 +61,10 @@ "access": "public" }, "devDependencies": { - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", - "@types/webpack": "4.41.34", + "@types/sinon": "10.0.20", + "@types/webpack": "4.41.35", "@types/webpack-env": "1.16.3", "codecov": "3.8.3", "cross-var": "1.1.0", diff --git a/experimental/packages/api-events/package.json b/experimental/packages/api-events/package.json index a47245f373..aa4efd8142 100644 --- a/experimental/packages/api-events/package.json +++ b/experimental/packages/api-events/package.json @@ -64,7 +64,7 @@ "@opentelemetry/api": "^1.0.0" }, "devDependencies": { - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", diff --git a/experimental/packages/api-logs/package.json b/experimental/packages/api-logs/package.json index 82f66131ca..aedb0ad53f 100644 --- a/experimental/packages/api-logs/package.json +++ b/experimental/packages/api-logs/package.json @@ -64,7 +64,7 @@ "@opentelemetry/api": "^1.0.0" }, "devDependencies": { - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", diff --git a/experimental/packages/exporter-logs-otlp-grpc/package.json b/experimental/packages/exporter-logs-otlp-grpc/package.json index bcaf8a1d36..dffa3e41ee 100644 --- a/experimental/packages/exporter-logs-otlp-grpc/package.json +++ b/experimental/packages/exporter-logs-otlp-grpc/package.json @@ -54,9 +54,9 @@ "@opentelemetry/api-logs": "0.44.0", "@opentelemetry/otlp-exporter-base": "0.44.0", "@opentelemetry/resources": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cpx": "1.5.0", "cross-var": "1.1.0", diff --git a/experimental/packages/exporter-logs-otlp-http/package.json b/experimental/packages/exporter-logs-otlp-http/package.json index c338e948c2..5804063aa7 100644 --- a/experimental/packages/exporter-logs-otlp-http/package.json +++ b/experimental/packages/exporter-logs-otlp-http/package.json @@ -74,9 +74,9 @@ "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", "@opentelemetry/resources": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", diff --git a/experimental/packages/exporter-logs-otlp-proto/package.json b/experimental/packages/exporter-logs-otlp-proto/package.json index 8fe5638959..a899d34f32 100644 --- a/experimental/packages/exporter-logs-otlp-proto/package.json +++ b/experimental/packages/exporter-logs-otlp-proto/package.json @@ -65,9 +65,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", "cpx": "1.5.0", diff --git a/experimental/packages/exporter-trace-otlp-grpc/package.json b/experimental/packages/exporter-trace-otlp-grpc/package.json index b009435569..e2d0634bfe 100644 --- a/experimental/packages/exporter-trace-otlp-grpc/package.json +++ b/experimental/packages/exporter-trace-otlp-grpc/package.json @@ -51,9 +51,9 @@ "@grpc/proto-loader": "^0.7.10", "@opentelemetry/api": "1.6.0", "@opentelemetry/otlp-exporter-base": "0.44.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cpx": "1.5.0", "cross-var": "1.1.0", diff --git a/experimental/packages/exporter-trace-otlp-http/package.json b/experimental/packages/exporter-trace-otlp-http/package.json index 5629ff99df..241106e091 100644 --- a/experimental/packages/exporter-trace-otlp-http/package.json +++ b/experimental/packages/exporter-trace-otlp-http/package.json @@ -65,9 +65,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", diff --git a/experimental/packages/exporter-trace-otlp-proto/package.json b/experimental/packages/exporter-trace-otlp-proto/package.json index a607b3345c..a6dd0c3350 100644 --- a/experimental/packages/exporter-trace-otlp-proto/package.json +++ b/experimental/packages/exporter-trace-otlp-proto/package.json @@ -64,9 +64,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", "cpx": "1.5.0", diff --git a/experimental/packages/opentelemetry-browser-detector/package.json b/experimental/packages/opentelemetry-browser-detector/package.json index 16368237e9..ed514db27b 100644 --- a/experimental/packages/opentelemetry-browser-detector/package.json +++ b/experimental/packages/opentelemetry-browser-detector/package.json @@ -55,9 +55,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", "cross-var": "1.1.0", diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json index 0b27de400c..a09087c838 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json @@ -50,9 +50,9 @@ "@babel/core": "7.22.20", "@grpc/proto-loader": "^0.7.10", "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cpx": "1.5.0", "cross-var": "1.1.0", diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json index 17554665c5..864c49b14f 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json @@ -65,9 +65,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json index dd72c00bef..fb31da9740 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json @@ -57,9 +57,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cpx": "1.5.0", "cross-var": "1.1.0", diff --git a/experimental/packages/opentelemetry-exporter-prometheus/package.json b/experimental/packages/opentelemetry-exporter-prometheus/package.json index 3fe44b95f0..97062eb6cb 100644 --- a/experimental/packages/opentelemetry-exporter-prometheus/package.json +++ b/experimental/packages/opentelemetry-exporter-prometheus/package.json @@ -45,9 +45,9 @@ "devDependencies": { "@opentelemetry/api": "1.6.0", "@opentelemetry/semantic-conventions": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", diff --git a/experimental/packages/opentelemetry-instrumentation-fetch/package.json b/experimental/packages/opentelemetry-instrumentation-fetch/package.json index 865ee3464f..0f53341d57 100644 --- a/experimental/packages/opentelemetry-instrumentation-fetch/package.json +++ b/experimental/packages/opentelemetry-instrumentation-fetch/package.json @@ -59,9 +59,9 @@ "@opentelemetry/context-zone": "1.17.1", "@opentelemetry/propagator-b3": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", diff --git a/experimental/packages/opentelemetry-instrumentation-grpc/package.json b/experimental/packages/opentelemetry-instrumentation-grpc/package.json index 03a6613df1..2543163fe6 100644 --- a/experimental/packages/opentelemetry-instrumentation-grpc/package.json +++ b/experimental/packages/opentelemetry-instrumentation-grpc/package.json @@ -57,10 +57,10 @@ "@protobuf-ts/grpc-transport": "2.9.1", "@protobuf-ts/runtime": "2.9.1", "@protobuf-ts/runtime-rpc": "2.9.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/semver": "7.5.3", - "@types/sinon": "10.0.19", + "@types/semver": "7.5.4", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", diff --git a/experimental/packages/opentelemetry-instrumentation-http/package.json b/experimental/packages/opentelemetry-instrumentation-http/package.json index b47e5681c4..50047245a0 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/package.json +++ b/experimental/packages/opentelemetry-instrumentation-http/package.json @@ -50,18 +50,18 @@ "@opentelemetry/sdk-metrics": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", "@opentelemetry/sdk-trace-node": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/request-promise-native": "1.0.19", - "@types/semver": "7.5.3", - "@types/sinon": "10.0.19", - "@types/superagent": "4.1.19", + "@types/request-promise-native": "1.0.20", + "@types/semver": "7.5.4", + "@types/sinon": "10.0.20", + "@types/superagent": "4.1.20", "axios": "1.5.1", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", "mocha": "10.2.0", - "nock": "13.3.4", + "nock": "13.3.8", "nyc": "15.1.0", "request": "2.88.2", "request-promise-native": "1.0.9", diff --git a/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json b/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json index f9201e313e..4b09f9515a 100644 --- a/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json +++ b/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json @@ -59,9 +59,9 @@ "@opentelemetry/context-zone": "1.17.1", "@opentelemetry/propagator-b3": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", diff --git a/experimental/packages/opentelemetry-instrumentation/package.json b/experimental/packages/opentelemetry-instrumentation/package.json index 735cd78299..478a3fd6ec 100644 --- a/experimental/packages/opentelemetry-instrumentation/package.json +++ b/experimental/packages/opentelemetry-instrumentation/package.json @@ -84,10 +84,10 @@ "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", "@opentelemetry/sdk-metrics": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/semver": "7.5.3", - "@types/sinon": "10.0.19", + "@types/semver": "7.5.4", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", diff --git a/experimental/packages/opentelemetry-sdk-node/package.json b/experimental/packages/opentelemetry-sdk-node/package.json index aba8ef122c..39dca374e2 100644 --- a/experimental/packages/opentelemetry-sdk-node/package.json +++ b/experimental/packages/opentelemetry-sdk-node/package.json @@ -65,10 +65,10 @@ "@opentelemetry/api": "1.6.0", "@opentelemetry/context-async-hooks": "1.17.1", "@opentelemetry/exporter-jaeger": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/semver": "7.5.3", - "@types/sinon": "10.0.19", + "@types/semver": "7.5.4", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", diff --git a/experimental/packages/otlp-exporter-base/package.json b/experimental/packages/otlp-exporter-base/package.json index b27ee3a73a..d5a5a2fba8 100644 --- a/experimental/packages/otlp-exporter-base/package.json +++ b/experimental/packages/otlp-exporter-base/package.json @@ -66,9 +66,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", "cross-var": "1.1.0", diff --git a/experimental/packages/otlp-grpc-exporter-base/package.json b/experimental/packages/otlp-grpc-exporter-base/package.json index 513ab93a52..f6f0d2d79d 100644 --- a/experimental/packages/otlp-grpc-exporter-base/package.json +++ b/experimental/packages/otlp-grpc-exporter-base/package.json @@ -53,9 +53,9 @@ "@opentelemetry/otlp-transformer": "0.44.0", "@opentelemetry/resources": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cpx": "1.5.0", "cross-var": "1.1.0", diff --git a/experimental/packages/otlp-proto-exporter-base/package.json b/experimental/packages/otlp-proto-exporter-base/package.json index 3144ae33b1..5e09c6815d 100644 --- a/experimental/packages/otlp-proto-exporter-base/package.json +++ b/experimental/packages/otlp-proto-exporter-base/package.json @@ -61,9 +61,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", diff --git a/experimental/packages/otlp-transformer/package.json b/experimental/packages/otlp-transformer/package.json index 0cfdf74534..a1fe042261 100644 --- a/experimental/packages/otlp-transformer/package.json +++ b/experimental/packages/otlp-transformer/package.json @@ -58,7 +58,7 @@ }, "devDependencies": { "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", diff --git a/experimental/packages/sdk-logs/package.json b/experimental/packages/sdk-logs/package.json index af3a92982a..acbb040582 100644 --- a/experimental/packages/sdk-logs/package.json +++ b/experimental/packages/sdk-logs/package.json @@ -75,9 +75,9 @@ "@babel/core": "7.22.20", "@opentelemetry/api": ">=1.4.0 <1.7.0", "@opentelemetry/api-logs": "0.44.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", "cross-var": "1.1.0", diff --git a/experimental/packages/shim-opencensus/package.json b/experimental/packages/shim-opencensus/package.json index ee8f55f35b..3442463c3e 100644 --- a/experimental/packages/shim-opencensus/package.json +++ b/experimental/packages/shim-opencensus/package.json @@ -52,9 +52,9 @@ "@opentelemetry/api": "1.6.0", "@opentelemetry/context-async-hooks": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", diff --git a/package-lock.json b/package-lock.json index 7bc1150410..a1f9950286 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56,10 +56,10 @@ "version": "1.6.0", "license": "Apache-2.0", "devDependencies": { - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", - "@types/webpack": "4.41.34", + "@types/sinon": "10.0.20", + "@types/webpack": "4.41.35", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", @@ -753,7 +753,7 @@ "@opentelemetry/api": "^1.0.0" }, "devDependencies": { - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", @@ -857,7 +857,7 @@ "@opentelemetry/api": "^1.0.0" }, "devDependencies": { - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", @@ -971,9 +971,9 @@ "@opentelemetry/api-logs": "0.44.0", "@opentelemetry/otlp-exporter-base": "0.44.0", "@opentelemetry/resources": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cpx": "1.5.0", "cross-var": "1.1.0", @@ -1046,9 +1046,9 @@ "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", "@opentelemetry/resources": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", @@ -1220,9 +1220,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", "cpx": "1.5.0", @@ -1392,9 +1392,9 @@ "@grpc/proto-loader": "^0.7.10", "@opentelemetry/api": "1.6.0", "@opentelemetry/otlp-exporter-base": "0.44.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cpx": "1.5.0", "cross-var": "1.1.0", @@ -1466,9 +1466,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", @@ -1638,9 +1638,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", "cpx": "1.5.0", @@ -1804,9 +1804,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", "cross-var": "1.1.0", @@ -1975,9 +1975,9 @@ "@babel/core": "7.22.20", "@grpc/proto-loader": "^0.7.10", "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cpx": "1.5.0", "cross-var": "1.1.0", @@ -2049,9 +2049,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", @@ -2222,9 +2222,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cpx": "1.5.0", "cross-var": "1.1.0", @@ -2294,9 +2294,9 @@ "devDependencies": { "@opentelemetry/api": "1.6.0", "@opentelemetry/semantic-conventions": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", @@ -2328,10 +2328,10 @@ "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", "@opentelemetry/sdk-metrics": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/semver": "7.5.3", - "@types/sinon": "10.0.19", + "@types/semver": "7.5.4", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", @@ -2378,9 +2378,9 @@ "@opentelemetry/context-zone": "1.17.1", "@opentelemetry/propagator-b3": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", @@ -2554,10 +2554,10 @@ "@protobuf-ts/grpc-transport": "2.9.1", "@protobuf-ts/runtime": "2.9.1", "@protobuf-ts/runtime-rpc": "2.9.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/semver": "7.5.3", - "@types/sinon": "10.0.19", + "@types/semver": "7.5.4", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", @@ -2591,18 +2591,18 @@ "@opentelemetry/sdk-metrics": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", "@opentelemetry/sdk-trace-node": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/request-promise-native": "1.0.19", - "@types/semver": "7.5.3", - "@types/sinon": "10.0.19", - "@types/superagent": "4.1.19", + "@types/request-promise-native": "1.0.20", + "@types/semver": "7.5.4", + "@types/sinon": "10.0.20", + "@types/superagent": "4.1.20", "axios": "1.5.1", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", "mocha": "10.2.0", - "nock": "13.3.4", + "nock": "13.3.8", "nyc": "15.1.0", "request": "2.88.2", "request-promise-native": "1.0.9", @@ -2645,9 +2645,9 @@ "@opentelemetry/context-zone": "1.17.1", "@opentelemetry/propagator-b3": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", @@ -2948,10 +2948,10 @@ "@opentelemetry/api": "1.6.0", "@opentelemetry/context-async-hooks": "1.17.1", "@opentelemetry/exporter-jaeger": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/semver": "7.5.3", - "@types/sinon": "10.0.19", + "@types/semver": "7.5.4", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", @@ -2980,9 +2980,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", "cross-var": "1.1.0", @@ -3150,9 +3150,9 @@ "@opentelemetry/otlp-transformer": "0.44.0", "@opentelemetry/resources": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cpx": "1.5.0", "cross-var": "1.1.0", @@ -3223,9 +3223,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", @@ -3297,7 +3297,7 @@ }, "devDependencies": { "@opentelemetry/api": "1.6.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", @@ -3407,9 +3407,9 @@ "@babel/core": "7.22.20", "@opentelemetry/api": ">=1.4.0 <1.7.0", "@opentelemetry/api-logs": "0.44.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", "cross-var": "1.1.0", @@ -3578,9 +3578,9 @@ "@opentelemetry/api": "1.6.0", "@opentelemetry/context-async-hooks": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", @@ -9661,9 +9661,9 @@ } }, "node_modules/@types/jquery": { - "version": "3.5.22", - "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.22.tgz", - "integrity": "sha512-ISQFeUK5GwRftLK4PVvKTWEVCxZ2BpaqBz0TWkIq5w4vGojxZP9+XkqgcPjxoqmPeew+HLyWthCBvK7GdF5NYA==", + "version": "3.5.25", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.25.tgz", + "integrity": "sha512-gykx2c+OZf5nx2tv/5fDQqmvGgTiXshELy5jf9IgXPtVfSBl57IUYByN4osbwMXwJijWGOEYQABzGaFZE79A0Q==", "dev": true, "dependencies": { "@types/sizzle": "*" @@ -9704,9 +9704,9 @@ "dev": true }, "node_modules/@types/lodash.merge": { - "version": "4.6.7", - "resolved": "https://registry.npmjs.org/@types/lodash.merge/-/lodash.merge-4.6.7.tgz", - "integrity": "sha512-OwxUJ9E50gw3LnAefSHJPHaBLGEKmQBQ7CZe/xflHkyy/wH2zVyEIAKReHvVrrn7zKdF58p16We9kMfh7v0RRQ==", + "version": "4.6.8", + "resolved": "https://registry.npmjs.org/@types/lodash.merge/-/lodash.merge-4.6.8.tgz", + "integrity": "sha512-He1g+VBmRclP+6hT6P6zKlzpFoeOLMgPpMGChgINuxbdPumZCIJsITbqSq2cWXzJu2ltmwVN5TfQ6kj0X06rFQ==", "dev": true, "dependencies": { "@types/lodash": "*" @@ -9747,9 +9747,9 @@ "dev": true }, "node_modules/@types/mocha": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.2.tgz", - "integrity": "sha512-NaHL0+0lLNhX6d9rs+NSt97WH/gIlRHmszXbQ/8/MV/eVcFNdeJ/GYhrFuUc8K7WuPhRhTSdMkCp8VMzhUq85w==", + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.3.tgz", + "integrity": "sha512-RsOPImTriV/OE4A9qKjMtk2MnXiuLLbcO3nCXK+kvq4nr0iMfFgpjaX3MPLb6f7+EL1FGSelYvuJMV6REH+ZPQ==", "dev": true }, "node_modules/@types/node": { @@ -9803,9 +9803,9 @@ } }, "node_modules/@types/request-promise-native": { - "version": "1.0.19", - "resolved": "https://registry.npmjs.org/@types/request-promise-native/-/request-promise-native-1.0.19.tgz", - "integrity": "sha512-i17J9k5KP2PAMEhoYnoDpHzJHS91aIV1lG0gOqNX1G5mm/48Qm01sIb8gCJMQpddwapXM9KpxdWGSggZNMLKDw==", + "version": "1.0.20", + "resolved": "https://registry.npmjs.org/@types/request-promise-native/-/request-promise-native-1.0.20.tgz", + "integrity": "sha512-1dfdWY0u6mNkAheZ5UqBGY/ARpDXE5xJ+npN3COoTfrQTt4FmHrwp8548zU6F1LniUK75qk06HoOvCG+hS/8Zw==", "dev": true, "dependencies": { "@types/request": "*" @@ -9850,9 +9850,9 @@ } }, "node_modules/@types/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==", "dev": true }, "node_modules/@types/send": { @@ -9891,9 +9891,9 @@ "integrity": "sha512-hsughtxFsdJ9+Gxd/qH8zHE+KT6YEAxx9hJLoSXhxTBKHMQ2NMhN23fRJ75M9RRn2hDMNn13H3gS1EktA9VgDA==" }, "node_modules/@types/sinon": { - "version": "10.0.19", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.19.tgz", - "integrity": "sha512-MWZNGPSchIdDfb5FL+VFi4zHsHbNOTQEgjqFQk7HazXSXwUU9PAX3z9XBqb3AJGYr9YwrtCtaSMsT3brYsN/jQ==", + "version": "10.0.20", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.20.tgz", + "integrity": "sha512-2APKKruFNCAZgx3daAyACGzWuJ028VVCUDk6o2rw/Z4PXT0ogwdV4KUegW0MwVs0Zu59auPXbbuBJHF12Sx1Eg==", "dev": true, "dependencies": { "@types/sinonjs__fake-timers": "*" @@ -9927,9 +9927,9 @@ "dev": true }, "node_modules/@types/superagent": { - "version": "4.1.19", - "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-4.1.19.tgz", - "integrity": "sha512-McM1mlc7PBZpCaw0fw/36uFqo0YeA6m8JqoyE4OfqXsZCIg0hPP2xdE6FM7r6fdprDZHlJwDpydUj1R++93hCA==", + "version": "4.1.20", + "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-4.1.20.tgz", + "integrity": "sha512-GfpwJgYSr3yO+nArFkmyqv3i0vZavyEG5xPd/o95RwpKYpsOKJYI5XLdxLpdRbZI3YiGKKdIOFIf/jlP7A0Jxg==", "dev": true, "dependencies": { "@types/cookiejar": "*", @@ -9958,9 +9958,9 @@ } }, "node_modules/@types/webpack": { - "version": "4.41.34", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.34.tgz", - "integrity": "sha512-CN2aOGrR3zbMc2v+cKqzaClYP1ldkpPOgtdNvgX+RmlWCSWxHxpzz6WSCVQZRkF8D60ROlkRzAoEpgjWQ+bd2g==", + "version": "4.41.35", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.35.tgz", + "integrity": "sha512-XRC6HLGHtNfN8/xWeu1YUQV1GSE+28q8lSqvcJ+0xt/zW9Wmn4j9pCSvaXPyRlCKrl5OuqECQNEJUy2vo8oWqg==", "dev": true, "dependencies": { "@types/node": "*", @@ -24571,14 +24571,13 @@ } }, "node_modules/nock": { - "version": "13.3.4", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.3.4.tgz", - "integrity": "sha512-DDpmn5oLEdCTclEqweOT4U7bEpuoifBMFUXem9sA4turDAZ5tlbrEoWqCorwXey8CaAw44mst5JOQeVNiwtkhw==", + "version": "13.3.8", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.3.8.tgz", + "integrity": "sha512-96yVFal0c/W1lG7mmfRe7eO+hovrhJYd2obzzOZ90f6fjpeU/XNvd9cYHZKZAQJumDfhXgoTpkpJ9pvMj+hqHw==", "dev": true, "dependencies": { "debug": "^4.1.0", "json-stringify-safe": "^5.0.1", - "lodash": "^4.17.21", "propagate": "^2.0.0" }, "engines": { @@ -34047,7 +34046,7 @@ "license": "Apache-2.0", "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.7.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", "codecov": "3.8.3", "cross-var": "1.1.0", @@ -34074,9 +34073,9 @@ }, "devDependencies": { "@babel/core": "7.22.20", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "codecov": "3.8.3", @@ -34108,9 +34107,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": ">=1.0.0 <1.7.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "@types/zone.js": "0.5.12", "babel-loader": "8.3.0", @@ -34395,9 +34394,9 @@ }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.7.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", @@ -34509,14 +34508,14 @@ "devDependencies": { "@opentelemetry/api": "^1.0.0", "@opentelemetry/resources": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", "mocha": "10.2.0", - "nock": "13.3.4", + "nock": "13.3.8", "nyc": "15.1.0", "sinon": "15.1.2", "ts-mocha": "10.0.0", @@ -34542,9 +34541,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "^1.0.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", @@ -34558,7 +34557,7 @@ "karma-webpack": "4.0.2", "lerna": "6.6.2", "mocha": "10.2.0", - "nock": "13.3.4", + "nock": "13.3.8", "nyc": "15.1.0", "sinon": "15.1.2", "ts-loader": "8.4.0", @@ -34708,7 +34707,7 @@ }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.7.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", "codecov": "3.8.3", "cross-var": "1.1.0", @@ -34735,9 +34734,9 @@ }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.7.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", @@ -34847,9 +34846,9 @@ "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.7.0", "@opentelemetry/resources_1.9.0": "npm:@opentelemetry/resources@1.9.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "codecov": "3.8.3", "cross-var": "1.1.0", @@ -34862,7 +34861,7 @@ "karma-webpack": "4.0.2", "lerna": "6.6.2", "mocha": "10.2.0", - "nock": "13.3.4", + "nock": "13.3.8", "nyc": "15.1.0", "sinon": "15.1.2", "ts-mocha": "10.0.0", @@ -35024,9 +35023,9 @@ }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.7.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", @@ -35142,10 +35141,10 @@ "@opentelemetry/api": ">=1.0.0 <1.7.0", "@opentelemetry/resources": "1.17.1", "@opentelemetry/semantic-conventions": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/semver": "7.5.3", - "@types/sinon": "10.0.19", + "@types/semver": "7.5.4", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", @@ -35177,10 +35176,10 @@ "@opentelemetry/context-zone": "1.17.1", "@opentelemetry/propagator-b3": "1.17.1", "@opentelemetry/resources": "1.17.1", - "@types/jquery": "3.5.22", - "@types/mocha": "10.0.2", + "@types/jquery": "3.5.25", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", @@ -35341,14 +35340,14 @@ "version": "1.17.1", "license": "Apache-2.0", "devDependencies": { - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", "mocha": "10.2.0", - "nock": "13.3.4", + "nock": "13.3.8", "nyc": "15.1.0", "sinon": "15.1.2", "ts-mocha": "10.0.0", @@ -35372,7 +35371,7 @@ "@opentelemetry/propagator-b3": "1.17.1", "@opentelemetry/propagator-jaeger": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", "codecov": "3.8.3", "cross-var": "1.1.0", @@ -35401,10 +35400,10 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": ">=1.3.0 <1.7.0", - "@types/lodash.merge": "4.6.7", - "@types/mocha": "10.0.2", + "@types/lodash.merge": "4.6.8", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", "cross-var": "1.1.0", @@ -39624,10 +39623,10 @@ "@opentelemetry/api": { "version": "file:api", "requires": { - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", - "@types/webpack": "4.41.34", + "@types/sinon": "10.0.20", + "@types/webpack": "4.41.35", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", @@ -39706,7 +39705,7 @@ "version": "file:experimental/packages/api-events", "requires": { "@opentelemetry/api": "^1.0.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", @@ -39781,7 +39780,7 @@ "version": "file:experimental/packages/api-logs", "requires": { "@opentelemetry/api": "^1.0.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", @@ -39856,7 +39855,7 @@ "version": "file:packages/opentelemetry-context-async-hooks", "requires": { "@opentelemetry/api": ">=1.0.0 <1.7.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", "codecov": "3.8.3", "cross-var": "1.1.0", @@ -39872,9 +39871,9 @@ "requires": { "@babel/core": "7.22.20", "@opentelemetry/context-zone-peer-dep": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "codecov": "3.8.3", @@ -39991,9 +39990,9 @@ "requires": { "@babel/core": "7.22.20", "@opentelemetry/api": ">=1.0.0 <1.7.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "@types/zone.js": "0.5.12", "babel-loader": "8.3.0", @@ -40111,9 +40110,9 @@ "requires": { "@opentelemetry/api": ">=1.0.0 <1.7.0", "@opentelemetry/semantic-conventions": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", @@ -40192,15 +40191,15 @@ "@opentelemetry/resources": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", "@opentelemetry/semantic-conventions": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "jaeger-client": "^3.15.0", "lerna": "6.6.2", "mocha": "10.2.0", - "nock": "13.3.4", + "nock": "13.3.8", "nyc": "15.1.0", "sinon": "15.1.2", "ts-mocha": "10.0.0", @@ -40221,9 +40220,9 @@ "@opentelemetry/otlp-transformer": "0.44.0", "@opentelemetry/resources": "1.17.1", "@opentelemetry/sdk-logs": "0.44.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cpx": "1.5.0", "cross-var": "1.1.0", @@ -40278,9 +40277,9 @@ "@opentelemetry/otlp-transformer": "0.44.0", "@opentelemetry/resources": "1.17.1", "@opentelemetry/sdk-logs": "0.44.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", @@ -40407,9 +40406,9 @@ "@opentelemetry/resources": "1.17.1", "@opentelemetry/sdk-logs": "0.44.0", "@opentelemetry/sdk-trace-base": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", "cpx": "1.5.0", @@ -40534,9 +40533,9 @@ "@opentelemetry/otlp-transformer": "0.44.0", "@opentelemetry/resources": "1.17.1", "@opentelemetry/sdk-metrics": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cpx": "1.5.0", "cross-var": "1.1.0", @@ -40590,9 +40589,9 @@ "@opentelemetry/otlp-transformer": "0.44.0", "@opentelemetry/resources": "1.17.1", "@opentelemetry/sdk-metrics": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", @@ -40718,9 +40717,9 @@ "@opentelemetry/otlp-transformer": "0.44.0", "@opentelemetry/resources": "1.17.1", "@opentelemetry/sdk-metrics": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cpx": "1.5.0", "cross-var": "1.1.0", @@ -40772,9 +40771,9 @@ "@opentelemetry/resources": "1.17.1", "@opentelemetry/sdk-metrics": "1.17.1", "@opentelemetry/semantic-conventions": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", @@ -40798,9 +40797,9 @@ "@opentelemetry/otlp-transformer": "0.44.0", "@opentelemetry/resources": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cpx": "1.5.0", "cross-var": "1.1.0", @@ -40854,9 +40853,9 @@ "@opentelemetry/otlp-transformer": "0.44.0", "@opentelemetry/resources": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", @@ -40981,9 +40980,9 @@ "@opentelemetry/otlp-transformer": "0.44.0", "@opentelemetry/resources": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", "cpx": "1.5.0", @@ -41104,9 +41103,9 @@ "@opentelemetry/resources": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", "@opentelemetry/semantic-conventions": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", @@ -41120,7 +41119,7 @@ "karma-webpack": "4.0.2", "lerna": "6.6.2", "mocha": "10.2.0", - "nock": "13.3.4", + "nock": "13.3.8", "nyc": "15.1.0", "sinon": "15.1.2", "ts-loader": "8.4.0", @@ -41226,11 +41225,11 @@ "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", "@opentelemetry/sdk-metrics": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/semver": "7.5.3", + "@types/semver": "7.5.4", "@types/shimmer": "^1.0.2", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", @@ -41362,9 +41361,9 @@ "@opentelemetry/sdk-trace-base": "1.17.1", "@opentelemetry/sdk-trace-web": "1.17.1", "@opentelemetry/semantic-conventions": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", @@ -41493,10 +41492,10 @@ "@protobuf-ts/grpc-transport": "2.9.1", "@protobuf-ts/runtime": "2.9.1", "@protobuf-ts/runtime-rpc": "2.9.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/semver": "7.5.3", - "@types/sinon": "10.0.19", + "@types/semver": "7.5.4", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", @@ -41519,18 +41518,18 @@ "@opentelemetry/sdk-trace-base": "1.17.1", "@opentelemetry/sdk-trace-node": "1.17.1", "@opentelemetry/semantic-conventions": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/request-promise-native": "1.0.19", - "@types/semver": "7.5.3", - "@types/sinon": "10.0.19", - "@types/superagent": "4.1.19", + "@types/request-promise-native": "1.0.20", + "@types/semver": "7.5.4", + "@types/sinon": "10.0.20", + "@types/superagent": "4.1.20", "axios": "1.5.1", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", "mocha": "10.2.0", - "nock": "13.3.4", + "nock": "13.3.8", "nyc": "15.1.0", "request": "2.88.2", "request-promise-native": "1.0.9", @@ -41566,9 +41565,9 @@ "@opentelemetry/sdk-trace-base": "1.17.1", "@opentelemetry/sdk-trace-web": "1.17.1", "@opentelemetry/semantic-conventions": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", @@ -41688,9 +41687,9 @@ "@opentelemetry/api": "1.6.0", "@opentelemetry/resources": "1.17.1", "@opentelemetry/semantic-conventions": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", "cross-var": "1.1.0", @@ -41807,9 +41806,9 @@ "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", "@opentelemetry/core": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", "cross-var": "1.1.0", @@ -41931,9 +41930,9 @@ "@opentelemetry/otlp-transformer": "0.44.0", "@opentelemetry/resources": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cpx": "1.5.0", "cross-var": "1.1.0", @@ -41986,9 +41985,9 @@ "@opentelemetry/api": "1.6.0", "@opentelemetry/core": "1.17.1", "@opentelemetry/otlp-exporter-base": "0.44.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", @@ -42043,7 +42042,7 @@ "@opentelemetry/sdk-logs": "0.44.0", "@opentelemetry/sdk-metrics": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", @@ -42118,7 +42117,7 @@ "requires": { "@opentelemetry/api": ">=1.0.0 <1.7.0", "@opentelemetry/core": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", "codecov": "3.8.3", "cross-var": "1.1.0", @@ -42135,9 +42134,9 @@ "requires": { "@opentelemetry/api": ">=1.0.0 <1.7.0", "@opentelemetry/core": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", @@ -42215,9 +42214,9 @@ "@opentelemetry/core": "1.17.1", "@opentelemetry/resources_1.9.0": "npm:@opentelemetry/resources@1.9.0", "@opentelemetry/semantic-conventions": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "codecov": "3.8.3", "cross-var": "1.1.0", @@ -42230,7 +42229,7 @@ "karma-webpack": "4.0.2", "lerna": "6.6.2", "mocha": "10.2.0", - "nock": "13.3.4", + "nock": "13.3.8", "nyc": "15.1.0", "sinon": "15.1.2", "ts-mocha": "10.0.0", @@ -42341,9 +42340,9 @@ "@opentelemetry/api-logs": "0.44.0", "@opentelemetry/core": "1.17.1", "@opentelemetry/resources": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", "cross-var": "1.1.0", @@ -42461,10 +42460,10 @@ "@opentelemetry/api": ">=1.3.0 <1.7.0", "@opentelemetry/core": "1.17.1", "@opentelemetry/resources": "1.17.1", - "@types/lodash.merge": "4.6.7", - "@types/mocha": "10.0.2", + "@types/lodash.merge": "4.6.8", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", "cross-var": "1.1.0", @@ -42595,10 +42594,10 @@ "@opentelemetry/sdk-trace-base": "1.17.1", "@opentelemetry/sdk-trace-node": "1.17.1", "@opentelemetry/semantic-conventions": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/semver": "7.5.3", - "@types/sinon": "10.0.19", + "@types/semver": "7.5.4", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", @@ -42618,9 +42617,9 @@ "@opentelemetry/core": "1.17.1", "@opentelemetry/resources": "1.17.1", "@opentelemetry/semantic-conventions": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", @@ -42703,10 +42702,10 @@ "@opentelemetry/resources": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", "@opentelemetry/semantic-conventions": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/semver": "7.5.3", - "@types/sinon": "10.0.19", + "@types/semver": "7.5.4", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", @@ -42729,10 +42728,10 @@ "@opentelemetry/resources": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", "@opentelemetry/semantic-conventions": "1.17.1", - "@types/jquery": "3.5.22", - "@types/mocha": "10.0.2", + "@types/jquery": "3.5.25", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", @@ -43183,14 +43182,14 @@ "@opentelemetry/semantic-conventions": { "version": "file:packages/opentelemetry-semantic-conventions", "requires": { - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", "mocha": "10.2.0", - "nock": "13.3.4", + "nock": "13.3.8", "nyc": "15.1.0", "sinon": "15.1.2", "ts-mocha": "10.0.0", @@ -43207,9 +43206,9 @@ "@opentelemetry/resources": "1.17.1", "@opentelemetry/sdk-metrics": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", @@ -43231,7 +43230,7 @@ "@opentelemetry/propagator-jaeger": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", "@opentelemetry/semantic-conventions": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", "codecov": "3.8.3", "cross-var": "1.1.0", @@ -43983,9 +43982,9 @@ } }, "@types/jquery": { - "version": "3.5.22", - "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.22.tgz", - "integrity": "sha512-ISQFeUK5GwRftLK4PVvKTWEVCxZ2BpaqBz0TWkIq5w4vGojxZP9+XkqgcPjxoqmPeew+HLyWthCBvK7GdF5NYA==", + "version": "3.5.25", + "resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.25.tgz", + "integrity": "sha512-gykx2c+OZf5nx2tv/5fDQqmvGgTiXshELy5jf9IgXPtVfSBl57IUYByN4osbwMXwJijWGOEYQABzGaFZE79A0Q==", "dev": true, "requires": { "@types/sizzle": "*" @@ -44026,9 +44025,9 @@ "dev": true }, "@types/lodash.merge": { - "version": "4.6.7", - "resolved": "https://registry.npmjs.org/@types/lodash.merge/-/lodash.merge-4.6.7.tgz", - "integrity": "sha512-OwxUJ9E50gw3LnAefSHJPHaBLGEKmQBQ7CZe/xflHkyy/wH2zVyEIAKReHvVrrn7zKdF58p16We9kMfh7v0RRQ==", + "version": "4.6.8", + "resolved": "https://registry.npmjs.org/@types/lodash.merge/-/lodash.merge-4.6.8.tgz", + "integrity": "sha512-He1g+VBmRclP+6hT6P6zKlzpFoeOLMgPpMGChgINuxbdPumZCIJsITbqSq2cWXzJu2ltmwVN5TfQ6kj0X06rFQ==", "dev": true, "requires": { "@types/lodash": "*" @@ -44069,9 +44068,9 @@ "dev": true }, "@types/mocha": { - "version": "10.0.2", - "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.2.tgz", - "integrity": "sha512-NaHL0+0lLNhX6d9rs+NSt97WH/gIlRHmszXbQ/8/MV/eVcFNdeJ/GYhrFuUc8K7WuPhRhTSdMkCp8VMzhUq85w==", + "version": "10.0.3", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-10.0.3.tgz", + "integrity": "sha512-RsOPImTriV/OE4A9qKjMtk2MnXiuLLbcO3nCXK+kvq4nr0iMfFgpjaX3MPLb6f7+EL1FGSelYvuJMV6REH+ZPQ==", "dev": true }, "@types/node": { @@ -44138,9 +44137,9 @@ } }, "@types/request-promise-native": { - "version": "1.0.19", - "resolved": "https://registry.npmjs.org/@types/request-promise-native/-/request-promise-native-1.0.19.tgz", - "integrity": "sha512-i17J9k5KP2PAMEhoYnoDpHzJHS91aIV1lG0gOqNX1G5mm/48Qm01sIb8gCJMQpddwapXM9KpxdWGSggZNMLKDw==", + "version": "1.0.20", + "resolved": "https://registry.npmjs.org/@types/request-promise-native/-/request-promise-native-1.0.20.tgz", + "integrity": "sha512-1dfdWY0u6mNkAheZ5UqBGY/ARpDXE5xJ+npN3COoTfrQTt4FmHrwp8548zU6F1LniUK75qk06HoOvCG+hS/8Zw==", "dev": true, "requires": { "@types/request": "*" @@ -44171,9 +44170,9 @@ } }, "@types/semver": { - "version": "7.5.3", - "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz", - "integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-MMzuxN3GdFwskAnb6fz0orFvhfqi752yjaXylr0Rp4oDg5H0Zn1IuyRhDVvYOwAXoJirx2xuS16I3WjxnAIHiQ==", "dev": true }, "@types/send": { @@ -44212,9 +44211,9 @@ "integrity": "sha512-hsughtxFsdJ9+Gxd/qH8zHE+KT6YEAxx9hJLoSXhxTBKHMQ2NMhN23fRJ75M9RRn2hDMNn13H3gS1EktA9VgDA==" }, "@types/sinon": { - "version": "10.0.19", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.19.tgz", - "integrity": "sha512-MWZNGPSchIdDfb5FL+VFi4zHsHbNOTQEgjqFQk7HazXSXwUU9PAX3z9XBqb3AJGYr9YwrtCtaSMsT3brYsN/jQ==", + "version": "10.0.20", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-10.0.20.tgz", + "integrity": "sha512-2APKKruFNCAZgx3daAyACGzWuJ028VVCUDk6o2rw/Z4PXT0ogwdV4KUegW0MwVs0Zu59auPXbbuBJHF12Sx1Eg==", "dev": true, "requires": { "@types/sinonjs__fake-timers": "*" @@ -44248,9 +44247,9 @@ "dev": true }, "@types/superagent": { - "version": "4.1.19", - "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-4.1.19.tgz", - "integrity": "sha512-McM1mlc7PBZpCaw0fw/36uFqo0YeA6m8JqoyE4OfqXsZCIg0hPP2xdE6FM7r6fdprDZHlJwDpydUj1R++93hCA==", + "version": "4.1.20", + "resolved": "https://registry.npmjs.org/@types/superagent/-/superagent-4.1.20.tgz", + "integrity": "sha512-GfpwJgYSr3yO+nArFkmyqv3i0vZavyEG5xPd/o95RwpKYpsOKJYI5XLdxLpdRbZI3YiGKKdIOFIf/jlP7A0Jxg==", "dev": true, "requires": { "@types/cookiejar": "*", @@ -44279,9 +44278,9 @@ } }, "@types/webpack": { - "version": "4.41.34", - "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.34.tgz", - "integrity": "sha512-CN2aOGrR3zbMc2v+cKqzaClYP1ldkpPOgtdNvgX+RmlWCSWxHxpzz6WSCVQZRkF8D60ROlkRzAoEpgjWQ+bd2g==", + "version": "4.41.35", + "resolved": "https://registry.npmjs.org/@types/webpack/-/webpack-4.41.35.tgz", + "integrity": "sha512-XRC6HLGHtNfN8/xWeu1YUQV1GSE+28q8lSqvcJ+0xt/zW9Wmn4j9pCSvaXPyRlCKrl5OuqECQNEJUy2vo8oWqg==", "dev": true, "requires": { "@types/node": "*", @@ -56012,14 +56011,13 @@ } }, "nock": { - "version": "13.3.4", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.3.4.tgz", - "integrity": "sha512-DDpmn5oLEdCTclEqweOT4U7bEpuoifBMFUXem9sA4turDAZ5tlbrEoWqCorwXey8CaAw44mst5JOQeVNiwtkhw==", + "version": "13.3.8", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.3.8.tgz", + "integrity": "sha512-96yVFal0c/W1lG7mmfRe7eO+hovrhJYd2obzzOZ90f6fjpeU/XNvd9cYHZKZAQJumDfhXgoTpkpJ9pvMj+hqHw==", "dev": true, "requires": { "debug": "^4.1.0", "json-stringify-safe": "^5.0.1", - "lodash": "^4.17.21", "propagate": "^2.0.0" } }, diff --git a/packages/opentelemetry-context-async-hooks/package.json b/packages/opentelemetry-context-async-hooks/package.json index 7123dcd81a..3bbb465777 100644 --- a/packages/opentelemetry-context-async-hooks/package.json +++ b/packages/opentelemetry-context-async-hooks/package.json @@ -45,7 +45,7 @@ }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.7.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", "codecov": "3.8.3", "cross-var": "1.1.0", diff --git a/packages/opentelemetry-context-zone-peer-dep/package.json b/packages/opentelemetry-context-zone-peer-dep/package.json index 784c5588e7..b5949586b4 100644 --- a/packages/opentelemetry-context-zone-peer-dep/package.json +++ b/packages/opentelemetry-context-zone-peer-dep/package.json @@ -55,9 +55,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": ">=1.0.0 <1.7.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "@types/zone.js": "0.5.12", "babel-loader": "8.3.0", diff --git a/packages/opentelemetry-context-zone/package.json b/packages/opentelemetry-context-zone/package.json index efd8ca7e65..ea6b562de8 100644 --- a/packages/opentelemetry-context-zone/package.json +++ b/packages/opentelemetry-context-zone/package.json @@ -51,9 +51,9 @@ }, "devDependencies": { "@babel/core": "7.22.20", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "codecov": "3.8.3", diff --git a/packages/opentelemetry-core/package.json b/packages/opentelemetry-core/package.json index 4bc1737060..ce9e0d6fc0 100644 --- a/packages/opentelemetry-core/package.json +++ b/packages/opentelemetry-core/package.json @@ -65,9 +65,9 @@ }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.7.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", diff --git a/packages/opentelemetry-exporter-jaeger/package.json b/packages/opentelemetry-exporter-jaeger/package.json index 4e0b7adbd1..eaad3db6bc 100644 --- a/packages/opentelemetry-exporter-jaeger/package.json +++ b/packages/opentelemetry-exporter-jaeger/package.json @@ -46,14 +46,14 @@ "devDependencies": { "@opentelemetry/api": "^1.0.0", "@opentelemetry/resources": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", "mocha": "10.2.0", - "nock": "13.3.4", + "nock": "13.3.8", "nyc": "15.1.0", "sinon": "15.1.2", "ts-mocha": "10.0.0", diff --git a/packages/opentelemetry-exporter-zipkin/package.json b/packages/opentelemetry-exporter-zipkin/package.json index 4e6d84b4f4..3a42b62168 100644 --- a/packages/opentelemetry-exporter-zipkin/package.json +++ b/packages/opentelemetry-exporter-zipkin/package.json @@ -62,9 +62,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "^1.0.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", @@ -78,7 +78,7 @@ "karma-webpack": "4.0.2", "lerna": "6.6.2", "mocha": "10.2.0", - "nock": "13.3.4", + "nock": "13.3.8", "nyc": "15.1.0", "sinon": "15.1.2", "ts-loader": "8.4.0", diff --git a/packages/opentelemetry-propagator-b3/package.json b/packages/opentelemetry-propagator-b3/package.json index f0c8de4418..f121ff9c7b 100644 --- a/packages/opentelemetry-propagator-b3/package.json +++ b/packages/opentelemetry-propagator-b3/package.json @@ -58,7 +58,7 @@ }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.7.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", "codecov": "3.8.3", "cross-var": "1.1.0", diff --git a/packages/opentelemetry-propagator-jaeger/package.json b/packages/opentelemetry-propagator-jaeger/package.json index 3537293a5d..14ae50a0ed 100644 --- a/packages/opentelemetry-propagator-jaeger/package.json +++ b/packages/opentelemetry-propagator-jaeger/package.json @@ -55,9 +55,9 @@ }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.7.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", diff --git a/packages/opentelemetry-resources/package.json b/packages/opentelemetry-resources/package.json index 5be9282f8a..cfa85cb5f8 100644 --- a/packages/opentelemetry-resources/package.json +++ b/packages/opentelemetry-resources/package.json @@ -63,9 +63,9 @@ "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.7.0", "@opentelemetry/resources_1.9.0": "npm:@opentelemetry/resources@1.9.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "codecov": "3.8.3", "cross-var": "1.1.0", @@ -78,7 +78,7 @@ "karma-webpack": "4.0.2", "lerna": "6.6.2", "mocha": "10.2.0", - "nock": "13.3.4", + "nock": "13.3.8", "nyc": "15.1.0", "sinon": "15.1.2", "ts-mocha": "10.0.0", diff --git a/packages/opentelemetry-sdk-trace-base/package.json b/packages/opentelemetry-sdk-trace-base/package.json index 7c8547e468..d6ae012bf9 100644 --- a/packages/opentelemetry-sdk-trace-base/package.json +++ b/packages/opentelemetry-sdk-trace-base/package.json @@ -66,9 +66,9 @@ }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.7.0", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", diff --git a/packages/opentelemetry-sdk-trace-node/package.json b/packages/opentelemetry-sdk-trace-node/package.json index 379cdcfec7..f8c2a9b235 100644 --- a/packages/opentelemetry-sdk-trace-node/package.json +++ b/packages/opentelemetry-sdk-trace-node/package.json @@ -48,10 +48,10 @@ "@opentelemetry/api": ">=1.0.0 <1.7.0", "@opentelemetry/resources": "1.17.1", "@opentelemetry/semantic-conventions": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/semver": "7.5.3", - "@types/sinon": "10.0.19", + "@types/semver": "7.5.4", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", diff --git a/packages/opentelemetry-sdk-trace-web/package.json b/packages/opentelemetry-sdk-trace-web/package.json index a1b815911e..15206c78fa 100644 --- a/packages/opentelemetry-sdk-trace-web/package.json +++ b/packages/opentelemetry-sdk-trace-web/package.json @@ -60,10 +60,10 @@ "@opentelemetry/context-zone": "1.17.1", "@opentelemetry/propagator-b3": "1.17.1", "@opentelemetry/resources": "1.17.1", - "@types/jquery": "3.5.22", - "@types/mocha": "10.0.2", + "@types/jquery": "3.5.25", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "@types/webpack-env": "1.16.3", "babel-loader": "8.3.0", "babel-plugin-istanbul": "6.1.1", diff --git a/packages/opentelemetry-semantic-conventions/package.json b/packages/opentelemetry-semantic-conventions/package.json index af141a769e..13dd619864 100644 --- a/packages/opentelemetry-semantic-conventions/package.json +++ b/packages/opentelemetry-semantic-conventions/package.json @@ -49,14 +49,14 @@ "access": "public" }, "devDependencies": { - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "codecov": "3.8.3", "cross-var": "1.1.0", "lerna": "6.6.2", "mocha": "10.2.0", - "nock": "13.3.4", + "nock": "13.3.8", "nyc": "15.1.0", "sinon": "15.1.2", "ts-mocha": "10.0.0", diff --git a/packages/opentelemetry-shim-opentracing/package.json b/packages/opentelemetry-shim-opentracing/package.json index f848e15326..5dd5dab303 100644 --- a/packages/opentelemetry-shim-opentracing/package.json +++ b/packages/opentelemetry-shim-opentracing/package.json @@ -46,7 +46,7 @@ "@opentelemetry/propagator-b3": "1.17.1", "@opentelemetry/propagator-jaeger": "1.17.1", "@opentelemetry/sdk-trace-base": "1.17.1", - "@types/mocha": "10.0.2", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", "codecov": "3.8.3", "cross-var": "1.1.0", diff --git a/packages/sdk-metrics/package.json b/packages/sdk-metrics/package.json index 5801fc66bf..2b6bfd6ebe 100644 --- a/packages/sdk-metrics/package.json +++ b/packages/sdk-metrics/package.json @@ -56,10 +56,10 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": ">=1.3.0 <1.7.0", - "@types/lodash.merge": "4.6.7", - "@types/mocha": "10.0.2", + "@types/lodash.merge": "4.6.8", + "@types/mocha": "10.0.3", "@types/node": "18.6.5", - "@types/sinon": "10.0.19", + "@types/sinon": "10.0.20", "babel-plugin-istanbul": "6.1.1", "codecov": "3.8.3", "cross-var": "1.1.0", From 9db6352d305d207b96f55d41095a41a34711405d Mon Sep 17 00:00:00 2001 From: Siim Kallas Date: Mon, 6 Nov 2023 17:09:52 +0200 Subject: [PATCH 2/3] fix: otlp json encoding (#4220) Co-authored-by: Marc Pichler --- experimental/CHANGELOG.md | 3 + .../src/platform/browser/OTLPLogExporter.ts | 5 +- .../src/platform/node/OTLPLogExporter.ts | 5 +- .../exporter-logs-otlp-http/test/logHelper.ts | 10 +- .../src/platform/browser/OTLPTraceExporter.ts | 5 +- .../src/platform/node/OTLPTraceExporter.ts | 5 +- .../test/traceHelper.ts | 26 ++-- .../test/metricsHelper.ts | 33 +---- .../platform/browser/OTLPMetricExporter.ts | 2 +- .../src/platform/node/OTLPMetricExporter.ts | 2 +- .../test/metricsHelper.ts | 19 +-- .../test/metricsHelper.ts | 33 +---- .../otlp-transformer/src/common/index.ts | 72 +++++++++-- .../otlp-transformer/src/common/types.ts | 11 +- .../src/common/unsigned_long.ts | 122 ------------------ .../otlp-transformer/src/logs/index.ts | 33 ++--- .../otlp-transformer/src/logs/types.ts | 6 +- .../otlp-transformer/src/metrics/index.ts | 8 +- .../otlp-transformer/src/metrics/internal.ts | 60 ++++++--- .../otlp-transformer/src/metrics/types.ts | 14 +- .../otlp-transformer/src/trace/index.ts | 11 +- .../otlp-transformer/src/trace/internal.ts | 41 +++--- .../otlp-transformer/src/trace/types.ts | 8 +- .../otlp-transformer/test/common.test.ts | 65 ++++++++++ .../otlp-transformer/test/logs.test.ts | 28 ++-- .../otlp-transformer/test/metrics.test.ts | 38 +++--- .../otlp-transformer/test/trace.test.ts | 93 ++++++++++--- 27 files changed, 396 insertions(+), 362 deletions(-) delete mode 100644 experimental/packages/otlp-transformer/src/common/unsigned_long.ts diff --git a/experimental/CHANGELOG.md b/experimental/CHANGELOG.md index 687c0a90e2..172da0a498 100644 --- a/experimental/CHANGELOG.md +++ b/experimental/CHANGELOG.md @@ -13,6 +13,9 @@ All notable changes to experimental packages in this project will be documented * fix(sdk-node): remove the explicit dependency on @opentelemetry/exporter-jaeger that was kept on the previous release * '@opentelemetry/exporter-jaeger' is no longer be a dependency of this package. To continue using '@opentelemetry/exporter-jaeger', please install it manually. * NOTE: `@opentelemetry/exporter-jaeger` is deprecated, consider switching to one of the alternatives described [here](https://www.npmjs.com/package/@opentelemetry/exporter-jaeger) +* fix(otlp-transformer): OTLP json encoding [#4220](https://github.com/open-telemetry/opentelemetry-js/pull/4220) @seemk + * Fixes a bug in the OTLP (http/json) exporters where timestamps were not encoded as strings, causing the export to + be rejected by OTLP endpoints ### :books: (Refine Doc) diff --git a/experimental/packages/exporter-logs-otlp-http/src/platform/browser/OTLPLogExporter.ts b/experimental/packages/exporter-logs-otlp-http/src/platform/browser/OTLPLogExporter.ts index a7ecbbac95..d65ff9aeb8 100644 --- a/experimental/packages/exporter-logs-otlp-http/src/platform/browser/OTLPLogExporter.ts +++ b/experimental/packages/exporter-logs-otlp-http/src/platform/browser/OTLPLogExporter.ts @@ -48,7 +48,10 @@ export class OTLPLogExporter } convert(logRecords: ReadableLogRecord[]): IExportLogsServiceRequest { - return createExportLogsServiceRequest(logRecords, true); + return createExportLogsServiceRequest(logRecords, { + useHex: true, + useLongBits: false, + }); } getDefaultUrl(config: OTLPExporterConfigBase): string { diff --git a/experimental/packages/exporter-logs-otlp-http/src/platform/node/OTLPLogExporter.ts b/experimental/packages/exporter-logs-otlp-http/src/platform/node/OTLPLogExporter.ts index a1d101e87c..25a1b194ab 100644 --- a/experimental/packages/exporter-logs-otlp-http/src/platform/node/OTLPLogExporter.ts +++ b/experimental/packages/exporter-logs-otlp-http/src/platform/node/OTLPLogExporter.ts @@ -48,7 +48,10 @@ export class OTLPLogExporter } convert(logRecords: ReadableLogRecord[]): IExportLogsServiceRequest { - return createExportLogsServiceRequest(logRecords, true); + return createExportLogsServiceRequest(logRecords, { + useHex: true, + useLongBits: false, + }); } getDefaultUrl(config: OTLPExporterNodeConfigBase): string { diff --git a/experimental/packages/exporter-logs-otlp-http/test/logHelper.ts b/experimental/packages/exporter-logs-otlp-http/test/logHelper.ts index b5832f7cd4..bc4d17a4f0 100644 --- a/experimental/packages/exporter-logs-otlp-http/test/logHelper.ts +++ b/experimental/packages/exporter-logs-otlp-http/test/logHelper.ts @@ -20,7 +20,6 @@ import { Resource } from '@opentelemetry/resources'; import * as assert from 'assert'; import { VERSION } from '@opentelemetry/core'; import { - hrTimeToFixed64Nanos, IAnyValue, IExportLogsServiceRequest, IKeyValue, @@ -77,22 +76,17 @@ export function ensureExportedBodyIsCorrect(body?: IAnyValue) { ); } -function hrTimeToFixed64(hrTime: HrTime) { - const { low, high } = hrTimeToFixed64Nanos(hrTime); - return { low, high }; -} - export function ensureExportedLogRecordIsCorrect(logRecord: ILogRecord) { ensureExportedBodyIsCorrect(logRecord.body); ensureExportedAttributesAreCorrect(logRecord.attributes); assert.deepStrictEqual( logRecord.timeUnixNano, - hrTimeToFixed64(mockedReadableLogRecord.hrTime), + '1680253513123241635', 'timeUnixNano is wrong' ); assert.deepStrictEqual( logRecord.observedTimeUnixNano, - hrTimeToFixed64(mockedReadableLogRecord.hrTimeObserved), + '1680253513123241635', 'observedTimeUnixNano is wrong' ); assert.strictEqual( diff --git a/experimental/packages/exporter-trace-otlp-http/src/platform/browser/OTLPTraceExporter.ts b/experimental/packages/exporter-trace-otlp-http/src/platform/browser/OTLPTraceExporter.ts index 8a343306c4..fa164f65cf 100644 --- a/experimental/packages/exporter-trace-otlp-http/src/platform/browser/OTLPTraceExporter.ts +++ b/experimental/packages/exporter-trace-otlp-http/src/platform/browser/OTLPTraceExporter.ts @@ -47,7 +47,10 @@ export class OTLPTraceExporter ); } convert(spans: ReadableSpan[]): IExportTraceServiceRequest { - return createExportTraceServiceRequest(spans, true); + return createExportTraceServiceRequest(spans, { + useHex: true, + useLongBits: false, + }); } getDefaultUrl(config: OTLPExporterConfigBase): string { diff --git a/experimental/packages/exporter-trace-otlp-http/src/platform/node/OTLPTraceExporter.ts b/experimental/packages/exporter-trace-otlp-http/src/platform/node/OTLPTraceExporter.ts index f10fbd0ec0..e4d3273239 100644 --- a/experimental/packages/exporter-trace-otlp-http/src/platform/node/OTLPTraceExporter.ts +++ b/experimental/packages/exporter-trace-otlp-http/src/platform/node/OTLPTraceExporter.ts @@ -53,7 +53,10 @@ export class OTLPTraceExporter } convert(spans: ReadableSpan[]): IExportTraceServiceRequest { - return createExportTraceServiceRequest(spans, true); + return createExportTraceServiceRequest(spans, { + useHex: true, + useLongBits: false, + }); } getDefaultUrl(config: OTLPExporterNodeConfigBase): string { diff --git a/experimental/packages/exporter-trace-otlp-http/test/traceHelper.ts b/experimental/packages/exporter-trace-otlp-http/test/traceHelper.ts index 6726b49017..e89062c924 100644 --- a/experimental/packages/exporter-trace-otlp-http/test/traceHelper.ts +++ b/experimental/packages/exporter-trace-otlp-http/test/traceHelper.ts @@ -31,7 +31,6 @@ import { ILink, IResource, ISpan, - UnsignedLong, } from '@opentelemetry/otlp-transformer'; if (typeof Buffer === 'undefined') { @@ -244,59 +243,54 @@ export const multiInstrumentationLibraryTrace: ReadableSpan[] = [ }, ]; -function fixed64FromString(str: string) { - const { low, high } = UnsignedLong.fromString(str); - return { low, high }; -} - export function ensureEventsAreCorrect(events: IEvent[]) { assert.deepStrictEqual( events, [ { - timeUnixNano: fixed64FromString('1574120165429803070'), + timeUnixNano: '1574120165429803070', name: 'fetchStart', attributes: [], droppedAttributesCount: 0, }, { - timeUnixNano: fixed64FromString('1574120165429803070'), + timeUnixNano: '1574120165429803070', name: 'domainLookupStart', attributes: [], droppedAttributesCount: 0, }, { - timeUnixNano: fixed64FromString('1574120165429803070'), + timeUnixNano: '1574120165429803070', name: 'domainLookupEnd', attributes: [], droppedAttributesCount: 0, }, { - timeUnixNano: fixed64FromString('1574120165429803070'), + timeUnixNano: '1574120165429803070', name: 'connectStart', attributes: [], droppedAttributesCount: 0, }, { - timeUnixNano: fixed64FromString('1574120165429803070'), + timeUnixNano: '1574120165429803070', name: 'connectEnd', attributes: [], droppedAttributesCount: 0, }, { - timeUnixNano: fixed64FromString('1574120165435513070'), + timeUnixNano: '1574120165435513070', name: 'requestStart', attributes: [], droppedAttributesCount: 0, }, { - timeUnixNano: fixed64FromString('1574120165436923070'), + timeUnixNano: '1574120165436923070', name: 'responseStart', attributes: [], droppedAttributesCount: 0, }, { - timeUnixNano: fixed64FromString('1574120165438688070'), + timeUnixNano: '1574120165438688070', name: 'responseEnd', attributes: [], droppedAttributesCount: 0, @@ -372,12 +366,12 @@ export function ensureSpanIsCorrect(span: ISpan, useHex = true) { assert.strictEqual(span.kind, ESpanKind.SPAN_KIND_INTERNAL, 'kind is wrong'); assert.deepStrictEqual( span.startTimeUnixNano, - fixed64FromString('1574120165429803070'), + '1574120165429803070', 'startTimeUnixNano is wrong' ); assert.deepStrictEqual( span.endTimeUnixNano, - fixed64FromString('1574120165438688070'), + '1574120165438688070', 'endTimeUnixNano is wrong' ); assert.strictEqual( diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/test/metricsHelper.ts b/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/test/metricsHelper.ts index e6332ff36f..14c8f3a3df 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/test/metricsHelper.ts +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/test/metricsHelper.ts @@ -33,11 +33,10 @@ import { View, } from '@opentelemetry/sdk-metrics'; import { - hrTimeToFixed64Nanos, + encodeAsString, IKeyValue, IMetric, IResource, - UnsignedLong, } from '@opentelemetry/otlp-transformer'; class TestMetricReader extends MetricReader { @@ -152,14 +151,8 @@ export function ensureExportedCounterIsCorrect( assert.strictEqual(dp.asInt, '1'); assert.strictEqual(dp.flags, 0); - assert.deepStrictEqual( - UnsignedLong.fromString(dp.startTimeUnixNano as string), - hrTimeToFixed64Nanos(startTime) - ); - assert.deepStrictEqual( - UnsignedLong.fromString(dp.timeUnixNano as string), - hrTimeToFixed64Nanos(time) - ); + assert.deepStrictEqual(dp.startTimeUnixNano, encodeAsString(startTime)); + assert.deepStrictEqual(dp.timeUnixNano as string, encodeAsString(time)); } export function ensureExportedObservableGaugeIsCorrect( @@ -179,14 +172,8 @@ export function ensureExportedObservableGaugeIsCorrect( assert.strictEqual(dp.asDouble, 6); assert.strictEqual(dp.flags, 0); - assert.deepStrictEqual( - UnsignedLong.fromString(dp.startTimeUnixNano as string), - hrTimeToFixed64Nanos(startTime) - ); - assert.deepStrictEqual( - UnsignedLong.fromString(dp.timeUnixNano as string), - hrTimeToFixed64Nanos(time) - ); + assert.deepStrictEqual(dp.startTimeUnixNano, encodeAsString(startTime)); + assert.deepStrictEqual(dp.timeUnixNano, encodeAsString(time)); } export function ensureExportedHistogramIsCorrect( @@ -215,14 +202,8 @@ export function ensureExportedHistogramIsCorrect( assert.strictEqual(dp.min, 7); assert.strictEqual(dp.max, 14); - assert.deepStrictEqual( - UnsignedLong.fromString(dp.startTimeUnixNano as string), - hrTimeToFixed64Nanos(startTime) - ); - assert.deepStrictEqual( - UnsignedLong.fromString(dp.timeUnixNano as string), - hrTimeToFixed64Nanos(time) - ); + assert.deepStrictEqual(dp.startTimeUnixNano, encodeAsString(startTime)); + assert.deepStrictEqual(dp.timeUnixNano, encodeAsString(time)); assert.deepStrictEqual(dp.bucketCounts, bucketCounts); assert.deepStrictEqual(dp.explicitBounds, explicitBounds); } diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/platform/browser/OTLPMetricExporter.ts b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/platform/browser/OTLPMetricExporter.ts index 73c99a0693..cff7a6ec00 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/platform/browser/OTLPMetricExporter.ts +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/platform/browser/OTLPMetricExporter.ts @@ -62,7 +62,7 @@ class OTLPExporterBrowserProxy extends OTLPExporterBrowserBase< } convert(metrics: ResourceMetrics[]): IExportMetricsServiceRequest { - return createExportMetricsServiceRequest(metrics); + return createExportMetricsServiceRequest(metrics, { useLongBits: false }); } } diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/platform/node/OTLPMetricExporter.ts b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/platform/node/OTLPMetricExporter.ts index f83e414e70..d051b7be9b 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/platform/node/OTLPMetricExporter.ts +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/src/platform/node/OTLPMetricExporter.ts @@ -52,7 +52,7 @@ class OTLPExporterNodeProxy extends OTLPExporterNodeBase< } convert(metrics: ResourceMetrics[]): IExportMetricsServiceRequest { - return createExportMetricsServiceRequest(metrics); + return createExportMetricsServiceRequest(metrics, { useLongBits: false }); } getDefaultUrl(config: OTLPExporterNodeConfigBase): string { diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/test/metricsHelper.ts b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/test/metricsHelper.ts index 9bbeee652f..5605a69b28 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/test/metricsHelper.ts +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/test/metricsHelper.ts @@ -34,7 +34,7 @@ import { View, } from '@opentelemetry/sdk-metrics'; import { - hrTimeToFixed64Nanos, + encodeAsString, IExportMetricsServiceRequest, IKeyValue, IMetric, @@ -207,11 +207,6 @@ export function ensureWebResourceIsCorrect(resource: IResource) { assert.strictEqual(resource.droppedAttributesCount, 0); } -function hrTimeToFixed64(hrTime: HrTime) { - const { low, high } = hrTimeToFixed64Nanos(hrTime); - return { low, high }; -} - export function ensureCounterIsCorrect( metric: IMetric, time: HrTime, @@ -228,8 +223,8 @@ export function ensureCounterIsCorrect( assert.deepStrictEqual(dp.attributes, []); assert.strictEqual(dp.asInt, 1); - assert.deepStrictEqual(dp.startTimeUnixNano, hrTimeToFixed64(startTime)); - assert.deepStrictEqual(dp.timeUnixNano, hrTimeToFixed64(time)); + assert.deepStrictEqual(dp.startTimeUnixNano, encodeAsString(startTime)); + assert.deepStrictEqual(dp.timeUnixNano, encodeAsString(time)); } export function ensureDoubleCounterIsCorrect( @@ -273,8 +268,8 @@ export function ensureObservableGaugeIsCorrect( assert.deepStrictEqual(dp.attributes, []); assert.strictEqual(dp.asDouble, value); - assert.deepStrictEqual(dp.startTimeUnixNano, hrTimeToFixed64(startTime)); - assert.deepStrictEqual(dp.timeUnixNano, hrTimeToFixed64(time)); + assert.deepStrictEqual(dp.startTimeUnixNano, encodeAsString(startTime)); + assert.deepStrictEqual(dp.timeUnixNano, encodeAsString(time)); } export function ensureHistogramIsCorrect( @@ -300,8 +295,8 @@ export function ensureHistogramIsCorrect( assert.deepStrictEqual(dp.bucketCounts, bucketCounts); assert.deepStrictEqual(dp.explicitBounds, explicitBounds); - assert.deepStrictEqual(dp.startTimeUnixNano, hrTimeToFixed64(startTime)); - assert.deepStrictEqual(dp.timeUnixNano, hrTimeToFixed64(time)); + assert.deepStrictEqual(dp.startTimeUnixNano, encodeAsString(startTime)); + assert.deepStrictEqual(dp.timeUnixNano, encodeAsString(time)); } export function ensureExportMetricsServiceRequestIsSet( diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/test/metricsHelper.ts b/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/test/metricsHelper.ts index 6a47a9a8f6..5c9c29abee 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/test/metricsHelper.ts +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/test/metricsHelper.ts @@ -31,11 +31,10 @@ import { View, } from '@opentelemetry/sdk-metrics'; import { - hrTimeToFixed64Nanos, + encodeAsString, IExportMetricsServiceRequest, IKeyValue, IMetric, - UnsignedLong, } from '@opentelemetry/otlp-transformer'; import { Stream } from 'stream'; @@ -147,14 +146,8 @@ export function ensureExportedCounterIsCorrect( const [dp] = metric.sum.dataPoints; assert.strictEqual(dp.asInt, '1'); - assert.deepStrictEqual( - UnsignedLong.fromString(dp.startTimeUnixNano as string), - hrTimeToFixed64Nanos(startTime) - ); - assert.deepStrictEqual( - UnsignedLong.fromString(dp.timeUnixNano as string), - hrTimeToFixed64Nanos(time) - ); + assert.deepStrictEqual(dp.startTimeUnixNano, encodeAsString(startTime)); + assert.deepStrictEqual(dp.timeUnixNano, encodeAsString(time)); } export function ensureExportedObservableGaugeIsCorrect( @@ -169,14 +162,8 @@ export function ensureExportedObservableGaugeIsCorrect( const [dp] = metric.gauge.dataPoints; assert.strictEqual(dp.asDouble, 6); - assert.deepStrictEqual( - UnsignedLong.fromString(dp.startTimeUnixNano as string), - hrTimeToFixed64Nanos(startTime) - ); - assert.deepStrictEqual( - UnsignedLong.fromString(dp.timeUnixNano as string), - hrTimeToFixed64Nanos(time) - ); + assert.deepStrictEqual(dp.startTimeUnixNano, encodeAsString(startTime)); + assert.deepStrictEqual(dp.timeUnixNano, encodeAsString(time)); } export function ensureExportedHistogramIsCorrect( @@ -204,14 +191,8 @@ export function ensureExportedHistogramIsCorrect( assert.strictEqual(dp.max, 14); assert.deepStrictEqual(dp.explicitBounds, explicitBounds); assert.deepStrictEqual(dp.bucketCounts, bucketCounts); - assert.deepStrictEqual( - UnsignedLong.fromString(dp.startTimeUnixNano as string), - hrTimeToFixed64Nanos(startTime) - ); - assert.deepStrictEqual( - UnsignedLong.fromString(dp.timeUnixNano as string), - hrTimeToFixed64Nanos(time) - ); + assert.deepStrictEqual(dp.startTimeUnixNano, encodeAsString(startTime)); + assert.deepStrictEqual(dp.timeUnixNano, encodeAsString(time)); } export function ensureExportMetricsServiceRequestIsSet( diff --git a/experimental/packages/otlp-transformer/src/common/index.ts b/experimental/packages/otlp-transformer/src/common/index.ts index 19587be3ae..c759fafc4b 100644 --- a/experimental/packages/otlp-transformer/src/common/index.ts +++ b/experimental/packages/otlp-transformer/src/common/index.ts @@ -14,16 +14,72 @@ * limitations under the License. */ -import type { IFixed64 } from './types'; +import type { OtlpEncodingOptions, Fixed64, LongBits } from './types'; import { HrTime } from '@opentelemetry/api'; -import { UnsignedLong } from './unsigned_long'; +import { hexToBase64, hrTimeToNanoseconds } from '@opentelemetry/core'; -export * from './unsigned_long'; +const NANOSECONDS = BigInt(1_000_000_000); -const NANOSECONDS = UnsignedLong.fromU32(1_000_000_000); +export function hrTimeToNanos(hrTime: HrTime): bigint { + return BigInt(hrTime[0]) * NANOSECONDS + BigInt(hrTime[1]); +} + +export function toLongBits(value: bigint): LongBits { + const low = Number(BigInt.asUintN(32, value)); + const high = Number(BigInt.asUintN(32, value >> BigInt(32))); + return { low, high }; +} + +export function encodeAsLongBits(hrTime: HrTime): LongBits { + const nanos = hrTimeToNanos(hrTime); + return toLongBits(nanos); +} + +export function encodeAsString(hrTime: HrTime): string { + const nanos = hrTimeToNanos(hrTime); + return nanos.toString(); +} + +const encodeTimestamp = + typeof BigInt !== 'undefined' ? encodeAsString : hrTimeToNanoseconds; + +export type HrTimeEncodeFunction = (hrTime: HrTime) => Fixed64; +export type SpanContextEncodeFunction = (spanContext: string) => string; +export type OptionalSpanContextEncodeFunction = ( + spanContext: string | undefined +) => string | undefined; + +export interface Encoder { + encodeHrTime: HrTimeEncodeFunction; + encodeSpanContext: SpanContextEncodeFunction; + encodeOptionalSpanContext: OptionalSpanContextEncodeFunction; +} + +function identity(value: T): T { + return value; +} + +function optionalHexToBase64(str: string | undefined): string | undefined { + if (str === undefined) return undefined; + return hexToBase64(str); +} + +const DEFAULT_ENCODER: Encoder = { + encodeHrTime: encodeAsLongBits, + encodeSpanContext: hexToBase64, + encodeOptionalSpanContext: optionalHexToBase64, +}; + +export function getOtlpEncoder(options?: OtlpEncodingOptions): Encoder { + if (options === undefined) { + return DEFAULT_ENCODER; + } -export function hrTimeToFixed64Nanos(hrTime: HrTime): IFixed64 { - return UnsignedLong.fromU32(hrTime[0]) - .multiply(NANOSECONDS) - .add(UnsignedLong.fromU32(hrTime[1])); + const useLongBits = options.useLongBits ?? true; + const useHex = options.useHex ?? false; + return { + encodeHrTime: useLongBits ? encodeAsLongBits : encodeTimestamp, + encodeSpanContext: useHex ? identity : hexToBase64, + encodeOptionalSpanContext: useHex ? identity : optionalHexToBase64, + }; } diff --git a/experimental/packages/otlp-transformer/src/common/types.ts b/experimental/packages/otlp-transformer/src/common/types.ts index 6236da4ce6..732944f2e0 100644 --- a/experimental/packages/otlp-transformer/src/common/types.ts +++ b/experimental/packages/otlp-transformer/src/common/types.ts @@ -74,7 +74,16 @@ export interface IKeyValueList { values: IKeyValue[]; } -export interface IFixed64 { +export interface LongBits { low: number; high: number; } + +export type Fixed64 = LongBits | string | number; + +export interface OtlpEncodingOptions { + /** Convert trace and span IDs to hex strings. */ + useHex?: boolean; + /** Convert HrTime to 2 part 64 bit values. */ + useLongBits?: boolean; +} diff --git a/experimental/packages/otlp-transformer/src/common/unsigned_long.ts b/experimental/packages/otlp-transformer/src/common/unsigned_long.ts deleted file mode 100644 index d2802e3ba8..0000000000 --- a/experimental/packages/otlp-transformer/src/common/unsigned_long.ts +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright 2009 The Closure Library Authors - * Copyright 2020 Daniel Wirtz / The long.js Authors. - * Copyright The OpenTelemetry Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// Original version by long.js: https://github.com/dcodeIO/long.js/ - -const TWO_PWR_32 = (1 << 16) * (1 << 16); - -export class UnsignedLong { - low: number; - high: number; - - constructor(low: number, high: number) { - this.low = low; - this.high = high; - } - - static fromU32(value: number): UnsignedLong { - return new UnsignedLong(value % TWO_PWR_32 | 0, 0); - } - - multiply(value: UnsignedLong): UnsignedLong { - const a48 = this.high >>> 16; - const a32 = this.high & 0xffff; - const a16 = this.low >>> 16; - const a00 = this.low & 0xffff; - - const b48 = value.high >>> 16; - const b32 = value.high & 0xffff; - const b16 = value.low >>> 16; - const b00 = value.low & 0xffff; - - let c48 = 0; - let c32 = 0; - let c16 = 0; - let c00 = 0; - c00 += a00 * b00; - c16 += c00 >>> 16; - c00 &= 0xffff; - c16 += a16 * b00; - c32 += c16 >>> 16; - c16 &= 0xffff; - c16 += a00 * b16; - c32 += c16 >>> 16; - c16 &= 0xffff; - c32 += a32 * b00; - c48 += c32 >>> 16; - c32 &= 0xffff; - c32 += a16 * b16; - c48 += c32 >>> 16; - c32 &= 0xffff; - c32 += a00 * b32; - c48 += c32 >>> 16; - c32 &= 0xffff; - c48 += a48 * b00 + a32 * b16 + a16 * b32 + a00 * b48; - c48 &= 0xffff; - - return new UnsignedLong((c16 << 16) | c00, (c48 << 16) | c32); - } - - add(value: UnsignedLong): UnsignedLong { - const a48 = this.high >>> 16; - const a32 = this.high & 0xffff; - const a16 = this.low >>> 16; - const a00 = this.low & 0xffff; - - const b48 = value.high >>> 16; - const b32 = value.high & 0xffff; - const b16 = value.low >>> 16; - const b00 = value.low & 0xffff; - - let c48 = 0; - let c32 = 0; - let c16 = 0; - let c00 = 0; - c00 += a00 + b00; - c16 += c00 >>> 16; - c00 &= 0xffff; - c16 += a16 + b16; - c32 += c16 >>> 16; - c16 &= 0xffff; - c32 += a32 + b32; - c48 += c32 >>> 16; - c32 &= 0xffff; - c48 += a48 + b48; - c48 &= 0xffff; - - return new UnsignedLong((c16 << 16) | c00, (c48 << 16) | c32); - } - - static fromString(str: string): UnsignedLong { - let result = UnsignedLong.fromU32(0); - - for (let i = 0; i < str.length; i += 8) { - const size = Math.min(8, str.length - i); - const value = parseInt(str.substring(i, i + size)); - if (size < 8) { - const power = UnsignedLong.fromU32(Math.pow(10, size)); - result = result.multiply(power).add(UnsignedLong.fromU32(value)); - } else { - result = result.multiply(UnsignedLong.fromU32(100_000_000)); - result = result.add(UnsignedLong.fromU32(value)); - } - } - - return result; - } -} diff --git a/experimental/packages/otlp-transformer/src/logs/index.ts b/experimental/packages/otlp-transformer/src/logs/index.ts index bffb7966dd..9ca1a40c28 100644 --- a/experimental/packages/otlp-transformer/src/logs/index.ts +++ b/experimental/packages/otlp-transformer/src/logs/index.ts @@ -22,19 +22,19 @@ import { IResourceLogs, } from './types'; import { IResource } from '@opentelemetry/resources'; -import { hrTimeToFixed64Nanos } from '../common'; +import { Encoder, getOtlpEncoder } from '../common'; import { toAnyValue, toAttributes, toKeyValue } from '../common/internal'; -import { hexToBase64 } from '@opentelemetry/core'; import { SeverityNumber } from '@opentelemetry/api-logs'; -import { IKeyValue } from '../common/types'; +import { OtlpEncodingOptions, IKeyValue } from '../common/types'; import { LogAttributes } from '@opentelemetry/api-logs'; export function createExportLogsServiceRequest( logRecords: ReadableLogRecord[], - useHex?: boolean + options?: OtlpEncodingOptions ): IExportLogsServiceRequest { + const encoder = getOtlpEncoder(options); return { - resourceLogs: logRecordsToResourceLogs(logRecords, useHex), + resourceLogs: logRecordsToResourceLogs(logRecords, encoder), }; } @@ -71,7 +71,7 @@ function createResourceMap( function logRecordsToResourceLogs( logRecords: ReadableLogRecord[], - useHex?: boolean + encoder: Encoder ): IResourceLogs[] { const resourceMap = createResourceMap(logRecords); return Array.from(resourceMap, ([resource, ismMap]) => ({ @@ -85,7 +85,7 @@ function logRecordsToResourceLogs( } = scopeLogs[0]; return { scope: { name, version }, - logRecords: scopeLogs.map(log => toLogRecord(log, useHex)), + logRecords: scopeLogs.map(log => toLogRecord(log, encoder)), schemaUrl, }; }), @@ -93,22 +93,18 @@ function logRecordsToResourceLogs( })); } -function toLogRecord(log: ReadableLogRecord, useHex?: boolean): ILogRecord { +function toLogRecord(log: ReadableLogRecord, encoder: Encoder): ILogRecord { return { - timeUnixNano: hrTimeToFixed64Nanos(log.hrTime), - observedTimeUnixNano: hrTimeToFixed64Nanos(log.hrTimeObserved), + timeUnixNano: encoder.encodeHrTime(log.hrTime), + observedTimeUnixNano: encoder.encodeHrTime(log.hrTimeObserved), severityNumber: toSeverityNumber(log.severityNumber), severityText: log.severityText, body: toAnyValue(log.body), attributes: toLogAttributes(log.attributes), droppedAttributesCount: 0, flags: log.spanContext?.traceFlags, - traceId: useHex - ? log.spanContext?.traceId - : optionalHexToBase64(log.spanContext?.traceId), - spanId: useHex - ? log.spanContext?.spanId - : optionalHexToBase64(log.spanContext?.spanId), + traceId: encoder.encodeOptionalSpanContext(log.spanContext?.traceId), + spanId: encoder.encodeOptionalSpanContext(log.spanContext?.spanId), }; } @@ -118,11 +114,6 @@ function toSeverityNumber( return severityNumber as number | undefined as ESeverityNumber | undefined; } -function optionalHexToBase64(str: string | undefined): string | undefined { - if (str === undefined) return undefined; - return hexToBase64(str); -} - export function toLogAttributes(attributes: LogAttributes): IKeyValue[] { return Object.keys(attributes).map(key => toKeyValue(key, attributes[key])); } diff --git a/experimental/packages/otlp-transformer/src/logs/types.ts b/experimental/packages/otlp-transformer/src/logs/types.ts index 7704c37083..2af77ad7c8 100644 --- a/experimental/packages/otlp-transformer/src/logs/types.ts +++ b/experimental/packages/otlp-transformer/src/logs/types.ts @@ -15,8 +15,8 @@ */ import type { + Fixed64, IAnyValue, - IFixed64, IInstrumentationScope, IKeyValue, } from '../common/types'; @@ -68,10 +68,10 @@ export interface IScopeLogs { /** Properties of a LogRecord. */ export interface ILogRecord { /** LogRecord timeUnixNano */ - timeUnixNano: IFixed64; + timeUnixNano: Fixed64; /** LogRecord observedTimeUnixNano */ - observedTimeUnixNano: IFixed64; + observedTimeUnixNano: Fixed64; /** LogRecord severityNumber */ severityNumber?: ESeverityNumber; diff --git a/experimental/packages/otlp-transformer/src/metrics/index.ts b/experimental/packages/otlp-transformer/src/metrics/index.ts index 5cef667c7e..9ef3c57d3d 100644 --- a/experimental/packages/otlp-transformer/src/metrics/index.ts +++ b/experimental/packages/otlp-transformer/src/metrics/index.ts @@ -15,12 +15,16 @@ */ import type { ResourceMetrics } from '@opentelemetry/sdk-metrics'; import type { IExportMetricsServiceRequest } from './types'; +import type { OtlpEncodingOptions } from '../common/types'; import { toResourceMetrics } from './internal'; export function createExportMetricsServiceRequest( - resourceMetrics: ResourceMetrics[] + resourceMetrics: ResourceMetrics[], + options?: OtlpEncodingOptions ): IExportMetricsServiceRequest { return { - resourceMetrics: resourceMetrics.map(metrics => toResourceMetrics(metrics)), + resourceMetrics: resourceMetrics.map(metrics => + toResourceMetrics(metrics, options) + ), }; } diff --git a/experimental/packages/otlp-transformer/src/metrics/internal.ts b/experimental/packages/otlp-transformer/src/metrics/internal.ts index 670741eb30..1a621a4213 100644 --- a/experimental/packages/otlp-transformer/src/metrics/internal.ts +++ b/experimental/packages/otlp-transformer/src/metrics/internal.ts @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import type { OtlpEncodingOptions } from '../common/types'; import { ValueType } from '@opentelemetry/api'; import { AggregationTemporality, @@ -24,7 +25,6 @@ import { ResourceMetrics, ScopeMetrics, } from '@opentelemetry/sdk-metrics'; -import { hrTimeToFixed64Nanos } from '../common'; import { toAttributes } from '../common/internal'; import { EAggregationTemporality, @@ -35,34 +35,40 @@ import { IResourceMetrics, IScopeMetrics, } from './types'; +import { Encoder, getOtlpEncoder } from '../common'; export function toResourceMetrics( - resourceMetrics: ResourceMetrics + resourceMetrics: ResourceMetrics, + options?: OtlpEncodingOptions ): IResourceMetrics { + const encoder = getOtlpEncoder(options); return { resource: { attributes: toAttributes(resourceMetrics.resource.attributes), droppedAttributesCount: 0, }, schemaUrl: undefined, - scopeMetrics: toScopeMetrics(resourceMetrics.scopeMetrics), + scopeMetrics: toScopeMetrics(resourceMetrics.scopeMetrics, encoder), }; } -export function toScopeMetrics(scopeMetrics: ScopeMetrics[]): IScopeMetrics[] { +export function toScopeMetrics( + scopeMetrics: ScopeMetrics[], + encoder: Encoder +): IScopeMetrics[] { return Array.from( scopeMetrics.map(metrics => ({ scope: { name: metrics.scope.name, version: metrics.scope.version, }, - metrics: metrics.metrics.map(metricData => toMetric(metricData)), + metrics: metrics.metrics.map(metricData => toMetric(metricData, encoder)), schemaUrl: metrics.scope.schemaUrl, })) ); } -export function toMetric(metricData: MetricData): IMetric { +export function toMetric(metricData: MetricData, encoder: Encoder): IMetric { const out: IMetric = { name: metricData.descriptor.name, description: metricData.descriptor.description, @@ -78,24 +84,24 @@ export function toMetric(metricData: MetricData): IMetric { out.sum = { aggregationTemporality, isMonotonic: metricData.isMonotonic, - dataPoints: toSingularDataPoints(metricData), + dataPoints: toSingularDataPoints(metricData, encoder), }; break; case DataPointType.GAUGE: out.gauge = { - dataPoints: toSingularDataPoints(metricData), + dataPoints: toSingularDataPoints(metricData, encoder), }; break; case DataPointType.HISTOGRAM: out.histogram = { aggregationTemporality, - dataPoints: toHistogramDataPoints(metricData), + dataPoints: toHistogramDataPoints(metricData, encoder), }; break; case DataPointType.EXPONENTIAL_HISTOGRAM: out.exponentialHistogram = { aggregationTemporality, - dataPoints: toExponentialHistogramDataPoints(metricData), + dataPoints: toExponentialHistogramDataPoints(metricData, encoder), }; break; } @@ -108,12 +114,13 @@ function toSingularDataPoint( | DataPoint | DataPoint | DataPoint, - valueType: ValueType + valueType: ValueType, + encoder: Encoder ) { const out: INumberDataPoint = { attributes: toAttributes(dataPoint.attributes), - startTimeUnixNano: hrTimeToFixed64Nanos(dataPoint.startTime), - timeUnixNano: hrTimeToFixed64Nanos(dataPoint.endTime), + startTimeUnixNano: encoder.encodeHrTime(dataPoint.startTime), + timeUnixNano: encoder.encodeHrTime(dataPoint.endTime), }; switch (valueType) { @@ -128,13 +135,23 @@ function toSingularDataPoint( return out; } -function toSingularDataPoints(metricData: MetricData): INumberDataPoint[] { +function toSingularDataPoints( + metricData: MetricData, + encoder: Encoder +): INumberDataPoint[] { return metricData.dataPoints.map(dataPoint => { - return toSingularDataPoint(dataPoint, metricData.descriptor.valueType); + return toSingularDataPoint( + dataPoint, + metricData.descriptor.valueType, + encoder + ); }); } -function toHistogramDataPoints(metricData: MetricData): IHistogramDataPoint[] { +function toHistogramDataPoints( + metricData: MetricData, + encoder: Encoder +): IHistogramDataPoint[] { return metricData.dataPoints.map(dataPoint => { const histogram = dataPoint.value as Histogram; return { @@ -145,14 +162,15 @@ function toHistogramDataPoints(metricData: MetricData): IHistogramDataPoint[] { sum: histogram.sum, min: histogram.min, max: histogram.max, - startTimeUnixNano: hrTimeToFixed64Nanos(dataPoint.startTime), - timeUnixNano: hrTimeToFixed64Nanos(dataPoint.endTime), + startTimeUnixNano: encoder.encodeHrTime(dataPoint.startTime), + timeUnixNano: encoder.encodeHrTime(dataPoint.endTime), }; }); } function toExponentialHistogramDataPoints( - metricData: MetricData + metricData: MetricData, + encoder: Encoder ): IExponentialHistogramDataPoint[] { return metricData.dataPoints.map(dataPoint => { const histogram = dataPoint.value as ExponentialHistogram; @@ -172,8 +190,8 @@ function toExponentialHistogramDataPoints( }, scale: histogram.scale, zeroCount: histogram.zeroCount, - startTimeUnixNano: hrTimeToFixed64Nanos(dataPoint.startTime), - timeUnixNano: hrTimeToFixed64Nanos(dataPoint.endTime), + startTimeUnixNano: encoder.encodeHrTime(dataPoint.startTime), + timeUnixNano: encoder.encodeHrTime(dataPoint.endTime), }; }); } diff --git a/experimental/packages/otlp-transformer/src/metrics/types.ts b/experimental/packages/otlp-transformer/src/metrics/types.ts index 65a2348516..96a3dda798 100644 --- a/experimental/packages/otlp-transformer/src/metrics/types.ts +++ b/experimental/packages/otlp-transformer/src/metrics/types.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { IFixed64, IInstrumentationScope, IKeyValue } from '../common/types'; +import { Fixed64, IInstrumentationScope, IKeyValue } from '../common/types'; import { IResource } from '../resource/types'; /** Properties of an ExportMetricsServiceRequest. */ @@ -134,10 +134,10 @@ export interface INumberDataPoint { attributes: IKeyValue[]; /** NumberDataPoint startTimeUnixNano */ - startTimeUnixNano?: IFixed64 | string; + startTimeUnixNano?: Fixed64; /** NumberDataPoint timeUnixNano */ - timeUnixNano?: IFixed64 | string; + timeUnixNano?: Fixed64; /** NumberDataPoint asDouble */ asDouble?: number | null; @@ -158,10 +158,10 @@ export interface IHistogramDataPoint { attributes?: IKeyValue[]; /** HistogramDataPoint startTimeUnixNano */ - startTimeUnixNano?: IFixed64 | string; + startTimeUnixNano?: Fixed64; /** HistogramDataPoint timeUnixNano */ - timeUnixNano?: IFixed64 | string; + timeUnixNano?: Fixed64; /** HistogramDataPoint count */ count?: number; @@ -194,10 +194,10 @@ export interface IExponentialHistogramDataPoint { attributes?: IKeyValue[]; /** ExponentialHistogramDataPoint startTimeUnixNano */ - startTimeUnixNano?: IFixed64 | string; + startTimeUnixNano?: Fixed64; /** ExponentialHistogramDataPoint timeUnixNano */ - timeUnixNano?: IFixed64 | string; + timeUnixNano?: Fixed64; /** ExponentialHistogramDataPoint count */ count?: number; diff --git a/experimental/packages/otlp-transformer/src/trace/index.ts b/experimental/packages/otlp-transformer/src/trace/index.ts index ad06612a11..5db18a082e 100644 --- a/experimental/packages/otlp-transformer/src/trace/index.ts +++ b/experimental/packages/otlp-transformer/src/trace/index.ts @@ -15,6 +15,7 @@ */ import type { IResource } from '@opentelemetry/resources'; import type { ReadableSpan } from '@opentelemetry/sdk-trace-base'; +import type { OtlpEncodingOptions } from '../common/types'; import { toAttributes } from '../common/internal'; import { sdkSpanToOtlpSpan } from './internal'; import { @@ -22,13 +23,15 @@ import { IResourceSpans, IScopeSpans, } from './types'; +import { Encoder, getOtlpEncoder } from '../common'; export function createExportTraceServiceRequest( spans: ReadableSpan[], - useHex?: boolean + options?: OtlpEncodingOptions ): IExportTraceServiceRequest { + const encoder = getOtlpEncoder(options); return { - resourceSpans: spanRecordsToResourceSpans(spans, useHex), + resourceSpans: spanRecordsToResourceSpans(spans, encoder), }; } @@ -61,7 +64,7 @@ function createResourceMap(readableSpans: ReadableSpan[]) { function spanRecordsToResourceSpans( readableSpans: ReadableSpan[], - useHex?: boolean + encoder: Encoder ): IResourceSpans[] { const resourceMap = createResourceMap(readableSpans); const out: IResourceSpans[] = []; @@ -79,7 +82,7 @@ function spanRecordsToResourceSpans( const { name, version, schemaUrl } = scopeSpans[0].instrumentationLibrary; const spans = scopeSpans.map(readableSpan => - sdkSpanToOtlpSpan(readableSpan, useHex) + sdkSpanToOtlpSpan(readableSpan, encoder) ); scopeResourceSpans.push({ diff --git a/experimental/packages/otlp-transformer/src/trace/internal.ts b/experimental/packages/otlp-transformer/src/trace/internal.ts index d9c17855ce..a4236e5dca 100644 --- a/experimental/packages/otlp-transformer/src/trace/internal.ts +++ b/experimental/packages/otlp-transformer/src/trace/internal.ts @@ -15,64 +15,57 @@ */ import type { Link } from '@opentelemetry/api'; import type { ReadableSpan, TimedEvent } from '@opentelemetry/sdk-trace-base'; -import { hrTimeToFixed64Nanos } from '../common'; +import type { Encoder } from '../common'; import { toAttributes } from '../common/internal'; import { EStatusCode, IEvent, ILink, ISpan } from './types'; -import * as core from '@opentelemetry/core'; -export function sdkSpanToOtlpSpan(span: ReadableSpan, useHex?: boolean): ISpan { +export function sdkSpanToOtlpSpan(span: ReadableSpan, encoder: Encoder): ISpan { const ctx = span.spanContext(); const status = span.status; - const parentSpanId = useHex - ? span.parentSpanId - : span.parentSpanId != null - ? core.hexToBase64(span.parentSpanId) - : undefined; return { - traceId: useHex ? ctx.traceId : core.hexToBase64(ctx.traceId), - spanId: useHex ? ctx.spanId : core.hexToBase64(ctx.spanId), - parentSpanId: parentSpanId, + traceId: encoder.encodeSpanContext(ctx.traceId), + spanId: encoder.encodeSpanContext(ctx.spanId), + parentSpanId: encoder.encodeOptionalSpanContext(span.parentSpanId), traceState: ctx.traceState?.serialize(), name: span.name, // Span kind is offset by 1 because the API does not define a value for unset kind: span.kind == null ? 0 : span.kind + 1, - startTimeUnixNano: hrTimeToFixed64Nanos(span.startTime), - endTimeUnixNano: hrTimeToFixed64Nanos(span.endTime), + startTimeUnixNano: encoder.encodeHrTime(span.startTime), + endTimeUnixNano: encoder.encodeHrTime(span.endTime), attributes: toAttributes(span.attributes), droppedAttributesCount: span.droppedAttributesCount, - events: span.events.map(toOtlpSpanEvent), + events: span.events.map(event => toOtlpSpanEvent(event, encoder)), droppedEventsCount: span.droppedEventsCount, status: { // API and proto enums share the same values code: status.code as unknown as EStatusCode, message: status.message, }, - links: span.links.map(link => toOtlpLink(link, useHex)), + links: span.links.map(link => toOtlpLink(link, encoder)), droppedLinksCount: span.droppedLinksCount, }; } -export function toOtlpLink(link: Link, useHex?: boolean): ILink { +export function toOtlpLink(link: Link, encoder: Encoder): ILink { return { attributes: link.attributes ? toAttributes(link.attributes) : [], - spanId: useHex - ? link.context.spanId - : core.hexToBase64(link.context.spanId), - traceId: useHex - ? link.context.traceId - : core.hexToBase64(link.context.traceId), + spanId: encoder.encodeSpanContext(link.context.spanId), + traceId: encoder.encodeSpanContext(link.context.traceId), traceState: link.context.traceState?.serialize(), droppedAttributesCount: link.droppedAttributesCount || 0, }; } -export function toOtlpSpanEvent(timedEvent: TimedEvent): IEvent { +export function toOtlpSpanEvent( + timedEvent: TimedEvent, + encoder: Encoder +): IEvent { return { attributes: timedEvent.attributes ? toAttributes(timedEvent.attributes) : [], name: timedEvent.name, - timeUnixNano: hrTimeToFixed64Nanos(timedEvent.time), + timeUnixNano: encoder.encodeHrTime(timedEvent.time), droppedAttributesCount: timedEvent.droppedAttributesCount || 0, }; } diff --git a/experimental/packages/otlp-transformer/src/trace/types.ts b/experimental/packages/otlp-transformer/src/trace/types.ts index 294f45652f..b9618dd75f 100644 --- a/experimental/packages/otlp-transformer/src/trace/types.ts +++ b/experimental/packages/otlp-transformer/src/trace/types.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { IFixed64, IInstrumentationScope, IKeyValue } from '../common/types'; +import { Fixed64, IInstrumentationScope, IKeyValue } from '../common/types'; import { IResource } from '../resource/types'; /** Properties of an ExportTraceServiceRequest. */ @@ -81,10 +81,10 @@ export interface ISpan { kind: ESpanKind; /** Span startTimeUnixNano */ - startTimeUnixNano: IFixed64; + startTimeUnixNano: Fixed64; /** Span endTimeUnixNano */ - endTimeUnixNano: IFixed64; + endTimeUnixNano: Fixed64; /** Span attributes */ attributes: IKeyValue[]; @@ -166,7 +166,7 @@ export const enum EStatusCode { /** Properties of an Event. */ export interface IEvent { /** Event timeUnixNano */ - timeUnixNano: IFixed64; + timeUnixNano: Fixed64; /** Event name */ name: string; diff --git a/experimental/packages/otlp-transformer/test/common.test.ts b/experimental/packages/otlp-transformer/test/common.test.ts index dfcb24d6f5..d31267406c 100644 --- a/experimental/packages/otlp-transformer/test/common.test.ts +++ b/experimental/packages/otlp-transformer/test/common.test.ts @@ -14,9 +14,14 @@ * limitations under the License. */ +import { hexToBase64 } from '@opentelemetry/core'; +import { getOtlpEncoder } from '../src'; import { toAnyValue } from '../src/common/internal'; import * as assert from 'assert'; +const traceId = 'abcdef01234567890000000000000000'; +const spanId = '12341234abcdabcd'; + describe('common', () => { describe('toAnyValue', () => { it('serializes an array', () => { @@ -63,4 +68,64 @@ describe('common', () => { }); }); }); + + describe('otlp encoder', () => { + it('defaults to long timestamps and base64 encoding given no options', () => { + const encoder = getOtlpEncoder(); + assert.deepStrictEqual(encoder.encodeHrTime([1697978649, 99870675]), { + low: 3352011219, + high: 395341461, + }); + assert.deepStrictEqual( + encoder.encodeSpanContext(traceId), + hexToBase64(traceId) + ); + assert.deepStrictEqual( + encoder.encodeOptionalSpanContext(spanId), + hexToBase64(spanId) + ); + assert.deepStrictEqual( + encoder.encodeOptionalSpanContext(undefined), + undefined + ); + }); + + it('defaults to long timestamps and base64 encoding given empty options', () => { + const encoder = getOtlpEncoder({}); + assert.deepStrictEqual(encoder.encodeHrTime([1697978649, 99870675]), { + low: 3352011219, + high: 395341461, + }); + assert.deepStrictEqual( + encoder.encodeSpanContext(traceId), + hexToBase64(traceId) + ); + assert.deepStrictEqual( + encoder.encodeOptionalSpanContext(spanId), + hexToBase64(spanId) + ); + assert.deepStrictEqual( + encoder.encodeOptionalSpanContext(undefined), + undefined + ); + }); + + it('can encode HrTime as string', () => { + const encoder = getOtlpEncoder({ useLongBits: false }); + assert.deepStrictEqual( + encoder.encodeHrTime([1697978649, 99870675]), + '1697978649099870675' + ); + }); + + it('can encode span context as hex', () => { + const encoder = getOtlpEncoder({ useHex: true }); + assert.deepStrictEqual(encoder.encodeSpanContext(traceId), traceId); + assert.deepStrictEqual(encoder.encodeOptionalSpanContext(spanId), spanId); + assert.deepStrictEqual( + encoder.encodeOptionalSpanContext(undefined), + undefined + ); + }); + }); }); diff --git a/experimental/packages/otlp-transformer/test/logs.test.ts b/experimental/packages/otlp-transformer/test/logs.test.ts index 0937c7d152..85e55e9fd7 100644 --- a/experimental/packages/otlp-transformer/test/logs.test.ts +++ b/experimental/packages/otlp-transformer/test/logs.test.ts @@ -21,7 +21,6 @@ import { createExportLogsServiceRequest, ESeverityNumber, IExportLogsServiceRequest, - UnsignedLong, } from '../src'; import { ReadableLogRecord } from '@opentelemetry/sdk-logs'; import { SeverityNumber } from '@opentelemetry/api-logs'; @@ -50,8 +49,8 @@ function createExpectedLogJson(useHex: boolean): IExportLogsServiceRequest { scope: { name: 'scope_name_1', version: '0.1.0' }, logRecords: [ { - timeUnixNano: new UnsignedLong(-162521437, 391214506), - observedTimeUnixNano: new UnsignedLong(584929536, 391976663), + timeUnixNano: { low: 4132445859, high: 391214506 }, + observedTimeUnixNano: { low: 584929536, high: 391976663 }, severityNumber: ESeverityNumber.SEVERITY_NUMBER_ERROR, severityText: 'error', body: { stringValue: 'some_log_body' }, @@ -147,19 +146,26 @@ describe('Logs', () => { }); it('returns null on an empty list', () => { - assert.deepStrictEqual(createExportLogsServiceRequest([], true), { - resourceLogs: [], - }); + assert.deepStrictEqual( + createExportLogsServiceRequest([], { useHex: true }), + { + resourceLogs: [], + } + ); }); it('serializes a log record with useHex = true', () => { - const exportRequest = createExportLogsServiceRequest([log_1_1_1], true); + const exportRequest = createExportLogsServiceRequest([log_1_1_1], { + useHex: true, + }); assert.ok(exportRequest); assert.deepStrictEqual(exportRequest, createExpectedLogJson(true)); }); it('serializes a log record with useHex = false', () => { - const exportRequest = createExportLogsServiceRequest([log_1_1_1], false); + const exportRequest = createExportLogsServiceRequest([log_1_1_1], { + useHex: false, + }); assert.ok(exportRequest); assert.deepStrictEqual(exportRequest, createExpectedLogJson(false)); }); @@ -167,7 +173,7 @@ describe('Logs', () => { it('aggregates multiple logs with same resource and same scope', () => { const exportRequest = createExportLogsServiceRequest( [log_1_1_1, log_1_1_2], - false + { useHex: false } ); assert.ok(exportRequest); assert.strictEqual(exportRequest.resourceLogs?.length, 1); @@ -181,7 +187,7 @@ describe('Logs', () => { it('aggregates multiple logs with same resource and different scopes', () => { const exportRequest = createExportLogsServiceRequest( [log_1_1_1, log_1_2_1], - false + { useHex: false } ); assert.ok(exportRequest); assert.strictEqual(exportRequest.resourceLogs?.length, 1); @@ -191,7 +197,7 @@ describe('Logs', () => { it('aggregates multiple logs with different resources', () => { const exportRequest = createExportLogsServiceRequest( [log_1_1_1, log_2_1_1], - false + { useHex: false } ); assert.ok(exportRequest); assert.strictEqual(exportRequest.resourceLogs?.length, 2); diff --git a/experimental/packages/otlp-transformer/test/metrics.test.ts b/experimental/packages/otlp-transformer/test/metrics.test.ts index 15fd7d0531..526458e658 100644 --- a/experimental/packages/otlp-transformer/test/metrics.test.ts +++ b/experimental/packages/otlp-transformer/test/metrics.test.ts @@ -26,7 +26,7 @@ import * as assert from 'assert'; import { createExportMetricsServiceRequest } from '../src/metrics'; import { EAggregationTemporality } from '../src/metrics/types'; import { hrTime } from '@opentelemetry/core'; -import { hrTimeToFixed64Nanos } from '../src/common'; +import { encodeAsLongBits } from '../src'; const START_TIME = hrTime(); const END_TIME = hrTime(); @@ -351,8 +351,8 @@ describe('Metrics', () => { dataPoints: [ { attributes: expectedAttributes, - startTimeUnixNano: hrTimeToFixed64Nanos(START_TIME), - timeUnixNano: hrTimeToFixed64Nanos(END_TIME), + startTimeUnixNano: encodeAsLongBits(START_TIME), + timeUnixNano: encodeAsLongBits(END_TIME), asInt: 10, }, ], @@ -394,8 +394,8 @@ describe('Metrics', () => { dataPoints: [ { attributes: expectedAttributes, - startTimeUnixNano: hrTimeToFixed64Nanos(START_TIME), - timeUnixNano: hrTimeToFixed64Nanos(END_TIME), + startTimeUnixNano: encodeAsLongBits(START_TIME), + timeUnixNano: encodeAsLongBits(END_TIME), asInt: 10, }, ], @@ -438,8 +438,8 @@ describe('Metrics', () => { dataPoints: [ { attributes: expectedAttributes, - startTimeUnixNano: hrTimeToFixed64Nanos(START_TIME), - timeUnixNano: hrTimeToFixed64Nanos(END_TIME), + startTimeUnixNano: encodeAsLongBits(START_TIME), + timeUnixNano: encodeAsLongBits(END_TIME), asInt: 10, }, ], @@ -482,8 +482,8 @@ describe('Metrics', () => { dataPoints: [ { attributes: expectedAttributes, - startTimeUnixNano: hrTimeToFixed64Nanos(START_TIME), - timeUnixNano: hrTimeToFixed64Nanos(END_TIME), + startTimeUnixNano: encodeAsLongBits(START_TIME), + timeUnixNano: encodeAsLongBits(END_TIME), asInt: 10, }, ], @@ -524,8 +524,8 @@ describe('Metrics', () => { dataPoints: [ { attributes: expectedAttributes, - startTimeUnixNano: hrTimeToFixed64Nanos(START_TIME), - timeUnixNano: hrTimeToFixed64Nanos(END_TIME), + startTimeUnixNano: encodeAsLongBits(START_TIME), + timeUnixNano: encodeAsLongBits(END_TIME), asDouble: 10.5, }, ], @@ -582,8 +582,8 @@ describe('Metrics', () => { sum: 9, min: 1, max: 8, - startTimeUnixNano: hrTimeToFixed64Nanos(START_TIME), - timeUnixNano: hrTimeToFixed64Nanos(END_TIME), + startTimeUnixNano: encodeAsLongBits(START_TIME), + timeUnixNano: encodeAsLongBits(END_TIME), }, ], }, @@ -636,8 +636,8 @@ describe('Metrics', () => { sum: 9, min: undefined, max: undefined, - startTimeUnixNano: hrTimeToFixed64Nanos(START_TIME), - timeUnixNano: hrTimeToFixed64Nanos(END_TIME), + startTimeUnixNano: encodeAsLongBits(START_TIME), + timeUnixNano: encodeAsLongBits(END_TIME), }, ], }, @@ -702,8 +702,8 @@ describe('Metrics', () => { bucketCounts: [1, 0, 0, 0, 1, 0, 1, 0], }, negative: { offset: 0, bucketCounts: [0] }, - startTimeUnixNano: hrTimeToFixed64Nanos(START_TIME), - timeUnixNano: hrTimeToFixed64Nanos(END_TIME), + startTimeUnixNano: encodeAsLongBits(START_TIME), + timeUnixNano: encodeAsLongBits(END_TIME), }, ], }, @@ -764,8 +764,8 @@ describe('Metrics', () => { bucketCounts: [1, 0, 0, 0, 1, 0, 1, 0], }, negative: { offset: 0, bucketCounts: [0] }, - startTimeUnixNano: hrTimeToFixed64Nanos(START_TIME), - timeUnixNano: hrTimeToFixed64Nanos(END_TIME), + startTimeUnixNano: encodeAsLongBits(START_TIME), + timeUnixNano: encodeAsLongBits(END_TIME), }, ], }, diff --git a/experimental/packages/otlp-transformer/test/trace.test.ts b/experimental/packages/otlp-transformer/test/trace.test.ts index 380c9065c2..1eb786b30f 100644 --- a/experimental/packages/otlp-transformer/test/trace.test.ts +++ b/experimental/packages/otlp-transformer/test/trace.test.ts @@ -19,13 +19,26 @@ import { Resource } from '@opentelemetry/resources'; import { ReadableSpan } from '@opentelemetry/sdk-trace-base'; import * as assert from 'assert'; import { + OtlpEncodingOptions, createExportTraceServiceRequest, ESpanKind, EStatusCode, - UnsignedLong, } from '../src'; -function createExpectedSpanJson(useHex: boolean) { +function createExpectedSpanJson(options: OtlpEncodingOptions) { + const useHex = options.useHex ?? false; + const useLongBits = options.useLongBits ?? true; + + const startTime = useLongBits + ? { low: 1155450124, high: 382008859 } + : '1640715557342725388'; + const endTime = useLongBits + ? { low: 2455450124, high: 382008859 } + : '1640715558642725388'; + const eventTime = useLongBits + ? { low: 2355450124, high: 382008859 } + : '1640715558542725388'; + const traceId = useHex ? '00000000000000000000000000000001' : hexToBase64('00000000000000000000000000000001'); @@ -80,8 +93,8 @@ function createExpectedSpanJson(useHex: boolean) { ], }, ], - startTimeUnixNano: new UnsignedLong(1155450124, 382008859), - endTimeUnixNano: new UnsignedLong(-1839517172, 382008859), + startTimeUnixNano: startTime, + endTimeUnixNano: endTime, events: [ { droppedAttributesCount: 0, @@ -94,7 +107,7 @@ function createExpectedSpanJson(useHex: boolean) { }, ], name: 'some event', - timeUnixNano: new UnsignedLong(-1939517172, 382008859), + timeUnixNano: eventTime, }, ], attributes: [ @@ -184,26 +197,48 @@ describe('Trace', () => { }); it('returns null on an empty list', () => { - assert.deepStrictEqual(createExportTraceServiceRequest([], true), { - resourceSpans: [], - }); + assert.deepStrictEqual( + createExportTraceServiceRequest([], { useHex: true }), + { + resourceSpans: [], + } + ); }); it('serializes a span with useHex = true', () => { - const exportRequest = createExportTraceServiceRequest([span], true); + const exportRequest = createExportTraceServiceRequest([span], { + useHex: true, + }); assert.ok(exportRequest); - assert.deepStrictEqual(exportRequest, createExpectedSpanJson(true)); + assert.deepStrictEqual( + exportRequest, + createExpectedSpanJson({ useHex: true }) + ); }); it('serializes a span with useHex = false', () => { - const exportRequest = createExportTraceServiceRequest([span], false); + const exportRequest = createExportTraceServiceRequest([span], { + useHex: false, + }); assert.ok(exportRequest); - assert.deepStrictEqual(exportRequest, createExpectedSpanJson(false)); + assert.deepStrictEqual( + exportRequest, + createExpectedSpanJson({ useHex: false }) + ); + }); + + it('serializes a span with string timestamps', () => { + const options: OtlpEncodingOptions = { useLongBits: false }; + const exportRequest = createExportTraceServiceRequest([span], options); + assert.ok(exportRequest); + assert.deepStrictEqual(exportRequest, createExpectedSpanJson(options)); }); it('serializes a span without a parent with useHex = true', () => { (span as any).parentSpanId = undefined; - const exportRequest = createExportTraceServiceRequest([span], true); + const exportRequest = createExportTraceServiceRequest([span], { + useHex: true, + }); assert.ok(exportRequest); assert.strictEqual( exportRequest.resourceSpans?.[0].scopeSpans[0].spans?.[0].parentSpanId, @@ -213,7 +248,9 @@ describe('Trace', () => { it('serializes a span without a parent with useHex = false', () => { (span as any).parentSpanId = undefined; - const exportRequest = createExportTraceServiceRequest([span], false); + const exportRequest = createExportTraceServiceRequest([span], { + useHex: false, + }); assert.ok(exportRequest); assert.strictEqual( exportRequest.resourceSpans?.[0].scopeSpans[0].spans?.[0].parentSpanId, @@ -225,7 +262,9 @@ describe('Trace', () => { it('error', () => { span.status.code = SpanStatusCode.ERROR; span.status.message = 'error message'; - const exportRequest = createExportTraceServiceRequest([span], true); + const exportRequest = createExportTraceServiceRequest([span], { + useHex: true, + }); assert.ok(exportRequest); const spanStatus = exportRequest.resourceSpans?.[0].scopeSpans[0].spans?.[0].status; @@ -235,7 +274,9 @@ describe('Trace', () => { it('unset', () => { span.status.code = SpanStatusCode.UNSET; - const exportRequest = createExportTraceServiceRequest([span], true); + const exportRequest = createExportTraceServiceRequest([span], { + useHex: true, + }); assert.ok(exportRequest); assert.strictEqual( exportRequest.resourceSpans?.[0].scopeSpans[0].spans?.[0].status.code, @@ -247,7 +288,9 @@ describe('Trace', () => { describe('span kind', () => { it('consumer', () => { (span as any).kind = SpanKind.CONSUMER; - const exportRequest = createExportTraceServiceRequest([span], true); + const exportRequest = createExportTraceServiceRequest([span], { + useHex: true, + }); assert.ok(exportRequest); assert.strictEqual( exportRequest.resourceSpans?.[0].scopeSpans[0].spans?.[0].kind, @@ -256,7 +299,9 @@ describe('Trace', () => { }); it('internal', () => { (span as any).kind = SpanKind.INTERNAL; - const exportRequest = createExportTraceServiceRequest([span], true); + const exportRequest = createExportTraceServiceRequest([span], { + useHex: true, + }); assert.ok(exportRequest); assert.strictEqual( exportRequest.resourceSpans?.[0].scopeSpans[0].spans?.[0].kind, @@ -265,7 +310,9 @@ describe('Trace', () => { }); it('producer', () => { (span as any).kind = SpanKind.PRODUCER; - const exportRequest = createExportTraceServiceRequest([span], true); + const exportRequest = createExportTraceServiceRequest([span], { + useHex: true, + }); assert.ok(exportRequest); assert.strictEqual( exportRequest.resourceSpans?.[0].scopeSpans[0].spans?.[0].kind, @@ -274,7 +321,9 @@ describe('Trace', () => { }); it('server', () => { (span as any).kind = SpanKind.SERVER; - const exportRequest = createExportTraceServiceRequest([span], true); + const exportRequest = createExportTraceServiceRequest([span], { + useHex: true, + }); assert.ok(exportRequest); assert.strictEqual( exportRequest.resourceSpans?.[0].scopeSpans[0].spans?.[0].kind, @@ -283,7 +332,9 @@ describe('Trace', () => { }); it('unspecified', () => { (span as any).kind = undefined; - const exportRequest = createExportTraceServiceRequest([span], true); + const exportRequest = createExportTraceServiceRequest([span], { + useHex: true, + }); assert.ok(exportRequest); assert.strictEqual( exportRequest.resourceSpans?.[0].scopeSpans[0].spans?.[0].kind, From cd232cde144ca31126db33b44e9041277f579f66 Mon Sep 17 00:00:00 2001 From: David Luna Date: Mon, 6 Nov 2023 16:11:05 +0100 Subject: [PATCH 3/3] fix: remove duplicate export star from version.ts (#4225) Co-authored-by: Marc Pichler --- CHANGELOG.md | 2 ++ packages/opentelemetry-core/src/index.ts | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5cd39df78c..ef885fe910 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,8 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/ ### :bug: (Bug Fix) +* fix(core): remove re-export of `version.ts` [#4225](https://github.com/open-telemetry/opentelemetry-js/pull/4225) @david-luna + ### :books: (Refine Doc) ### :house: (Internal) diff --git a/packages/opentelemetry-core/src/index.ts b/packages/opentelemetry-core/src/index.ts index a07b877244..a3ab418117 100644 --- a/packages/opentelemetry-core/src/index.ts +++ b/packages/opentelemetry-core/src/index.ts @@ -22,7 +22,6 @@ export * from './common/logging-error-handler'; export * from './common/time'; export * from './common/types'; export * from './ExportResult'; -export * from './version'; export * as baggageUtils from './baggage/utils'; export * from './platform'; export * from './propagation/composite';