diff --git a/CHANGELOG.md b/CHANGELOG.md index edf81233a1..40b17374f7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,10 +11,22 @@ For experimental package changes, see the [experimental CHANGELOG](experimental/ ### :rocket: (Enhancement) +* feat(metrics): prototype experimental advice support [#3876](https://github.com/open-telemetry/opentelemetry-js/pull/3876) @legendecas + +### :bug: (Bug Fix) + +### :books: (Refine Doc) + +### :house: (Internal) + +## 1.17.1 + ### :bug: (Bug Fix) * fix(sdk-trace-base): BatchSpanProcessor flushes when `maxExportBatchSize` is reached [#3958](https://github.com/open-telemetry/opentelemetry-js/pull/3958) @nordfjord * fix(sdk-metrics): allow instrument names to contain '/' [#4155](https://github.com/open-telemetry/opentelemetry-js/pull/4155) +* fix(sdk-metrics): prevent per-reader storages from keeping unreported accumulations in memory [#4163](https://github.com/open-telemetry/opentelemetry-js/pull/4163) @pichlermarc + * fixes a memory leak which occurred when two or more `MetricReader` instances are registered to a `MeterProvider` * fix(sdk-metrics): do not report empty scopes and metrics [#4135](https://github.com/open-telemetry/opentelemetry-js/pull/4135) @pichlermarc * Instruments that were created, but did not have measurements will not be exported anymore * Meters (Scopes) that were created, but did not have any instruments with measurements under them will not be exported anymore. diff --git a/api/CHANGELOG.md b/api/CHANGELOG.md index cba48a4149..4738e1449e 100644 --- a/api/CHANGELOG.md +++ b/api/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. ## Unreleased +### :rocket: (Enhancement) + +* feat(metrics): prototype experimental advice support [#3876](https://github.com/open-telemetry/opentelemetry-js/pull/3876) @legendecas + ## 1.6.0 ### :bug: (Bug Fix) diff --git a/api/src/index.ts b/api/src/index.ts index 6992005874..c5dbe1685b 100644 --- a/api/src/index.ts +++ b/api/src/index.ts @@ -51,6 +51,7 @@ export { ObservableUpDownCounter, UpDownCounter, BatchObservableCallback, + MetricAdvice, MetricAttributes, MetricAttributeValue, ObservableCallback, diff --git a/api/src/metrics/Metric.ts b/api/src/metrics/Metric.ts index 533aa264b1..e8abca3b1d 100644 --- a/api/src/metrics/Metric.ts +++ b/api/src/metrics/Metric.ts @@ -18,6 +18,18 @@ import { Attributes, AttributeValue } from '../common/Attributes'; import { Context } from '../context/types'; import { BatchObservableResult, ObservableResult } from './ObservableResult'; +/** + * Advisory options influencing aggregation configuration parameters. + * @experimental + */ +export interface MetricAdvice { + /** + * Hint the explicit bucket boundaries for SDK if the metric is been + * aggregated with a HistogramAggregator. + */ + explicitBucketBoundaries?: number[]; +} + /** * Options needed for metric creation */ @@ -39,6 +51,12 @@ export interface MetricOptions { * @default {@link ValueType.DOUBLE} */ valueType?: ValueType; + + /** + * The advice influencing aggregation configuration parameters. + * @experimental + */ + advice?: MetricAdvice; } /** The Type of value. It describes how the data is reported. */ diff --git a/examples/esm-http-ts/package.json b/examples/esm-http-ts/package.json index 046ab7fe0a..8920f11670 100644 --- a/examples/esm-http-ts/package.json +++ b/examples/esm-http-ts/package.json @@ -1,7 +1,7 @@ { "name": "esm-http-ts", "private": true, - "version": "0.43.0", + "version": "0.44.0", "description": "Example of HTTP integration with OpenTelemetry using ESM and TypeScript", "main": "build/index.js", "type": "module", @@ -31,12 +31,12 @@ "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/", "dependencies": { "@opentelemetry/api": "1.6.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.43.0", - "@opentelemetry/instrumentation": "0.43.0", - "@opentelemetry/instrumentation-http": "0.43.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0", - "@opentelemetry/sdk-trace-node": "1.17.0", - "@opentelemetry/semantic-conventions": "1.17.0" + "@opentelemetry/exporter-trace-otlp-proto": "0.44.0", + "@opentelemetry/instrumentation": "0.44.0", + "@opentelemetry/instrumentation-http": "0.44.0", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/sdk-trace-base": "1.17.1", + "@opentelemetry/sdk-trace-node": "1.17.1", + "@opentelemetry/semantic-conventions": "1.17.1" } } diff --git a/examples/http/package.json b/examples/http/package.json index 9a3bcb2de4..4ea1cafe3f 100644 --- a/examples/http/package.json +++ b/examples/http/package.json @@ -1,7 +1,7 @@ { "name": "http-example", "private": true, - "version": "0.43.0", + "version": "0.44.0", "description": "Example of HTTP integration with OpenTelemetry", "main": "index.js", "scripts": { @@ -29,14 +29,14 @@ }, "dependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/exporter-jaeger": "1.17.0", - "@opentelemetry/exporter-zipkin": "1.17.0", - "@opentelemetry/instrumentation": "0.43.0", - "@opentelemetry/instrumentation-http": "0.43.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0", - "@opentelemetry/sdk-trace-node": "1.17.0", - "@opentelemetry/semantic-conventions": "1.17.0" + "@opentelemetry/exporter-jaeger": "1.17.1", + "@opentelemetry/exporter-zipkin": "1.17.1", + "@opentelemetry/instrumentation": "0.44.0", + "@opentelemetry/instrumentation-http": "0.44.0", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/sdk-trace-base": "1.17.1", + "@opentelemetry/sdk-trace-node": "1.17.1", + "@opentelemetry/semantic-conventions": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/http", "devDependencies": { diff --git a/examples/https/package.json b/examples/https/package.json index 3653c96ff5..13434d9151 100644 --- a/examples/https/package.json +++ b/examples/https/package.json @@ -1,7 +1,7 @@ { "name": "https-example", "private": true, - "version": "0.43.0", + "version": "0.44.0", "description": "Example of HTTPs integration with OpenTelemetry", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -33,14 +33,14 @@ }, "dependencies": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/exporter-jaeger": "1.17.0", - "@opentelemetry/exporter-zipkin": "1.17.0", - "@opentelemetry/instrumentation": "0.43.0", - "@opentelemetry/instrumentation-http": "0.43.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0", - "@opentelemetry/sdk-trace-node": "1.17.0", - "@opentelemetry/semantic-conventions": "1.17.0" + "@opentelemetry/exporter-jaeger": "1.17.1", + "@opentelemetry/exporter-zipkin": "1.17.1", + "@opentelemetry/instrumentation": "0.44.0", + "@opentelemetry/instrumentation-http": "0.44.0", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/sdk-trace-base": "1.17.1", + "@opentelemetry/sdk-trace-node": "1.17.1", + "@opentelemetry/semantic-conventions": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/https", "devDependencies": { diff --git a/examples/opentelemetry-web/package.json b/examples/opentelemetry-web/package.json index 4a8abc9e17..0e3d5febad 100644 --- a/examples/opentelemetry-web/package.json +++ b/examples/opentelemetry-web/package.json @@ -1,7 +1,7 @@ { "name": "web-opentelemetry-example", "private": true, - "version": "0.43.0", + "version": "0.44.0", "description": "Example of using @opentelemetry/sdk-trace-web and @opentelemetry/sdk-metrics in browser", "main": "index.js", "scripts": { @@ -43,20 +43,20 @@ }, "dependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/context-zone": "1.17.0", - "@opentelemetry/core": "1.17.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.43.0", - "@opentelemetry/exporter-trace-otlp-http": "0.43.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.43.0", - "@opentelemetry/exporter-zipkin": "1.17.0", - "@opentelemetry/instrumentation": "0.43.0", - "@opentelemetry/instrumentation-fetch": "0.43.0", - "@opentelemetry/instrumentation-xml-http-request": "0.43.0", - "@opentelemetry/propagator-b3": "1.17.0", - "@opentelemetry/sdk-metrics": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0", - "@opentelemetry/sdk-trace-web": "1.17.0", - "@opentelemetry/semantic-conventions": "1.17.0" + "@opentelemetry/context-zone": "1.17.1", + "@opentelemetry/core": "1.17.1", + "@opentelemetry/exporter-metrics-otlp-http": "0.44.0", + "@opentelemetry/exporter-trace-otlp-http": "0.44.0", + "@opentelemetry/exporter-trace-otlp-proto": "0.44.0", + "@opentelemetry/exporter-zipkin": "1.17.1", + "@opentelemetry/instrumentation": "0.44.0", + "@opentelemetry/instrumentation-fetch": "0.44.0", + "@opentelemetry/instrumentation-xml-http-request": "0.44.0", + "@opentelemetry/propagator-b3": "1.17.1", + "@opentelemetry/sdk-metrics": "1.17.1", + "@opentelemetry/sdk-trace-base": "1.17.1", + "@opentelemetry/sdk-trace-web": "1.17.1", + "@opentelemetry/semantic-conventions": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/tracer-web" } diff --git a/examples/otlp-exporter-node/package.json b/examples/otlp-exporter-node/package.json index 5091af0836..871a2a423a 100644 --- a/examples/otlp-exporter-node/package.json +++ b/examples/otlp-exporter-node/package.json @@ -1,7 +1,7 @@ { "name": "example-otlp-exporter-node", "private": true, - "version": "0.43.0", + "version": "0.44.0", "description": "Example of using @opentelemetry/collector-exporter in Node.js", "main": "index.js", "scripts": { @@ -29,17 +29,17 @@ }, "dependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/core": "1.17.0", - "@opentelemetry/exporter-metrics-otlp-grpc": "0.43.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.43.0", - "@opentelemetry/exporter-metrics-otlp-proto": "0.43.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.43.0", - "@opentelemetry/exporter-trace-otlp-http": "0.43.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.43.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/sdk-metrics": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0", - "@opentelemetry/semantic-conventions": "1.17.0" + "@opentelemetry/core": "1.17.1", + "@opentelemetry/exporter-metrics-otlp-grpc": "0.44.0", + "@opentelemetry/exporter-metrics-otlp-http": "0.44.0", + "@opentelemetry/exporter-metrics-otlp-proto": "0.44.0", + "@opentelemetry/exporter-trace-otlp-grpc": "0.44.0", + "@opentelemetry/exporter-trace-otlp-http": "0.44.0", + "@opentelemetry/exporter-trace-otlp-proto": "0.44.0", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/sdk-metrics": "1.17.1", + "@opentelemetry/sdk-trace-base": "1.17.1", + "@opentelemetry/semantic-conventions": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/examples/otlp-exporter-node" } diff --git a/experimental/CHANGELOG.md b/experimental/CHANGELOG.md index 72f0289574..cfb4d189bb 100644 --- a/experimental/CHANGELOG.md +++ b/experimental/CHANGELOG.md @@ -4,8 +4,18 @@ All notable changes to experimental packages in this project will be documented ## Unreleased +### :boom: Breaking Change + +### :rocket: (Enhancement) + +### :bug: (Bug Fix) + ### :books: (Refine Doc) +### :house: (Internal) + +## 0.44.0 + ### :boom: Breaking Change * fix(exporter-logs-otlp-proto): change OTLPLogExporter to OTLPLogExporter [#4140](https://github.com/open-telemetry/opentelemetry-js/pull/4140) @Vunovati @@ -22,10 +32,7 @@ All notable changes to experimental packages in this project will be documented ### :bug: (Bug Fix) * fix(otlp-exporter-base): replaced usage of window with _globalThis [#4157](https://github.com/open-telemetry/opentelemetry-js/pull/4157) @cristianmadularu - -### :books: (Refine Doc) - -### :house: (Internal) +* fix(otlp-transformer): Avoid precision loss when converting from HrTime to unix nanoseconds. [#4062](https://github.com/open-telemetry/opentelemetry-js/pull/4062) ## 0.43.0 @@ -56,7 +63,6 @@ All notable changes to experimental packages in this project will be documented ### :bug: (Bug Fix) -* fix(otlp-transformer): Avoid precision loss when converting from HrTime to unix nanoseconds. [#4062](https://github.com/open-telemetry/opentelemetry-js/pull/4062) * fix(exporter-logs-otlp-http): add @opentelemetry/api-logs as dependency ## 0.41.2 diff --git a/experimental/backwards-compatibility/node14/package.json b/experimental/backwards-compatibility/node14/package.json index 5e7509407c..41ac4219ee 100644 --- a/experimental/backwards-compatibility/node14/package.json +++ b/experimental/backwards-compatibility/node14/package.json @@ -1,6 +1,6 @@ { "name": "backcompat-node14", - "version": "0.43.0", + "version": "0.44.0", "private": true, "description": "Backwards compatibility app for node 14 types and the OpenTelemetry Node.js SDK", "main": "index.js", @@ -9,8 +9,8 @@ "peer-api-check": "node ../../../scripts/peer-api-check.js" }, "dependencies": { - "@opentelemetry/sdk-node": "0.43.0", - "@opentelemetry/sdk-trace-base": "1.17.0" + "@opentelemetry/sdk-node": "0.44.0", + "@opentelemetry/sdk-trace-base": "1.17.1" }, "devDependencies": { "@types/node": "14.18.25", diff --git a/experimental/backwards-compatibility/node16/package.json b/experimental/backwards-compatibility/node16/package.json index 2c8c2f8e7f..a489071678 100644 --- a/experimental/backwards-compatibility/node16/package.json +++ b/experimental/backwards-compatibility/node16/package.json @@ -1,6 +1,6 @@ { "name": "backcompat-node16", - "version": "0.43.0", + "version": "0.44.0", "private": true, "description": "Backwards compatibility app for node 16 types and the OpenTelemetry Node.js SDK", "main": "index.js", @@ -9,8 +9,8 @@ "peer-api-check": "node ../../../scripts/peer-api-check.js" }, "dependencies": { - "@opentelemetry/sdk-node": "0.43.0", - "@opentelemetry/sdk-trace-base": "1.17.0" + "@opentelemetry/sdk-node": "0.44.0", + "@opentelemetry/sdk-trace-base": "1.17.1" }, "devDependencies": { "@types/node": "16.11.52", diff --git a/experimental/examples/logs/package.json b/experimental/examples/logs/package.json index 03ff3e05b1..b39d19b959 100644 --- a/experimental/examples/logs/package.json +++ b/experimental/examples/logs/package.json @@ -1,6 +1,6 @@ { "name": "logs-example", - "version": "0.43.0", + "version": "0.44.0", "private": true, "scripts": { "start": "ts-node index.ts" diff --git a/experimental/examples/opencensus-shim/package.json b/experimental/examples/opencensus-shim/package.json index bd97c726c1..1890708445 100644 --- a/experimental/examples/opencensus-shim/package.json +++ b/experimental/examples/opencensus-shim/package.json @@ -1,7 +1,7 @@ { "name": "opencensus-shim", "private": true, - "version": "0.43.0", + "version": "0.44.0", "description": "Example of using @opentelemetry/shim-opencensus in Node.js", "main": "index.js", "scripts": { @@ -31,13 +31,13 @@ "@opencensus/instrumentation-http": "0.1.0", "@opencensus/nodejs-base": "0.1.0", "@opentelemetry/api": "1.6.0", - "@opentelemetry/exporter-prometheus": "0.43.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.43.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/sdk-metrics": "1.17.0", - "@opentelemetry/sdk-trace-node": "1.17.0", - "@opentelemetry/semantic-conventions": "1.17.0", - "@opentelemetry/shim-opencensus": "0.43.0" + "@opentelemetry/exporter-prometheus": "0.44.0", + "@opentelemetry/exporter-trace-otlp-grpc": "0.44.0", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/sdk-metrics": "1.17.1", + "@opentelemetry/sdk-trace-node": "1.17.1", + "@opentelemetry/semantic-conventions": "1.17.1", + "@opentelemetry/shim-opencensus": "0.44.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/examples/opencensus-shim" } diff --git a/experimental/examples/prometheus/package.json b/experimental/examples/prometheus/package.json index 9a7beb79e1..7c7f8f5713 100644 --- a/experimental/examples/prometheus/package.json +++ b/experimental/examples/prometheus/package.json @@ -1,6 +1,6 @@ { "name": "prometheus-example", - "version": "0.43.0", + "version": "0.44.0", "private": true, "description": "Example of using @opentelemetry/sdk-metrics and @opentelemetry/exporter-prometheus", "main": "index.js", @@ -11,7 +11,7 @@ "license": "Apache-2.0", "dependencies": { "@opentelemetry/api": "^1.3.0", - "@opentelemetry/exporter-prometheus": "0.43.0", - "@opentelemetry/sdk-metrics": "1.17.0" + "@opentelemetry/exporter-prometheus": "0.44.0", + "@opentelemetry/sdk-metrics": "1.17.1" } } diff --git a/experimental/packages/api-events/package.json b/experimental/packages/api-events/package.json index f430f3d31b..fc3537d6d3 100644 --- a/experimental/packages/api-events/package.json +++ b/experimental/packages/api-events/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/api-events", - "version": "0.43.0", + "version": "0.44.0", "description": "Public events API for OpenTelemetry", "main": "build/src/index.js", "module": "build/esm/index.js", diff --git a/experimental/packages/api-logs/package.json b/experimental/packages/api-logs/package.json index 4dc86c99f2..84605e3306 100644 --- a/experimental/packages/api-logs/package.json +++ b/experimental/packages/api-logs/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/api-logs", - "version": "0.43.0", + "version": "0.44.0", "description": "Public logs API for OpenTelemetry", "main": "build/src/index.js", "module": "build/esm/index.js", diff --git a/experimental/packages/exporter-logs-otlp-grpc/package.json b/experimental/packages/exporter-logs-otlp-grpc/package.json index c7e8978fdf..6be018babb 100644 --- a/experimental/packages/exporter-logs-otlp-grpc/package.json +++ b/experimental/packages/exporter-logs-otlp-grpc/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-logs-otlp-grpc", - "version": "0.43.0", + "version": "0.44.0", "description": "OpenTelemetry Collector Exporter allows user to send collected log records to the OpenTelemetry Collector", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -51,9 +51,9 @@ "@babel/core": "7.22.20", "@grpc/proto-loader": "^0.7.10", "@opentelemetry/api": "1.6.0", - "@opentelemetry/api-logs": "0.43.0", - "@opentelemetry/otlp-exporter-base": "0.43.0", - "@opentelemetry/resources": "1.17.0", + "@opentelemetry/api-logs": "0.44.0", + "@opentelemetry/otlp-exporter-base": "0.44.0", + "@opentelemetry/resources": "1.17.1", "@types/mocha": "10.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -73,10 +73,10 @@ }, "dependencies": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "1.17.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.43.0", - "@opentelemetry/otlp-transformer": "0.43.0", - "@opentelemetry/sdk-logs": "0.43.0" + "@opentelemetry/core": "1.17.1", + "@opentelemetry/otlp-grpc-exporter-base": "0.44.0", + "@opentelemetry/otlp-transformer": "0.44.0", + "@opentelemetry/sdk-logs": "0.44.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-logs-otlp-grpc", "sideEffects": false diff --git a/experimental/packages/exporter-logs-otlp-http/package.json b/experimental/packages/exporter-logs-otlp-http/package.json index 37f96f859f..a3b53e05bc 100644 --- a/experimental/packages/exporter-logs-otlp-http/package.json +++ b/experimental/packages/exporter-logs-otlp-http/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-logs-otlp-http", - "version": "0.43.0", + "version": "0.44.0", "publishConfig": { "access": "public" }, @@ -73,7 +73,7 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@opentelemetry/resources": "1.17.0", + "@opentelemetry/resources": "1.17.1", "@types/mocha": "10.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -104,10 +104,10 @@ "@opentelemetry/api": "^1.0.0" }, "dependencies": { - "@opentelemetry/api-logs": "0.43.0", - "@opentelemetry/core": "1.17.0", - "@opentelemetry/otlp-exporter-base": "0.43.0", - "@opentelemetry/otlp-transformer": "0.43.0", - "@opentelemetry/sdk-logs": "0.43.0" + "@opentelemetry/api-logs": "0.44.0", + "@opentelemetry/core": "1.17.1", + "@opentelemetry/otlp-exporter-base": "0.44.0", + "@opentelemetry/otlp-transformer": "0.44.0", + "@opentelemetry/sdk-logs": "0.44.0" } } diff --git a/experimental/packages/exporter-logs-otlp-proto/package.json b/experimental/packages/exporter-logs-otlp-proto/package.json index 7ddc7aaa0d..5ad2664217 100644 --- a/experimental/packages/exporter-logs-otlp-proto/package.json +++ b/experimental/packages/exporter-logs-otlp-proto/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-logs-otlp-proto", - "version": "0.43.0", + "version": "0.44.0", "description": "An OTLP exporter to send logs using protobuf over HTTP", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -93,14 +93,14 @@ "@opentelemetry/api": "^1.0.0" }, "dependencies": { - "@opentelemetry/api-logs": "0.43.0", - "@opentelemetry/core": "1.17.0", - "@opentelemetry/otlp-exporter-base": "0.43.0", - "@opentelemetry/otlp-proto-exporter-base": "0.43.0", - "@opentelemetry/otlp-transformer": "0.43.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/sdk-logs": "0.43.0", - "@opentelemetry/sdk-trace-base": "1.17.0" + "@opentelemetry/api-logs": "0.44.0", + "@opentelemetry/core": "1.17.1", + "@opentelemetry/otlp-exporter-base": "0.44.0", + "@opentelemetry/otlp-proto-exporter-base": "0.44.0", + "@opentelemetry/otlp-transformer": "0.44.0", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/sdk-logs": "0.44.0", + "@opentelemetry/sdk-trace-base": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-logs-otlp-proto", "sideEffects": false diff --git a/experimental/packages/exporter-trace-otlp-grpc/package.json b/experimental/packages/exporter-trace-otlp-grpc/package.json index 207880858b..bc14408e58 100644 --- a/experimental/packages/exporter-trace-otlp-grpc/package.json +++ b/experimental/packages/exporter-trace-otlp-grpc/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-trace-otlp-grpc", - "version": "0.43.0", + "version": "0.44.0", "description": "OpenTelemetry Collector Exporter allows user to send collected traces to the OpenTelemetry Collector", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -50,7 +50,7 @@ "@babel/core": "7.22.20", "@grpc/proto-loader": "^0.7.10", "@opentelemetry/api": "1.6.0", - "@opentelemetry/otlp-exporter-base": "0.43.0", + "@opentelemetry/otlp-exporter-base": "0.44.0", "@types/mocha": "10.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -70,11 +70,11 @@ }, "dependencies": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "1.17.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.43.0", - "@opentelemetry/otlp-transformer": "0.43.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0" + "@opentelemetry/core": "1.17.1", + "@opentelemetry/otlp-grpc-exporter-base": "0.44.0", + "@opentelemetry/otlp-transformer": "0.44.0", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/sdk-trace-base": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-trace-otlp-grpc", "sideEffects": false diff --git a/experimental/packages/exporter-trace-otlp-http/package.json b/experimental/packages/exporter-trace-otlp-http/package.json index 83efbdf06f..46d2f81c30 100644 --- a/experimental/packages/exporter-trace-otlp-http/package.json +++ b/experimental/packages/exporter-trace-otlp-http/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-trace-otlp-http", - "version": "0.43.0", + "version": "0.44.0", "description": "OpenTelemetry Collector Trace Exporter allows user to send collected traces to the OpenTelemetry Collector", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -95,11 +95,11 @@ "@opentelemetry/api": "^1.0.0" }, "dependencies": { - "@opentelemetry/core": "1.17.0", - "@opentelemetry/otlp-exporter-base": "0.43.0", - "@opentelemetry/otlp-transformer": "0.43.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0" + "@opentelemetry/core": "1.17.1", + "@opentelemetry/otlp-exporter-base": "0.44.0", + "@opentelemetry/otlp-transformer": "0.44.0", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/sdk-trace-base": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-trace-otlp-http", "sideEffects": false diff --git a/experimental/packages/exporter-trace-otlp-proto/package.json b/experimental/packages/exporter-trace-otlp-proto/package.json index 8b65b2be7c..d50cd51eaa 100644 --- a/experimental/packages/exporter-trace-otlp-proto/package.json +++ b/experimental/packages/exporter-trace-otlp-proto/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-trace-otlp-proto", - "version": "0.43.0", + "version": "0.44.0", "description": "OpenTelemetry Collector Exporter allows user to send collected traces to the OpenTelemetry Collector using protobuf over HTTP", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -92,12 +92,12 @@ "@opentelemetry/api": "^1.0.0" }, "dependencies": { - "@opentelemetry/core": "1.17.0", - "@opentelemetry/otlp-exporter-base": "0.43.0", - "@opentelemetry/otlp-proto-exporter-base": "0.43.0", - "@opentelemetry/otlp-transformer": "0.43.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0" + "@opentelemetry/core": "1.17.1", + "@opentelemetry/otlp-exporter-base": "0.44.0", + "@opentelemetry/otlp-proto-exporter-base": "0.44.0", + "@opentelemetry/otlp-transformer": "0.44.0", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/sdk-trace-base": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/exporter-trace-otlp-proto", "sideEffects": false diff --git a/experimental/packages/opentelemetry-browser-detector/package.json b/experimental/packages/opentelemetry-browser-detector/package.json index af6f3365c6..a82c73f60f 100644 --- a/experimental/packages/opentelemetry-browser-detector/package.json +++ b/experimental/packages/opentelemetry-browser-detector/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/opentelemetry-browser-detector", - "version": "0.43.0", + "version": "0.44.0", "description": "OpenTelemetry Resource Detector for Browser", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -82,8 +82,8 @@ "@opentelemetry/api": "^1.0.0" }, "dependencies": { - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/semantic-conventions": "1.17.0" + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/semantic-conventions": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/browser-detector" } diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json index 9a158ffe39..7c612bf036 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-metrics-otlp-grpc", - "version": "0.43.0", + "version": "0.44.0", "description": "OpenTelemetry Collector Metrics Exporter allows user to send collected metrics to the OpenTelemetry Collector", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -69,12 +69,12 @@ }, "dependencies": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "1.17.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.43.0", - "@opentelemetry/otlp-grpc-exporter-base": "0.43.0", - "@opentelemetry/otlp-transformer": "0.43.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/sdk-metrics": "1.17.0" + "@opentelemetry/core": "1.17.1", + "@opentelemetry/exporter-metrics-otlp-http": "0.44.0", + "@opentelemetry/otlp-grpc-exporter-base": "0.44.0", + "@opentelemetry/otlp-transformer": "0.44.0", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/sdk-metrics": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-grpc", "sideEffects": false diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json index 08141b1b26..7ab50d0ea8 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-http/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-metrics-otlp-http", - "version": "0.43.0", + "version": "0.44.0", "description": "OpenTelemetry Collector Metrics Exporter allows user to send collected metrics to the OpenTelemetry Collector", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -95,11 +95,11 @@ "@opentelemetry/api": "^1.3.0" }, "dependencies": { - "@opentelemetry/core": "1.17.0", - "@opentelemetry/otlp-exporter-base": "0.43.0", - "@opentelemetry/otlp-transformer": "0.43.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/sdk-metrics": "1.17.0" + "@opentelemetry/core": "1.17.1", + "@opentelemetry/otlp-exporter-base": "0.44.0", + "@opentelemetry/otlp-transformer": "0.44.0", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/sdk-metrics": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-http", "sideEffects": false diff --git a/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json b/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json index a3e379fe8e..f9ddf74a6e 100644 --- a/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json +++ b/experimental/packages/opentelemetry-exporter-metrics-otlp-proto/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-metrics-otlp-proto", - "version": "0.43.0", + "version": "0.44.0", "description": "OpenTelemetry Collector Metrics Exporter allows user to send collected metrics to the OpenTelemetry Collector using protobuf over HTTP", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -75,13 +75,13 @@ "@opentelemetry/api": "^1.3.0" }, "dependencies": { - "@opentelemetry/core": "1.17.0", - "@opentelemetry/exporter-metrics-otlp-http": "0.43.0", - "@opentelemetry/otlp-exporter-base": "0.43.0", - "@opentelemetry/otlp-proto-exporter-base": "0.43.0", - "@opentelemetry/otlp-transformer": "0.43.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/sdk-metrics": "1.17.0" + "@opentelemetry/core": "1.17.1", + "@opentelemetry/exporter-metrics-otlp-http": "0.44.0", + "@opentelemetry/otlp-exporter-base": "0.44.0", + "@opentelemetry/otlp-proto-exporter-base": "0.44.0", + "@opentelemetry/otlp-transformer": "0.44.0", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/sdk-metrics": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-metrics-otlp-proto", "sideEffects": false diff --git a/experimental/packages/opentelemetry-exporter-prometheus/package.json b/experimental/packages/opentelemetry-exporter-prometheus/package.json index a16ec9a833..15cdcffe9a 100644 --- a/experimental/packages/opentelemetry-exporter-prometheus/package.json +++ b/experimental/packages/opentelemetry-exporter-prometheus/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-prometheus", - "version": "0.43.0", + "version": "0.44.0", "description": "OpenTelemetry Exporter Prometheus provides a metrics endpoint for Prometheus", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -44,7 +44,7 @@ }, "devDependencies": { "@opentelemetry/api": "1.6.0", - "@opentelemetry/semantic-conventions": "1.17.0", + "@opentelemetry/semantic-conventions": "1.17.1", "@types/mocha": "10.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -61,9 +61,9 @@ "@opentelemetry/api": "^1.3.0" }, "dependencies": { - "@opentelemetry/core": "1.17.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/sdk-metrics": "1.17.0" + "@opentelemetry/core": "1.17.1", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/sdk-metrics": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-exporter-prometheus", "sideEffects": false diff --git a/experimental/packages/opentelemetry-instrumentation-fetch/package.json b/experimental/packages/opentelemetry-instrumentation-fetch/package.json index 3690e77b64..f83b054bd0 100644 --- a/experimental/packages/opentelemetry-instrumentation-fetch/package.json +++ b/experimental/packages/opentelemetry-instrumentation-fetch/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-fetch", - "version": "0.43.0", + "version": "0.44.0", "description": "OpenTelemetry fetch automatic instrumentation package.", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -56,9 +56,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@opentelemetry/context-zone": "1.17.0", - "@opentelemetry/propagator-b3": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0", + "@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/node": "18.6.5", "@types/sinon": "10.0.18", @@ -88,10 +88,10 @@ "@opentelemetry/api": "^1.0.0" }, "dependencies": { - "@opentelemetry/core": "1.17.0", - "@opentelemetry/instrumentation": "0.43.0", - "@opentelemetry/sdk-trace-web": "1.17.0", - "@opentelemetry/semantic-conventions": "1.17.0" + "@opentelemetry/core": "1.17.1", + "@opentelemetry/instrumentation": "0.44.0", + "@opentelemetry/sdk-trace-web": "1.17.1", + "@opentelemetry/semantic-conventions": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-fetch", "sideEffects": false diff --git a/experimental/packages/opentelemetry-instrumentation-grpc/package.json b/experimental/packages/opentelemetry-instrumentation-grpc/package.json index b2248c30a1..72dc5034b8 100644 --- a/experimental/packages/opentelemetry-instrumentation-grpc/package.json +++ b/experimental/packages/opentelemetry-instrumentation-grpc/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-grpc", - "version": "0.43.0", + "version": "0.44.0", "description": "OpenTelemetry grpc automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -50,10 +50,10 @@ "@grpc/grpc-js": "^1.7.1", "@grpc/proto-loader": "^0.7.10", "@opentelemetry/api": "1.6.0", - "@opentelemetry/context-async-hooks": "1.17.0", - "@opentelemetry/core": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0", - "@opentelemetry/sdk-trace-node": "1.17.0", + "@opentelemetry/context-async-hooks": "1.17.1", + "@opentelemetry/core": "1.17.1", + "@opentelemetry/sdk-trace-base": "1.17.1", + "@opentelemetry/sdk-trace-node": "1.17.1", "@protobuf-ts/grpc-transport": "2.9.1", "@protobuf-ts/runtime": "2.9.1", "@protobuf-ts/runtime-rpc": "2.9.1", @@ -75,8 +75,8 @@ "@opentelemetry/api": "^1.3.0" }, "dependencies": { - "@opentelemetry/instrumentation": "0.43.0", - "@opentelemetry/semantic-conventions": "1.17.0" + "@opentelemetry/instrumentation": "0.44.0", + "@opentelemetry/semantic-conventions": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-grpc", "sideEffects": false diff --git a/experimental/packages/opentelemetry-instrumentation-http/package.json b/experimental/packages/opentelemetry-instrumentation-http/package.json index f4cc3b40e7..1c1d524e8b 100644 --- a/experimental/packages/opentelemetry-instrumentation-http/package.json +++ b/experimental/packages/opentelemetry-instrumentation-http/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-http", - "version": "0.43.0", + "version": "0.44.0", "description": "OpenTelemetry http/https automatic instrumentation package.", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -46,10 +46,10 @@ }, "devDependencies": { "@opentelemetry/api": "1.6.0", - "@opentelemetry/context-async-hooks": "1.17.0", - "@opentelemetry/sdk-metrics": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0", - "@opentelemetry/sdk-trace-node": "1.17.0", + "@opentelemetry/context-async-hooks": "1.17.1", + "@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/node": "18.6.5", "@types/request-promise-native": "1.0.19", @@ -74,9 +74,9 @@ "@opentelemetry/api": "^1.3.0" }, "dependencies": { - "@opentelemetry/core": "1.17.0", - "@opentelemetry/instrumentation": "0.43.0", - "@opentelemetry/semantic-conventions": "1.17.0", + "@opentelemetry/core": "1.17.1", + "@opentelemetry/instrumentation": "0.44.0", + "@opentelemetry/semantic-conventions": "1.17.1", "semver": "^7.5.2" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-http", diff --git a/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json b/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json index 9be7a18eac..0e4a8583ed 100644 --- a/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json +++ b/experimental/packages/opentelemetry-instrumentation-xml-http-request/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation-xml-http-request", - "version": "0.43.0", + "version": "0.44.0", "description": "OpenTelemetry XMLHttpRequest automatic instrumentation package.", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -56,9 +56,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@opentelemetry/context-zone": "1.17.0", - "@opentelemetry/propagator-b3": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0", + "@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/node": "18.6.5", "@types/sinon": "10.0.18", @@ -88,10 +88,10 @@ "@opentelemetry/api": "^1.0.0" }, "dependencies": { - "@opentelemetry/core": "1.17.0", - "@opentelemetry/instrumentation": "0.43.0", - "@opentelemetry/sdk-trace-web": "1.17.0", - "@opentelemetry/semantic-conventions": "1.17.0" + "@opentelemetry/core": "1.17.1", + "@opentelemetry/instrumentation": "0.44.0", + "@opentelemetry/sdk-trace-web": "1.17.1", + "@opentelemetry/semantic-conventions": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation-xml-http-request", "sideEffects": false diff --git a/experimental/packages/opentelemetry-instrumentation/package.json b/experimental/packages/opentelemetry-instrumentation/package.json index 1e6fc40e48..5cf7554397 100644 --- a/experimental/packages/opentelemetry-instrumentation/package.json +++ b/experimental/packages/opentelemetry-instrumentation/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/instrumentation", - "version": "0.43.0", + "version": "0.44.0", "description": "Base class for node which OpenTelemetry instrumentation modules extend", "author": "OpenTelemetry Authors", "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/opentelemetry-instrumentation", @@ -83,7 +83,7 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@opentelemetry/sdk-metrics": "1.17.0", + "@opentelemetry/sdk-metrics": "1.17.1", "@types/mocha": "10.0.2", "@types/node": "18.6.5", "@types/semver": "7.5.3", diff --git a/experimental/packages/opentelemetry-sdk-node/package.json b/experimental/packages/opentelemetry-sdk-node/package.json index 6385adc7a4..6a5261623a 100644 --- a/experimental/packages/opentelemetry-sdk-node/package.json +++ b/experimental/packages/opentelemetry-sdk-node/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/sdk-node", - "version": "0.43.0", + "version": "0.44.0", "description": "OpenTelemetry SDK for Node.js", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -17,8 +17,7 @@ "watch": "tsc --build --watch", "precompile": "cross-var lerna run version --scope $npm_package_name --include-dependencies", "prewatch": "npm run precompile", - "peer-api-check": "node ../../../scripts/peer-api-check.js", - "postinstall": "node -e \"console.log(\\\"\\x1b[95m%s\\x1b[0m\\\", \\\"@opentelemetry/sdk-node - warning: Starting with 0.44.0 '@opentelemetry/exporter-jaeger' will no longer be automatically installed by this package. To continue using '@opentelemetry/exporter-jaeger', please install it manually.\\n(NOTE: '@opentelemetry/exporter-jaeger' is deprecated, consider switching to one of the alternatives described in https://www.npmjs.com/package/@opentelemetry/exporter-jaeger)\\\");\"" + "peer-api-check": "node ../../../scripts/peer-api-check.js" }, "keywords": [ "opentelemetry", @@ -45,27 +44,27 @@ "access": "public" }, "dependencies": { - "@opentelemetry/api-logs": "0.43.0", - "@opentelemetry/core": "1.17.0", - "@opentelemetry/exporter-jaeger": "1.17.0", - "@opentelemetry/exporter-trace-otlp-grpc": "0.43.0", - "@opentelemetry/exporter-trace-otlp-http": "0.43.0", - "@opentelemetry/exporter-trace-otlp-proto": "0.43.0", - "@opentelemetry/exporter-zipkin": "1.17.0", - "@opentelemetry/instrumentation": "0.43.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/sdk-logs": "0.43.0", - "@opentelemetry/sdk-metrics": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0", - "@opentelemetry/sdk-trace-node": "1.17.0", - "@opentelemetry/semantic-conventions": "1.17.0" + "@opentelemetry/api-logs": "0.44.0", + "@opentelemetry/core": "1.17.1", + "@opentelemetry/exporter-jaeger": "1.17.1", + "@opentelemetry/exporter-trace-otlp-grpc": "0.44.0", + "@opentelemetry/exporter-trace-otlp-http": "0.44.0", + "@opentelemetry/exporter-trace-otlp-proto": "0.44.0", + "@opentelemetry/exporter-zipkin": "1.17.1", + "@opentelemetry/instrumentation": "0.44.0", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/sdk-logs": "0.44.0", + "@opentelemetry/sdk-metrics": "1.17.1", + "@opentelemetry/sdk-trace-base": "1.17.1", + "@opentelemetry/sdk-trace-node": "1.17.1", + "@opentelemetry/semantic-conventions": "1.17.1" }, "peerDependencies": { "@opentelemetry/api": ">=1.3.0 <1.7.0" }, "devDependencies": { "@opentelemetry/api": "1.6.0", - "@opentelemetry/context-async-hooks": "1.17.0", + "@opentelemetry/context-async-hooks": "1.17.1", "@opentelemetry/exporter-jaeger": "1.17.0", "@types/mocha": "10.0.2", "@types/node": "18.6.5", diff --git a/experimental/packages/otlp-exporter-base/package.json b/experimental/packages/otlp-exporter-base/package.json index cf59828ef0..be4008cbd9 100644 --- a/experimental/packages/otlp-exporter-base/package.json +++ b/experimental/packages/otlp-exporter-base/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/otlp-exporter-base", - "version": "0.43.0", + "version": "0.44.0", "description": "OpenTelemetry OTLP Exporter base (for internal use only)", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -61,7 +61,7 @@ "access": "public" }, "dependencies": { - "@opentelemetry/core": "1.17.0" + "@opentelemetry/core": "1.17.1" }, "devDependencies": { "@babel/core": "7.22.20", diff --git a/experimental/packages/otlp-grpc-exporter-base/package.json b/experimental/packages/otlp-grpc-exporter-base/package.json index 4ee3d0b422..4be5e7d7b5 100644 --- a/experimental/packages/otlp-grpc-exporter-base/package.json +++ b/experimental/packages/otlp-grpc-exporter-base/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/otlp-grpc-exporter-base", - "version": "0.43.0", + "version": "0.44.0", "description": "OpenTelemetry OTLP-gRPC Exporter base (for internal use only)", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -50,9 +50,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": "1.6.0", - "@opentelemetry/otlp-transformer": "0.43.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0", + "@opentelemetry/otlp-transformer": "0.44.0", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/sdk-trace-base": "1.17.1", "@types/mocha": "10.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -73,8 +73,8 @@ }, "dependencies": { "@grpc/grpc-js": "^1.7.1", - "@opentelemetry/core": "1.17.0", - "@opentelemetry/otlp-exporter-base": "0.43.0", + "@opentelemetry/core": "1.17.1", + "@opentelemetry/otlp-exporter-base": "0.44.0", "protobufjs": "^7.2.3" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/otlp-grpc-exporter-base", diff --git a/experimental/packages/otlp-proto-exporter-base/package.json b/experimental/packages/otlp-proto-exporter-base/package.json index 6f8e2ae768..602bbd9a5b 100644 --- a/experimental/packages/otlp-proto-exporter-base/package.json +++ b/experimental/packages/otlp-proto-exporter-base/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/otlp-proto-exporter-base", - "version": "0.43.0", + "version": "0.44.0", "description": "OpenTelemetry OTLP-HTTP-protobuf Exporter base (for internal use only)", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -79,8 +79,8 @@ "@opentelemetry/api": "^1.0.0" }, "dependencies": { - "@opentelemetry/core": "1.17.0", - "@opentelemetry/otlp-exporter-base": "0.43.0", + "@opentelemetry/core": "1.17.1", + "@opentelemetry/otlp-exporter-base": "0.44.0", "protobufjs": "^7.2.3" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/otlp-proto-exporter-base", diff --git a/experimental/packages/otlp-transformer/package.json b/experimental/packages/otlp-transformer/package.json index 4efa0b84d0..de2ef27e53 100644 --- a/experimental/packages/otlp-transformer/package.json +++ b/experimental/packages/otlp-transformer/package.json @@ -4,7 +4,7 @@ "publishConfig": { "access": "public" }, - "version": "0.43.0", + "version": "0.44.0", "description": "Transform OpenTelemetry SDK data into OTLP", "module": "build/esm/index.js", "esnext": "build/esnext/index.js", @@ -78,12 +78,12 @@ "webpack": "4.46.0" }, "dependencies": { - "@opentelemetry/api-logs": "0.43.0", - "@opentelemetry/core": "1.17.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/sdk-logs": "0.43.0", - "@opentelemetry/sdk-metrics": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0" + "@opentelemetry/api-logs": "0.44.0", + "@opentelemetry/core": "1.17.1", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/sdk-logs": "0.44.0", + "@opentelemetry/sdk-metrics": "1.17.1", + "@opentelemetry/sdk-trace-base": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/experimental/packages/otlp-transformer", "sideEffects": false diff --git a/experimental/packages/sdk-logs/package.json b/experimental/packages/sdk-logs/package.json index ef33445de3..2bff60bbdd 100644 --- a/experimental/packages/sdk-logs/package.json +++ b/experimental/packages/sdk-logs/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/sdk-logs", - "version": "0.43.0", + "version": "0.44.0", "publishConfig": { "access": "public" }, @@ -74,7 +74,7 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": ">=1.4.0 <1.7.0", - "@opentelemetry/api-logs": "0.43.0", + "@opentelemetry/api-logs": "0.44.0", "@types/mocha": "10.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -99,7 +99,7 @@ "webpack-merge": "5.9.0" }, "dependencies": { - "@opentelemetry/core": "1.17.0", - "@opentelemetry/resources": "1.17.0" + "@opentelemetry/core": "1.17.1", + "@opentelemetry/resources": "1.17.1" } } diff --git a/experimental/packages/shim-opencensus/package.json b/experimental/packages/shim-opencensus/package.json index 3b96de24d4..12fcba77e8 100644 --- a/experimental/packages/shim-opencensus/package.json +++ b/experimental/packages/shim-opencensus/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/shim-opencensus", - "version": "0.43.0", + "version": "0.44.0", "description": "OpenCensus to OpenTelemetry shim", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -50,8 +50,8 @@ "devDependencies": { "@opencensus/core": "0.1.0", "@opentelemetry/api": "1.6.0", - "@opentelemetry/context-async-hooks": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0", + "@opentelemetry/context-async-hooks": "1.17.1", + "@opentelemetry/sdk-trace-base": "1.17.1", "@types/mocha": "10.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -69,9 +69,9 @@ "@opentelemetry/api": "^1.0.0" }, "dependencies": { - "@opentelemetry/core": "1.17.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/sdk-metrics": "1.17.0", + "@opentelemetry/core": "1.17.1", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/sdk-metrics": "1.17.1", "require-in-the-middle": "^7.1.1", "semver": "^7.5.2" }, diff --git a/integration-tests/propagation-validation-server/package.json b/integration-tests/propagation-validation-server/package.json index 2b5fcd3404..927d8057a3 100644 --- a/integration-tests/propagation-validation-server/package.json +++ b/integration-tests/propagation-validation-server/package.json @@ -1,6 +1,6 @@ { "name": "propagation-validation-server", - "version": "1.17.0", + "version": "1.18.0", "description": "server for w3c tests", "main": "validation_server.js", "private": true, @@ -12,9 +12,9 @@ }, "dependencies": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/context-async-hooks": "1.17.0", - "@opentelemetry/core": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0", + "@opentelemetry/context-async-hooks": "1.17.1", + "@opentelemetry/core": "1.17.1", + "@opentelemetry/sdk-trace-base": "1.17.1", "axios": "1.5.1", "body-parser": "1.19.0", "express": "4.17.3" diff --git a/packages/opentelemetry-context-async-hooks/package.json b/packages/opentelemetry-context-async-hooks/package.json index ea0da0acbe..063ca2ed63 100644 --- a/packages/opentelemetry-context-async-hooks/package.json +++ b/packages/opentelemetry-context-async-hooks/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/context-async-hooks", - "version": "1.17.0", + "version": "1.17.1", "description": "OpenTelemetry AsyncHooks-based Context Manager", "main": "build/src/index.js", "types": "build/src/index.d.ts", diff --git a/packages/opentelemetry-context-zone-peer-dep/package.json b/packages/opentelemetry-context-zone-peer-dep/package.json index 6076ad618c..6654fe9e03 100644 --- a/packages/opentelemetry-context-zone-peer-dep/package.json +++ b/packages/opentelemetry-context-zone-peer-dep/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/context-zone-peer-dep", - "version": "1.17.0", + "version": "1.17.1", "description": "OpenTelemetry Context Zone with peer dependency for zone.js", "main": "build/src/index.js", "module": "build/esm/index.js", diff --git a/packages/opentelemetry-context-zone/package.json b/packages/opentelemetry-context-zone/package.json index 905822e59a..38703eb66b 100644 --- a/packages/opentelemetry-context-zone/package.json +++ b/packages/opentelemetry-context-zone/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/context-zone", - "version": "1.17.0", + "version": "1.17.1", "description": "OpenTelemetry Context Zone", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -75,7 +75,7 @@ "webpack-merge": "5.9.0" }, "dependencies": { - "@opentelemetry/context-zone-peer-dep": "1.17.0", + "@opentelemetry/context-zone-peer-dep": "1.17.1", "zone.js": "^0.11.0" }, "sideEffects": true, diff --git a/packages/opentelemetry-core/package.json b/packages/opentelemetry-core/package.json index e7214524a9..6ab47de028 100644 --- a/packages/opentelemetry-core/package.json +++ b/packages/opentelemetry-core/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/core", - "version": "1.17.0", + "version": "1.17.1", "description": "OpenTelemetry Core provides constants and utilities shared by all OpenTelemetry SDK packages.", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -91,7 +91,7 @@ "@opentelemetry/api": ">=1.0.0 <1.7.0" }, "dependencies": { - "@opentelemetry/semantic-conventions": "1.17.0" + "@opentelemetry/semantic-conventions": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-core", "sideEffects": false diff --git a/packages/opentelemetry-exporter-jaeger/package.json b/packages/opentelemetry-exporter-jaeger/package.json index 64c1a33b4c..b412ade129 100644 --- a/packages/opentelemetry-exporter-jaeger/package.json +++ b/packages/opentelemetry-exporter-jaeger/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-jaeger", - "version": "1.17.0", + "version": "1.17.1", "description": "OpenTelemetry Exporter Jaeger allows user to send collected traces to Jaeger", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -45,7 +45,7 @@ }, "devDependencies": { "@opentelemetry/api": "^1.0.0", - "@opentelemetry/resources": "1.17.0", + "@opentelemetry/resources": "1.17.1", "@types/mocha": "10.0.2", "@types/node": "18.6.5", "@types/sinon": "10.0.18", @@ -63,9 +63,9 @@ "@opentelemetry/api": "^1.0.0" }, "dependencies": { - "@opentelemetry/core": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0", - "@opentelemetry/semantic-conventions": "1.17.0", + "@opentelemetry/core": "1.17.1", + "@opentelemetry/sdk-trace-base": "1.17.1", + "@opentelemetry/semantic-conventions": "1.17.1", "jaeger-client": "^3.15.0" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-exporter-jaeger", diff --git a/packages/opentelemetry-exporter-zipkin/package.json b/packages/opentelemetry-exporter-zipkin/package.json index aac154eb6e..b7e10f8ebc 100644 --- a/packages/opentelemetry-exporter-zipkin/package.json +++ b/packages/opentelemetry-exporter-zipkin/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/exporter-zipkin", - "version": "1.17.0", + "version": "1.17.1", "description": "OpenTelemetry Zipkin Exporter allows the user to send collected traces to Zipkin.", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -92,10 +92,10 @@ "@opentelemetry/api": "^1.0.0" }, "dependencies": { - "@opentelemetry/core": "1.17.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0", - "@opentelemetry/semantic-conventions": "1.17.0" + "@opentelemetry/core": "1.17.1", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/sdk-trace-base": "1.17.1", + "@opentelemetry/semantic-conventions": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-exporter-zipkin", "sideEffects": false diff --git a/packages/opentelemetry-propagator-b3/package.json b/packages/opentelemetry-propagator-b3/package.json index 34f044c541..d1f04a4453 100644 --- a/packages/opentelemetry-propagator-b3/package.json +++ b/packages/opentelemetry-propagator-b3/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-b3", - "version": "1.17.0", + "version": "1.17.1", "description": "OpenTelemetry B3 propagator provides context propagation for systems that are using the B3 header format", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -51,7 +51,7 @@ "access": "public" }, "dependencies": { - "@opentelemetry/core": "1.17.0" + "@opentelemetry/core": "1.17.1" }, "peerDependencies": { "@opentelemetry/api": ">=1.0.0 <1.7.0" diff --git a/packages/opentelemetry-propagator-jaeger/package.json b/packages/opentelemetry-propagator-jaeger/package.json index 13acdb1e49..ee8455ef1a 100644 --- a/packages/opentelemetry-propagator-jaeger/package.json +++ b/packages/opentelemetry-propagator-jaeger/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/propagator-jaeger", - "version": "1.17.0", + "version": "1.17.1", "description": "OpenTelemetry Jaeger propagator provides HTTP header propagation for systems that are using Jaeger HTTP header format.", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -81,7 +81,7 @@ "@opentelemetry/api": ">=1.0.0 <1.7.0" }, "dependencies": { - "@opentelemetry/core": "1.17.0" + "@opentelemetry/core": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-propagator-jaeger", "sideEffects": false diff --git a/packages/opentelemetry-resources/package.json b/packages/opentelemetry-resources/package.json index ec7b306e30..f4cc67c22a 100644 --- a/packages/opentelemetry-resources/package.json +++ b/packages/opentelemetry-resources/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/resources", - "version": "1.17.0", + "version": "1.17.1", "description": "OpenTelemetry SDK resources", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -91,8 +91,8 @@ "@opentelemetry/api": ">=1.0.0 <1.7.0" }, "dependencies": { - "@opentelemetry/core": "1.17.0", - "@opentelemetry/semantic-conventions": "1.17.0" + "@opentelemetry/core": "1.17.1", + "@opentelemetry/semantic-conventions": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-resources", "sideEffects": false diff --git a/packages/opentelemetry-sdk-trace-base/package.json b/packages/opentelemetry-sdk-trace-base/package.json index 1f92308f58..eca577109a 100644 --- a/packages/opentelemetry-sdk-trace-base/package.json +++ b/packages/opentelemetry-sdk-trace-base/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/sdk-trace-base", - "version": "1.17.0", + "version": "1.17.1", "description": "OpenTelemetry Tracing", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -94,9 +94,9 @@ "@opentelemetry/api": ">=1.0.0 <1.7.0" }, "dependencies": { - "@opentelemetry/core": "1.17.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/semantic-conventions": "1.17.0" + "@opentelemetry/core": "1.17.1", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/semantic-conventions": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-base", "sideEffects": false diff --git a/packages/opentelemetry-sdk-trace-node/package.json b/packages/opentelemetry-sdk-trace-node/package.json index 495cda0fde..666fb058e0 100644 --- a/packages/opentelemetry-sdk-trace-node/package.json +++ b/packages/opentelemetry-sdk-trace-node/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/sdk-trace-node", - "version": "1.17.0", + "version": "1.17.1", "description": "OpenTelemetry Node SDK provides automatic telemetry (tracing, metrics, etc) for Node.js applications", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -46,8 +46,8 @@ }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.7.0", - "@opentelemetry/resources": "1.17.0", - "@opentelemetry/semantic-conventions": "1.17.0", + "@opentelemetry/resources": "1.17.1", + "@opentelemetry/semantic-conventions": "1.17.1", "@types/mocha": "10.0.2", "@types/node": "18.6.5", "@types/semver": "7.5.3", @@ -65,11 +65,11 @@ "@opentelemetry/api": ">=1.0.0 <1.7.0" }, "dependencies": { - "@opentelemetry/context-async-hooks": "1.17.0", - "@opentelemetry/core": "1.17.0", - "@opentelemetry/propagator-b3": "1.17.0", - "@opentelemetry/propagator-jaeger": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0", + "@opentelemetry/context-async-hooks": "1.17.1", + "@opentelemetry/core": "1.17.1", + "@opentelemetry/propagator-b3": "1.17.1", + "@opentelemetry/propagator-jaeger": "1.17.1", + "@opentelemetry/sdk-trace-base": "1.17.1", "semver": "^7.5.2" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-node", diff --git a/packages/opentelemetry-sdk-trace-web/package.json b/packages/opentelemetry-sdk-trace-web/package.json index afa8e31c5b..cc91460b6a 100644 --- a/packages/opentelemetry-sdk-trace-web/package.json +++ b/packages/opentelemetry-sdk-trace-web/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/sdk-trace-web", - "version": "1.17.0", + "version": "1.17.1", "description": "OpenTelemetry Web Tracer", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -57,9 +57,9 @@ "devDependencies": { "@babel/core": "7.22.20", "@opentelemetry/api": ">=1.0.0 <1.7.0", - "@opentelemetry/context-zone": "1.17.0", - "@opentelemetry/propagator-b3": "1.17.0", - "@opentelemetry/resources": "1.17.0", + "@opentelemetry/context-zone": "1.17.1", + "@opentelemetry/propagator-b3": "1.17.1", + "@opentelemetry/resources": "1.17.1", "@types/jquery": "3.5.21", "@types/mocha": "10.0.2", "@types/node": "18.6.5", @@ -92,9 +92,9 @@ "@opentelemetry/api": ">=1.0.0 <1.7.0" }, "dependencies": { - "@opentelemetry/core": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0", - "@opentelemetry/semantic-conventions": "1.17.0" + "@opentelemetry/core": "1.17.1", + "@opentelemetry/sdk-trace-base": "1.17.1", + "@opentelemetry/semantic-conventions": "1.17.1" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-sdk-trace-web", "sideEffects": false diff --git a/packages/opentelemetry-semantic-conventions/package.json b/packages/opentelemetry-semantic-conventions/package.json index e930e1d04e..893356b104 100644 --- a/packages/opentelemetry-semantic-conventions/package.json +++ b/packages/opentelemetry-semantic-conventions/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/semantic-conventions", - "version": "1.17.0", + "version": "1.17.1", "description": "OpenTelemetry semantic conventions", "main": "build/src/index.js", "module": "build/esm/index.js", diff --git a/packages/opentelemetry-shim-opentracing/package.json b/packages/opentelemetry-shim-opentracing/package.json index 78381872e2..3e6fa8101c 100644 --- a/packages/opentelemetry-shim-opentracing/package.json +++ b/packages/opentelemetry-shim-opentracing/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/shim-opentracing", - "version": "1.17.0", + "version": "1.17.1", "description": "OpenTracing to OpenTelemetry shim", "main": "build/src/index.js", "types": "build/src/index.d.ts", @@ -43,9 +43,9 @@ }, "devDependencies": { "@opentelemetry/api": ">=1.0.0 <1.7.0", - "@opentelemetry/propagator-b3": "1.17.0", - "@opentelemetry/propagator-jaeger": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0", + "@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/node": "18.6.5", "codecov": "3.8.3", @@ -60,8 +60,8 @@ "@opentelemetry/api": ">=1.0.0 <1.7.0" }, "dependencies": { - "@opentelemetry/core": "1.17.0", - "@opentelemetry/semantic-conventions": "1.17.0", + "@opentelemetry/core": "1.17.1", + "@opentelemetry/semantic-conventions": "1.17.1", "opentracing": "^0.14.4" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/opentelemetry-shim-opentracing", diff --git a/packages/sdk-metrics/package.json b/packages/sdk-metrics/package.json index 9d6c7d4e8f..ee69a4d485 100644 --- a/packages/sdk-metrics/package.json +++ b/packages/sdk-metrics/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/sdk-metrics", - "version": "1.17.0", + "version": "1.17.1", "description": "OpenTelemetry metrics SDK", "main": "build/src/index.js", "module": "build/esm/index.js", @@ -84,8 +84,8 @@ "@opentelemetry/api": ">=1.3.0 <1.7.0" }, "dependencies": { - "@opentelemetry/core": "1.17.0", - "@opentelemetry/resources": "1.17.0", + "@opentelemetry/core": "1.17.1", + "@opentelemetry/resources": "1.17.1", "lodash.merge": "^4.6.2" }, "homepage": "https://github.com/open-telemetry/opentelemetry-js/tree/main/packages/sdk-metrics", diff --git a/packages/sdk-metrics/src/InstrumentDescriptor.ts b/packages/sdk-metrics/src/InstrumentDescriptor.ts index f0053f9c39..ed036eb4db 100644 --- a/packages/sdk-metrics/src/InstrumentDescriptor.ts +++ b/packages/sdk-metrics/src/InstrumentDescriptor.ts @@ -14,7 +14,12 @@ * limitations under the License. */ -import { MetricOptions, ValueType, diag } from '@opentelemetry/api'; +import { + MetricAdvice, + MetricOptions, + ValueType, + diag, +} from '@opentelemetry/api'; import { View } from './view/View'; import { equalsCaseInsensitive } from './utils'; @@ -31,7 +36,10 @@ export enum InstrumentType { } /** - * An interface describing the instrument. + * An internal interface describing the instrument. + * + * This is intentionally distinguished from the public MetricDescriptor (a.k.a. InstrumentDescriptor) + * which may not contains internal fields like metric advice. */ export interface InstrumentDescriptor { readonly name: string; @@ -39,6 +47,10 @@ export interface InstrumentDescriptor { readonly unit: string; readonly type: InstrumentType; readonly valueType: ValueType; + /** + * @experimental + */ + readonly advice: MetricAdvice; } export function createInstrumentDescriptor( @@ -57,6 +69,7 @@ export function createInstrumentDescriptor( description: options?.description ?? '', unit: options?.unit ?? '', valueType: options?.valueType ?? ValueType.DOUBLE, + advice: options?.advice ?? {}, }; } @@ -70,6 +83,7 @@ export function createInstrumentDescriptorWithView( type: instrument.type, unit: instrument.unit, valueType: instrument.valueType, + advice: instrument.advice, }; } diff --git a/packages/sdk-metrics/src/ObservableResult.ts b/packages/sdk-metrics/src/ObservableResult.ts index 9298a46d93..c9a7b202ea 100644 --- a/packages/sdk-metrics/src/ObservableResult.ts +++ b/packages/sdk-metrics/src/ObservableResult.ts @@ -24,7 +24,6 @@ import { } from '@opentelemetry/api'; import { AttributeHashMap } from './state/HashMap'; import { isObservableInstrument, ObservableInstrument } from './Instruments'; -import { InstrumentDescriptor } from '.'; /** * The class implements {@link ObservableResult} interface. @@ -35,7 +34,10 @@ export class ObservableResultImpl implements ObservableResult { */ _buffer = new AttributeHashMap(); - constructor(private _descriptor: InstrumentDescriptor) {} + constructor( + private _instrumentName: string, + private _valueType: ValueType + ) {} /** * Observe a measurement of the value associated with the given attributes. @@ -43,16 +45,13 @@ export class ObservableResultImpl implements ObservableResult { observe(value: number, attributes: MetricAttributes = {}): void { if (typeof value !== 'number') { diag.warn( - `non-number value provided to metric ${this._descriptor.name}: ${value}` + `non-number value provided to metric ${this._instrumentName}: ${value}` ); return; } - if ( - this._descriptor.valueType === ValueType.INT && - !Number.isInteger(value) - ) { + if (this._valueType === ValueType.INT && !Number.isInteger(value)) { diag.warn( - `INT value type cannot accept a floating-point value for ${this._descriptor.name}, ignoring the fractional digits.` + `INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.` ); value = Math.trunc(value); // ignore non-finite values. diff --git a/packages/sdk-metrics/src/aggregator/Drop.ts b/packages/sdk-metrics/src/aggregator/Drop.ts index 343c90357c..f968bdf4d6 100644 --- a/packages/sdk-metrics/src/aggregator/Drop.ts +++ b/packages/sdk-metrics/src/aggregator/Drop.ts @@ -16,8 +16,7 @@ import { HrTime } from '@opentelemetry/api'; import { AggregationTemporality } from '../export/AggregationTemporality'; -import { MetricData } from '../export/MetricData'; -import { InstrumentDescriptor } from '../InstrumentDescriptor'; +import { MetricData, MetricDescriptor } from '../export/MetricData'; import { Maybe } from '../utils'; import { AggregatorKind, Aggregator, AccumulationRecord } from './types'; @@ -38,7 +37,7 @@ export class DropAggregator implements Aggregator { } toMetricData( - _descriptor: InstrumentDescriptor, + _descriptor: MetricDescriptor, _aggregationTemporality: AggregationTemporality, _accumulationByAttributes: AccumulationRecord[], _endTime: HrTime diff --git a/packages/sdk-metrics/src/aggregator/ExponentialHistogram.ts b/packages/sdk-metrics/src/aggregator/ExponentialHistogram.ts index bceb86b8ec..9356580205 100644 --- a/packages/sdk-metrics/src/aggregator/ExponentialHistogram.ts +++ b/packages/sdk-metrics/src/aggregator/ExponentialHistogram.ts @@ -24,9 +24,10 @@ import { import { DataPointType, ExponentialHistogramMetricData, + MetricDescriptor, } from '../export/MetricData'; import { diag, HrTime } from '@opentelemetry/api'; -import { InstrumentDescriptor, InstrumentType } from '../InstrumentDescriptor'; +import { InstrumentType } from '../InstrumentDescriptor'; import { Maybe } from '../utils'; import { AggregationTemporality } from '../export/AggregationTemporality'; import { Buckets } from './exponential-histogram/Buckets'; @@ -555,7 +556,7 @@ export class ExponentialHistogramAggregator } toMetricData( - descriptor: InstrumentDescriptor, + descriptor: MetricDescriptor, aggregationTemporality: AggregationTemporality, accumulationByAttributes: AccumulationRecord[], endTime: HrTime diff --git a/packages/sdk-metrics/src/aggregator/Histogram.ts b/packages/sdk-metrics/src/aggregator/Histogram.ts index f20784b054..60e5e8df05 100644 --- a/packages/sdk-metrics/src/aggregator/Histogram.ts +++ b/packages/sdk-metrics/src/aggregator/Histogram.ts @@ -20,9 +20,13 @@ import { Aggregator, AggregatorKind, } from './types'; -import { DataPointType, HistogramMetricData } from '../export/MetricData'; +import { + DataPointType, + HistogramMetricData, + MetricDescriptor, +} from '../export/MetricData'; import { HrTime } from '@opentelemetry/api'; -import { InstrumentDescriptor, InstrumentType } from '../InstrumentDescriptor'; +import { InstrumentType } from '../InstrumentDescriptor'; import { binarySearchLB, Maybe } from '../utils'; import { AggregationTemporality } from '../export/AggregationTemporality'; @@ -207,7 +211,7 @@ export class HistogramAggregator implements Aggregator { } toMetricData( - descriptor: InstrumentDescriptor, + descriptor: MetricDescriptor, aggregationTemporality: AggregationTemporality, accumulationByAttributes: AccumulationRecord[], endTime: HrTime diff --git a/packages/sdk-metrics/src/aggregator/LastValue.ts b/packages/sdk-metrics/src/aggregator/LastValue.ts index 9c627130f6..905e45f1de 100644 --- a/packages/sdk-metrics/src/aggregator/LastValue.ts +++ b/packages/sdk-metrics/src/aggregator/LastValue.ts @@ -23,8 +23,11 @@ import { } from './types'; import { HrTime } from '@opentelemetry/api'; import { millisToHrTime, hrTimeToMicroseconds } from '@opentelemetry/core'; -import { DataPointType, GaugeMetricData } from '../export/MetricData'; -import { InstrumentDescriptor } from '../InstrumentDescriptor'; +import { + DataPointType, + GaugeMetricData, + MetricDescriptor, +} from '../export/MetricData'; import { Maybe } from '../utils'; import { AggregationTemporality } from '../export/AggregationTemporality'; @@ -103,7 +106,7 @@ export class LastValueAggregator implements Aggregator { } toMetricData( - descriptor: InstrumentDescriptor, + descriptor: MetricDescriptor, aggregationTemporality: AggregationTemporality, accumulationByAttributes: AccumulationRecord[], endTime: HrTime diff --git a/packages/sdk-metrics/src/aggregator/Sum.ts b/packages/sdk-metrics/src/aggregator/Sum.ts index ba53c389ee..a851e5b9f2 100644 --- a/packages/sdk-metrics/src/aggregator/Sum.ts +++ b/packages/sdk-metrics/src/aggregator/Sum.ts @@ -22,8 +22,11 @@ import { AccumulationRecord, } from './types'; import { HrTime } from '@opentelemetry/api'; -import { DataPointType, SumMetricData } from '../export/MetricData'; -import { InstrumentDescriptor } from '../InstrumentDescriptor'; +import { + DataPointType, + MetricDescriptor, + SumMetricData, +} from '../export/MetricData'; import { Maybe } from '../utils'; import { AggregationTemporality } from '../export/AggregationTemporality'; @@ -109,7 +112,7 @@ export class SumAggregator implements Aggregator { } toMetricData( - descriptor: InstrumentDescriptor, + descriptor: MetricDescriptor, aggregationTemporality: AggregationTemporality, accumulationByAttributes: AccumulationRecord[], endTime: HrTime diff --git a/packages/sdk-metrics/src/aggregator/types.ts b/packages/sdk-metrics/src/aggregator/types.ts index 16888256b2..9be5247702 100644 --- a/packages/sdk-metrics/src/aggregator/types.ts +++ b/packages/sdk-metrics/src/aggregator/types.ts @@ -16,8 +16,7 @@ import { HrTime, MetricAttributes } from '@opentelemetry/api'; import { AggregationTemporality } from '../export/AggregationTemporality'; -import { MetricData } from '../export/MetricData'; -import { InstrumentDescriptor } from '../InstrumentDescriptor'; +import { MetricData, MetricDescriptor } from '../export/MetricData'; import { Maybe } from '../utils'; /** The kind of aggregator. */ @@ -128,14 +127,14 @@ export interface Aggregator { /** * Returns the {@link MetricData} that this {@link Aggregator} will produce. * - * @param descriptor the metric instrument descriptor. + * @param descriptor the metric descriptor. * @param aggregationTemporality the temporality of the resulting {@link MetricData} * @param accumulationByAttributes the array of attributes and accumulation pairs. * @param endTime the end time of the metric data. * @return the {@link MetricData} that this {@link Aggregator} will produce. */ toMetricData( - descriptor: InstrumentDescriptor, + descriptor: MetricDescriptor, aggregationTemporality: AggregationTemporality, accumulationByAttributes: AccumulationRecord[], endTime: HrTime diff --git a/packages/sdk-metrics/src/export/MetricData.ts b/packages/sdk-metrics/src/export/MetricData.ts index 19868dbc62..d4ad0c7ad2 100644 --- a/packages/sdk-metrics/src/export/MetricData.ts +++ b/packages/sdk-metrics/src/export/MetricData.ts @@ -14,18 +14,30 @@ * limitations under the License. */ -import { HrTime, MetricAttributes } from '@opentelemetry/api'; +import { HrTime, MetricAttributes, ValueType } from '@opentelemetry/api'; import { InstrumentationScope } from '@opentelemetry/core'; import { IResource } from '@opentelemetry/resources'; -import { InstrumentDescriptor } from '../InstrumentDescriptor'; +import { InstrumentType } from '../InstrumentDescriptor'; import { AggregationTemporality } from './AggregationTemporality'; import { Histogram, ExponentialHistogram } from '../aggregator/types'; +export interface MetricDescriptor { + readonly name: string; + readonly description: string; + readonly unit: string; + /** + * @deprecated exporter should avoid depending on the type of the instrument + * as their resulting aggregator can be re-mapped with views. + */ + readonly type: InstrumentType; + readonly valueType: ValueType; +} + /** * Basic metric data fields. */ interface BaseMetricData { - readonly descriptor: InstrumentDescriptor; + readonly descriptor: MetricDescriptor; readonly aggregationTemporality: AggregationTemporality; /** * DataPointType of the metric instrument. diff --git a/packages/sdk-metrics/src/index.ts b/packages/sdk-metrics/src/index.ts index c9623707f2..414766c099 100644 --- a/packages/sdk-metrics/src/index.ts +++ b/packages/sdk-metrics/src/index.ts @@ -14,6 +14,8 @@ * limitations under the License. */ +import { MetricDescriptor } from './export/MetricData'; + export { Sum, LastValue, @@ -38,6 +40,7 @@ export { ResourceMetrics, ScopeMetrics, MetricData, + MetricDescriptor, CollectionResult, } from './export/MetricData'; @@ -56,7 +59,11 @@ export { ConsoleMetricExporter } from './export/ConsoleMetricExporter'; export { MetricCollectOptions, MetricProducer } from './export/MetricProducer'; -export { InstrumentDescriptor, InstrumentType } from './InstrumentDescriptor'; +export { InstrumentType } from './InstrumentDescriptor'; +/** + * @deprecated Use {@link MetricDescriptor} instead. + */ +export type InstrumentDescriptor = MetricDescriptor; export { MeterProvider, MeterProviderOptions } from './MeterProvider'; diff --git a/packages/sdk-metrics/src/state/AsyncMetricStorage.ts b/packages/sdk-metrics/src/state/AsyncMetricStorage.ts index 286874987c..6bebafdc1f 100644 --- a/packages/sdk-metrics/src/state/AsyncMetricStorage.ts +++ b/packages/sdk-metrics/src/state/AsyncMetricStorage.ts @@ -42,11 +42,15 @@ export class AsyncMetricStorage> constructor( _instrumentDescriptor: InstrumentDescriptor, aggregator: Aggregator, - private _attributesProcessor: AttributesProcessor + private _attributesProcessor: AttributesProcessor, + collectorHandles: MetricCollectorHandle[] ) { super(_instrumentDescriptor); this._deltaMetricStorage = new DeltaMetricProcessor(aggregator); - this._temporalMetricStorage = new TemporalMetricProcessor(aggregator); + this._temporalMetricStorage = new TemporalMetricProcessor( + aggregator, + collectorHandles + ); } record(measurements: AttributeHashMap, observationTime: HrTime) { @@ -66,14 +70,12 @@ export class AsyncMetricStorage> */ collect( collector: MetricCollectorHandle, - collectors: MetricCollectorHandle[], collectionTime: HrTime ): Maybe { const accumulations = this._deltaMetricStorage.collect(); return this._temporalMetricStorage.buildMetrics( collector, - collectors, this._instrumentDescriptor, accumulations, collectionTime diff --git a/packages/sdk-metrics/src/state/MeterSharedState.ts b/packages/sdk-metrics/src/state/MeterSharedState.ts index 4189d6bb6c..2c0c1a5105 100644 --- a/packages/sdk-metrics/src/state/MeterSharedState.ts +++ b/packages/sdk-metrics/src/state/MeterSharedState.ts @@ -96,11 +96,7 @@ export class MeterSharedState { const metricDataList = storages .map(metricStorage => { - return metricStorage.collect( - collector, - this._meterProviderSharedState.metricCollectors, - collectionTime - ); + return metricStorage.collect(collector, collectionTime); }) .filter(isNotNullish); @@ -145,7 +141,8 @@ export class MeterSharedState { const viewStorage = new MetricStorageType( viewDescriptor, aggregator, - view.attributesProcessor + view.attributesProcessor, + this._meterProviderSharedState.metricCollectors ) as R; this.metricStorageRegistry.register(viewStorage); return viewStorage; @@ -169,7 +166,8 @@ export class MeterSharedState { const storage = new MetricStorageType( descriptor, aggregator, - AttributesProcessor.Noop() + AttributesProcessor.Noop(), + [collector] ) as R; this.metricStorageRegistry.registerForCollector(collector, storage); return storage; @@ -191,6 +189,7 @@ interface MetricStorageConstructor { new ( instrumentDescriptor: InstrumentDescriptor, aggregator: Aggregator>, - attributesProcessor: AttributesProcessor + attributesProcessor: AttributesProcessor, + collectors: MetricCollectorHandle[] ): MetricStorage; } diff --git a/packages/sdk-metrics/src/state/MetricStorage.ts b/packages/sdk-metrics/src/state/MetricStorage.ts index 5d02437f58..e959ea0329 100644 --- a/packages/sdk-metrics/src/state/MetricStorage.ts +++ b/packages/sdk-metrics/src/state/MetricStorage.ts @@ -39,7 +39,6 @@ export abstract class MetricStorage { */ abstract collect( collector: MetricCollectorHandle, - collectors: MetricCollectorHandle[], collectionTime: HrTime ): Maybe; @@ -55,6 +54,7 @@ export abstract class MetricStorage { description: description, valueType: this._instrumentDescriptor.valueType, unit: this._instrumentDescriptor.unit, + advice: this._instrumentDescriptor.advice, } ); } diff --git a/packages/sdk-metrics/src/state/ObservableRegistry.ts b/packages/sdk-metrics/src/state/ObservableRegistry.ts index 444395bca7..5e25686c6a 100644 --- a/packages/sdk-metrics/src/state/ObservableRegistry.ts +++ b/packages/sdk-metrics/src/state/ObservableRegistry.ts @@ -144,7 +144,10 @@ export class ObservableRegistry { private _observeCallbacks(observationTime: HrTime, timeoutMillis?: number) { return this._callbacks.map(async ({ callback, instrument }) => { - const observableResult = new ObservableResultImpl(instrument._descriptor); + const observableResult = new ObservableResultImpl( + instrument._descriptor.name, + instrument._descriptor.valueType + ); let callPromise: Promise = Promise.resolve( callback(observableResult) ); diff --git a/packages/sdk-metrics/src/state/SyncMetricStorage.ts b/packages/sdk-metrics/src/state/SyncMetricStorage.ts index 0648b12728..bb546e1271 100644 --- a/packages/sdk-metrics/src/state/SyncMetricStorage.ts +++ b/packages/sdk-metrics/src/state/SyncMetricStorage.ts @@ -41,11 +41,15 @@ export class SyncMetricStorage> constructor( instrumentDescriptor: InstrumentDescriptor, aggregator: Aggregator, - private _attributesProcessor: AttributesProcessor + private _attributesProcessor: AttributesProcessor, + collectorHandles: MetricCollectorHandle[] ) { super(instrumentDescriptor); this._deltaMetricStorage = new DeltaMetricProcessor(aggregator); - this._temporalMetricStorage = new TemporalMetricProcessor(aggregator); + this._temporalMetricStorage = new TemporalMetricProcessor( + aggregator, + collectorHandles + ); } record( @@ -66,14 +70,12 @@ export class SyncMetricStorage> */ collect( collector: MetricCollectorHandle, - collectors: MetricCollectorHandle[], collectionTime: HrTime ): Maybe { const accumulations = this._deltaMetricStorage.collect(); return this._temporalMetricStorage.buildMetrics( collector, - collectors, this._instrumentDescriptor, accumulations, collectionTime diff --git a/packages/sdk-metrics/src/state/TemporalMetricProcessor.ts b/packages/sdk-metrics/src/state/TemporalMetricProcessor.ts index bb5559e70e..967b6f8181 100644 --- a/packages/sdk-metrics/src/state/TemporalMetricProcessor.ts +++ b/packages/sdk-metrics/src/state/TemporalMetricProcessor.ts @@ -61,7 +61,14 @@ export class TemporalMetricProcessor> { LastReportedHistory >(); - constructor(private _aggregator: Aggregator) {} + constructor( + private _aggregator: Aggregator, + collectorHandles: MetricCollectorHandle[] + ) { + collectorHandles.forEach(handle => { + this._unreportedAccumulations.set(handle, []); + }); + } /** * Builds the {@link MetricData} streams to report against a specific MetricCollector. @@ -74,12 +81,11 @@ export class TemporalMetricProcessor> { */ buildMetrics( collector: MetricCollectorHandle, - collectors: MetricCollectorHandle[], instrumentDescriptor: InstrumentDescriptor, currentAccumulations: AttributeHashMap, collectionTime: HrTime ): Maybe { - this._stashAccumulations(collectors, currentAccumulations); + this._stashAccumulations(currentAccumulations); const unreportedAccumulations = this._getMergedUnreportedAccumulations(collector); @@ -148,18 +154,16 @@ export class TemporalMetricProcessor> { ); } - private _stashAccumulations( - collectors: MetricCollectorHandle[], - currentAccumulation: AttributeHashMap - ) { - collectors.forEach(it => { - let stash = this._unreportedAccumulations.get(it); + private _stashAccumulations(currentAccumulation: AttributeHashMap) { + const registeredCollectors = this._unreportedAccumulations.keys(); + for (const collector of registeredCollectors) { + let stash = this._unreportedAccumulations.get(collector); if (stash === undefined) { stash = []; - this._unreportedAccumulations.set(it, stash); + this._unreportedAccumulations.set(collector, stash); } stash.push(currentAccumulation); - }); + } } private _getMergedUnreportedAccumulations(collector: MetricCollectorHandle) { diff --git a/packages/sdk-metrics/src/view/Aggregation.ts b/packages/sdk-metrics/src/view/Aggregation.ts index 821b55ec2f..6edf50c495 100644 --- a/packages/sdk-metrics/src/view/Aggregation.ts +++ b/packages/sdk-metrics/src/view/Aggregation.ts @@ -184,6 +184,11 @@ export class DefaultAggregation extends Aggregation { return LAST_VALUE_AGGREGATION; } case InstrumentType.HISTOGRAM: { + if (instrument.advice.explicitBucketBoundaries) { + return new ExplicitBucketHistogramAggregation( + instrument.advice.explicitBucketBoundaries + ); + } return HISTOGRAM_AGGREGATION; } } diff --git a/packages/sdk-metrics/test/InstrumentDescriptor.test.ts b/packages/sdk-metrics/test/InstrumentDescriptor.test.ts index 5bf3196693..b33a3e8f3a 100644 --- a/packages/sdk-metrics/test/InstrumentDescriptor.test.ts +++ b/packages/sdk-metrics/test/InstrumentDescriptor.test.ts @@ -57,6 +57,7 @@ describe('InstrumentDescriptor', () => { unit: 'kB', type: InstrumentType.COUNTER, valueType: ValueType.DOUBLE, + advice: {}, }, { name: 'foo', @@ -64,6 +65,7 @@ describe('InstrumentDescriptor', () => { unit: 'kB', type: InstrumentType.COUNTER, valueType: ValueType.DOUBLE, + advice: {}, }, ], [ @@ -75,6 +77,7 @@ describe('InstrumentDescriptor', () => { unit: '', type: InstrumentType.COUNTER, valueType: ValueType.DOUBLE, + advice: {}, }, { name: 'FoO', @@ -82,6 +85,53 @@ describe('InstrumentDescriptor', () => { unit: '', type: InstrumentType.COUNTER, valueType: ValueType.DOUBLE, + advice: {}, + }, + ], + [ + 'Compatible with different advice options', + true, + { + name: 'foo', + description: '', + unit: '', + type: InstrumentType.COUNTER, + valueType: ValueType.DOUBLE, + advice: { + explicitBucketBoundaries: [4, 5, 6], + }, + }, + { + name: 'FoO', + description: '', + unit: '', + type: InstrumentType.COUNTER, + valueType: ValueType.DOUBLE, + advice: { + explicitBucketBoundaries: [1, 2, 3], + }, + }, + ], + [ + 'Compatible with empty advice options', + true, + { + name: 'foo', + description: '', + unit: '', + type: InstrumentType.COUNTER, + valueType: ValueType.DOUBLE, + advice: {}, + }, + { + name: 'FoO', + description: '', + unit: '', + type: InstrumentType.COUNTER, + valueType: ValueType.DOUBLE, + advice: { + explicitBucketBoundaries: [1, 2, 3], + }, }, ], [ @@ -93,6 +143,7 @@ describe('InstrumentDescriptor', () => { unit: '', type: InstrumentType.COUNTER, valueType: ValueType.DOUBLE, + advice: {}, }, { name: 'foobar', @@ -100,6 +151,7 @@ describe('InstrumentDescriptor', () => { unit: '', type: InstrumentType.COUNTER, valueType: ValueType.DOUBLE, + advice: {}, }, ], [ @@ -111,6 +163,7 @@ describe('InstrumentDescriptor', () => { unit: 'kB', type: InstrumentType.COUNTER, valueType: ValueType.DOUBLE, + advice: {}, }, { name: 'foo', @@ -118,6 +171,7 @@ describe('InstrumentDescriptor', () => { unit: 'kb', type: InstrumentType.COUNTER, valueType: ValueType.DOUBLE, + advice: {}, }, ], ]; diff --git a/packages/sdk-metrics/test/Instruments.test.ts b/packages/sdk-metrics/test/Instruments.test.ts index cfb6255039..56ecf03af6 100644 --- a/packages/sdk-metrics/test/Instruments.test.ts +++ b/packages/sdk-metrics/test/Instruments.test.ts @@ -19,13 +19,13 @@ import * as sinon from 'sinon'; import { InstrumentationScope } from '@opentelemetry/core'; import { Resource } from '@opentelemetry/resources'; import { - InstrumentDescriptor, InstrumentType, MeterProvider, MetricReader, DataPoint, DataPointType, Histogram, + MetricDescriptor, } from '../src'; import { TestDeltaMetricReader, @@ -352,6 +352,60 @@ describe('Instruments', () => { }); }); + it('should recognize metric advice', async () => { + const { meter, deltaReader } = setup(); + const histogram = meter.createHistogram('test', { + valueType: ValueType.INT, + advice: { + // Set explicit boundaries that are different from the default one. + explicitBucketBoundaries: [1, 9, 100], + }, + }); + + histogram.record(10); + histogram.record(0); + histogram.record(100, { foo: 'bar' }); + histogram.record(0, { foo: 'bar' }); + await validateExport(deltaReader, { + descriptor: { + name: 'test', + description: '', + unit: '', + type: InstrumentType.HISTOGRAM, + valueType: ValueType.INT, + }, + dataPointType: DataPointType.HISTOGRAM, + dataPoints: [ + { + attributes: {}, + value: { + buckets: { + boundaries: [1, 9, 100], + counts: [1, 0, 1, 0], + }, + count: 2, + sum: 10, + max: 10, + min: 0, + }, + }, + { + attributes: { foo: 'bar' }, + value: { + buckets: { + boundaries: [1, 9, 100], + counts: [1, 0, 0, 1], + }, + count: 2, + sum: 100, + max: 100, + min: 0, + }, + }, + ], + }); + }); + it('should collect min and max', async () => { const { meter, deltaReader, cumulativeReader } = setup(); const histogram = meter.createHistogram('test', { @@ -721,7 +775,7 @@ function setup() { interface ValidateMetricData { resource?: Resource; instrumentationScope?: InstrumentationScope; - descriptor?: InstrumentDescriptor; + descriptor?: MetricDescriptor; dataPointType?: DataPointType; dataPoints?: Partial>>[]; isMonotonic?: boolean; diff --git a/packages/sdk-metrics/test/ObservableResult.test.ts b/packages/sdk-metrics/test/ObservableResult.test.ts index 9aacc46066..2dd7be5cad 100644 --- a/packages/sdk-metrics/test/ObservableResult.test.ts +++ b/packages/sdk-metrics/test/ObservableResult.test.ts @@ -33,7 +33,8 @@ describe('ObservableResultImpl', () => { describe('observe', () => { it('should observe common values', () => { const observableResult = new ObservableResultImpl( - defaultInstrumentDescriptor + 'instrument_name', + ValueType.DOUBLE ); for (const value of commonValues) { for (const attributes of commonAttributes) { @@ -44,7 +45,8 @@ describe('ObservableResultImpl', () => { it('should deduplicate observations', () => { const observableResult = new ObservableResultImpl( - defaultInstrumentDescriptor + 'instrument_name', + ValueType.DOUBLE ); observableResult.observe(1, {}); observableResult.observe(2, {}); @@ -55,13 +57,10 @@ describe('ObservableResultImpl', () => { }); it('should trunc value if ValueType is INT', () => { - const observableResult = new ObservableResultImpl({ - name: 'test', - description: '', - type: InstrumentType.COUNTER, - unit: '', - valueType: ValueType.INT, - }); + const observableResult = new ObservableResultImpl( + 'instrument_name', + ValueType.INT + ); observableResult.observe(1.1, {}); // should ignore non-finite/non-number values. observableResult.observe(Infinity, {}); @@ -72,14 +71,7 @@ describe('ObservableResultImpl', () => { }); it('should ignore non-number values', () => { - const observableResult = new ObservableResultImpl({ - name: 'test', - description: '', - type: InstrumentType.COUNTER, - unit: '', - valueType: ValueType.INT, - }); - + const observableResult = new ObservableResultImpl('test', ValueType.INT); observableResult.observe('1' as any, {}); assert.strictEqual(observableResult._buffer.get({}), undefined); @@ -139,6 +131,7 @@ describe('BatchObservableResultImpl', () => { type: InstrumentType.COUNTER, unit: '', valueType: ValueType.INT, + advice: {}, }, [], new ObservableRegistry() @@ -161,6 +154,7 @@ describe('BatchObservableResultImpl', () => { type: InstrumentType.COUNTER, unit: '', valueType: ValueType.INT, + advice: {}, }, [], new ObservableRegistry() diff --git a/packages/sdk-metrics/test/state/AsyncMetricStorage.test.ts b/packages/sdk-metrics/test/state/AsyncMetricStorage.test.ts index 03eca24236..b4a5df1923 100644 --- a/packages/sdk-metrics/test/state/AsyncMetricStorage.test.ts +++ b/packages/sdk-metrics/test/state/AsyncMetricStorage.test.ts @@ -43,15 +43,16 @@ const cumulativeCollector: MetricCollectorHandle = { describe('AsyncMetricStorage', () => { describe('collect', () => { describe('Delta Collector', () => { - const collectors = [deltaCollector]; it('should collect and reset memos', async () => { const delegate = new ObservableCallbackDelegate(); const observableRegistry = new ObservableRegistry(); const metricStorage = new AsyncMetricStorage( defaultInstrumentDescriptor, new SumAggregator(true), - new NoopAttributesProcessor() + new NoopAttributesProcessor(), + [deltaCollector] ); + const observable = new ObservableInstrument( defaultInstrumentDescriptor, [metricStorage], @@ -68,11 +69,7 @@ describe('AsyncMetricStorage', () => { { const collectionTime: HrTime = [0, 0]; await observableRegistry.observe(collectionTime); - const metric = metricStorage.collect( - deltaCollector, - collectors, - collectionTime - ); + const metric = metricStorage.collect(deltaCollector, collectionTime); assertMetricData(metric, DataPointType.SUM); assert.strictEqual(metric.dataPoints.length, 3); @@ -104,11 +101,7 @@ describe('AsyncMetricStorage', () => { { const collectionTime: HrTime = [1, 1]; await observableRegistry.observe(collectionTime); - const metric = metricStorage.collect( - deltaCollector, - collectors, - collectionTime - ); + const metric = metricStorage.collect(deltaCollector, collectionTime); assert.equal(metric, undefined); } @@ -121,11 +114,7 @@ describe('AsyncMetricStorage', () => { { const collectionTime: HrTime = [2, 2]; await observableRegistry.observe(collectionTime); - const metric = metricStorage.collect( - deltaCollector, - collectors, - collectionTime - ); + const metric = metricStorage.collect(deltaCollector, collectionTime); assertMetricData(metric, DataPointType.SUM); assert.strictEqual(metric.dataPoints.length, 3); @@ -160,8 +149,10 @@ describe('AsyncMetricStorage', () => { const metricStorage = new AsyncMetricStorage( defaultInstrumentDescriptor, new SumAggregator(true), - new NoopAttributesProcessor() + new NoopAttributesProcessor(), + [deltaCollector] ); + const observable = new ObservableInstrument( defaultInstrumentDescriptor, [metricStorage], @@ -178,11 +169,7 @@ describe('AsyncMetricStorage', () => { { const collectionTime: HrTime = [0, 0]; await observableRegistry.observe(collectionTime); - const metric = metricStorage.collect( - deltaCollector, - collectors, - collectionTime - ); + const metric = metricStorage.collect(deltaCollector, collectionTime); assertMetricData(metric, DataPointType.SUM); assert.strictEqual(metric.dataPoints.length, 1); @@ -204,11 +191,7 @@ describe('AsyncMetricStorage', () => { { const collectionTime: HrTime = [1, 1]; await observableRegistry.observe(collectionTime); - const metric = metricStorage.collect( - deltaCollector, - collectors, - collectionTime - ); + const metric = metricStorage.collect(deltaCollector, collectionTime); assertMetricData(metric, DataPointType.SUM); assert.strictEqual(metric.dataPoints.length, 1); @@ -230,11 +213,7 @@ describe('AsyncMetricStorage', () => { { const collectionTime: HrTime = [2, 2]; await observableRegistry.observe(collectionTime); - const metric = metricStorage.collect( - deltaCollector, - collectors, - collectionTime - ); + const metric = metricStorage.collect(deltaCollector, collectionTime); assertMetricData(metric, DataPointType.SUM); assert.strictEqual(metric.dataPoints.length, 1); @@ -254,8 +233,10 @@ describe('AsyncMetricStorage', () => { const metricStorage = new AsyncMetricStorage( defaultInstrumentDescriptor, new SumAggregator(false), - new NoopAttributesProcessor() + new NoopAttributesProcessor(), + [deltaCollector] ); + const observable = new ObservableInstrument( defaultInstrumentDescriptor, [metricStorage], @@ -272,11 +253,7 @@ describe('AsyncMetricStorage', () => { { const collectionTime: HrTime = [0, 0]; await observableRegistry.observe(collectionTime); - const metric = metricStorage.collect( - deltaCollector, - collectors, - collectionTime - ); + const metric = metricStorage.collect(deltaCollector, collectionTime); assertMetricData(metric, DataPointType.SUM); assert.strictEqual(metric.dataPoints.length, 1); @@ -298,11 +275,7 @@ describe('AsyncMetricStorage', () => { { const collectionTime: HrTime = [0, 0]; await observableRegistry.observe(collectionTime); - const metric = metricStorage.collect( - deltaCollector, - collectors, - collectionTime - ); + const metric = metricStorage.collect(deltaCollector, collectionTime); assertMetricData(metric, DataPointType.SUM); assert.strictEqual(metric.dataPoints.length, 1); @@ -324,11 +297,7 @@ describe('AsyncMetricStorage', () => { { const collectionTime: HrTime = [2, 2]; await observableRegistry.observe(collectionTime); - const metric = metricStorage.collect( - deltaCollector, - collectors, - collectionTime - ); + const metric = metricStorage.collect(deltaCollector, collectionTime); assertMetricData(metric, DataPointType.SUM); assert.strictEqual(metric.dataPoints.length, 1); @@ -344,15 +313,16 @@ describe('AsyncMetricStorage', () => { }); describe('Cumulative Collector', () => { - const collectors = [cumulativeCollector]; it('should collect cumulative metrics', async () => { const delegate = new ObservableCallbackDelegate(); const observableRegistry = new ObservableRegistry(); const metricStorage = new AsyncMetricStorage( defaultInstrumentDescriptor, new SumAggregator(true), - new NoopAttributesProcessor() + new NoopAttributesProcessor(), + [cumulativeCollector] ); + const observable = new ObservableInstrument( defaultInstrumentDescriptor, [metricStorage], @@ -372,7 +342,6 @@ describe('AsyncMetricStorage', () => { await observableRegistry.observe(collectionTime); const metric = metricStorage.collect( cumulativeCollector, - collectors, collectionTime ); @@ -409,7 +378,6 @@ describe('AsyncMetricStorage', () => { await observableRegistry.observe(collectionTime); const metric = metricStorage.collect( cumulativeCollector, - collectors, collectionTime ); @@ -448,7 +416,6 @@ describe('AsyncMetricStorage', () => { await observableRegistry.observe(collectionTime); const metric = metricStorage.collect( cumulativeCollector, - collectors, collectionTime ); @@ -484,8 +451,10 @@ describe('AsyncMetricStorage', () => { const metricStorage = new AsyncMetricStorage( defaultInstrumentDescriptor, new SumAggregator(true), - new NoopAttributesProcessor() + new NoopAttributesProcessor(), + [cumulativeCollector] ); + const observable = new ObservableInstrument( defaultInstrumentDescriptor, [metricStorage], @@ -504,7 +473,6 @@ describe('AsyncMetricStorage', () => { await observableRegistry.observe(collectionTime); const metric = metricStorage.collect( cumulativeCollector, - collectors, collectionTime ); @@ -530,7 +498,6 @@ describe('AsyncMetricStorage', () => { await observableRegistry.observe(collectionTime); const metric = metricStorage.collect( cumulativeCollector, - collectors, collectionTime ); @@ -557,7 +524,6 @@ describe('AsyncMetricStorage', () => { await observableRegistry.observe(collectionTime); const metric = metricStorage.collect( cumulativeCollector, - collectors, collectionTime ); @@ -579,8 +545,10 @@ describe('AsyncMetricStorage', () => { const metricStorage = new AsyncMetricStorage( defaultInstrumentDescriptor, new SumAggregator(false), - new NoopAttributesProcessor() + new NoopAttributesProcessor(), + [cumulativeCollector] ); + const observable = new ObservableInstrument( defaultInstrumentDescriptor, [metricStorage], @@ -599,7 +567,6 @@ describe('AsyncMetricStorage', () => { await observableRegistry.observe(collectionTime); const metric = metricStorage.collect( cumulativeCollector, - collectors, collectionTime ); @@ -625,7 +592,6 @@ describe('AsyncMetricStorage', () => { await observableRegistry.observe(collectionTime); const metric = metricStorage.collect( cumulativeCollector, - collectors, collectionTime ); @@ -651,7 +617,6 @@ describe('AsyncMetricStorage', () => { await observableRegistry.observe(collectionTime); const metric = metricStorage.collect( cumulativeCollector, - collectors, collectionTime ); diff --git a/packages/sdk-metrics/test/state/MetricStorageRegistry.test.ts b/packages/sdk-metrics/test/state/MetricStorageRegistry.test.ts index 26a48a0ba3..8a1513e351 100644 --- a/packages/sdk-metrics/test/state/MetricStorageRegistry.test.ts +++ b/packages/sdk-metrics/test/state/MetricStorageRegistry.test.ts @@ -19,7 +19,7 @@ import { diag, ValueType } from '@opentelemetry/api'; import { MetricStorage } from '../../src/state/MetricStorage'; import { HrTime } from '@opentelemetry/api'; import { MetricCollectorHandle } from '../../src/state/MetricCollector'; -import { MetricData, InstrumentDescriptor, InstrumentType } from '../../src'; +import { MetricData, InstrumentType } from '../../src'; import { Maybe } from '../../src/utils'; import * as assert from 'assert'; import * as sinon from 'sinon'; @@ -29,11 +29,11 @@ import { getUnitConflictResolutionRecipe, getValueTypeConflictResolutionRecipe, } from '../../src/view/RegistrationConflicts'; +import { InstrumentDescriptor } from '../../src/InstrumentDescriptor'; class TestMetricStorage extends MetricStorage { collect( collector: MetricCollectorHandle, - collectors: MetricCollectorHandle[], collectionTime: HrTime ): Maybe { return undefined; @@ -74,6 +74,7 @@ describe('MetricStorageRegistry', () => { description: 'description', unit: '1', valueType: ValueType.DOUBLE, + advice: {}, }); registry.register(storage); @@ -93,6 +94,7 @@ describe('MetricStorageRegistry', () => { description: 'description', unit: '1', valueType: ValueType.DOUBLE, + advice: {}, }); const storage2 = new TestMetricStorage({ name: 'instrument2', @@ -100,6 +102,7 @@ describe('MetricStorageRegistry', () => { description: 'description', unit: '1', valueType: ValueType.DOUBLE, + advice: {}, }); registry.registerForCollector(collectorHandle, storage); @@ -153,6 +156,7 @@ describe('MetricStorageRegistry', () => { description: 'description', unit: '1', valueType: ValueType.DOUBLE, + advice: {}, }; const otherDescriptor = { @@ -161,6 +165,7 @@ describe('MetricStorageRegistry', () => { description: 'description', unit: '1', valueType: ValueType.DOUBLE, + advice: {}, }; testConflictingRegistration( @@ -177,6 +182,7 @@ describe('MetricStorageRegistry', () => { description: 'description', unit: '1', valueType: ValueType.DOUBLE, + advice: {}, }; const otherDescriptor = { @@ -185,6 +191,7 @@ describe('MetricStorageRegistry', () => { description: 'description', unit: '1', valueType: ValueType.INT, + advice: {}, }; testConflictingRegistration( @@ -204,6 +211,7 @@ describe('MetricStorageRegistry', () => { description: 'description', unit: '1', valueType: ValueType.DOUBLE, + advice: {}, }; const otherDescriptor = { @@ -212,6 +220,7 @@ describe('MetricStorageRegistry', () => { description: 'description', unit: 'ms', valueType: ValueType.DOUBLE, + advice: {}, }; testConflictingRegistration( @@ -228,6 +237,7 @@ describe('MetricStorageRegistry', () => { description: 'description', unit: '1', valueType: ValueType.DOUBLE, + advice: {}, }; const otherDescriptor = { @@ -236,6 +246,7 @@ describe('MetricStorageRegistry', () => { description: 'longer description', unit: '1', valueType: ValueType.DOUBLE, + advice: {}, }; const registry = new MetricStorageRegistry(); @@ -276,6 +287,7 @@ describe('MetricStorageRegistry', () => { description: 'description', unit: '1', valueType: ValueType.DOUBLE, + advice: {}, }; const storage = new TestMetricStorage(descriptor); @@ -295,6 +307,7 @@ describe('MetricStorageRegistry', () => { description: 'description', unit: '1', valueType: ValueType.DOUBLE, + advice: {}, }; const storage = new TestMetricStorage(descriptor); @@ -330,6 +343,7 @@ describe('MetricStorageRegistry', () => { description: 'description', unit: '1', valueType: ValueType.DOUBLE, + advice: {}, }; const otherDescriptor = { @@ -338,6 +352,7 @@ describe('MetricStorageRegistry', () => { description: 'description', unit: '1', valueType: ValueType.DOUBLE, + advice: {}, }; const registry = new MetricStorageRegistry(); @@ -376,6 +391,7 @@ describe('MetricStorageRegistry', () => { description: 'description', unit: '1', valueType: ValueType.DOUBLE, + advice: {}, }; const registry = new MetricStorageRegistry(); diff --git a/packages/sdk-metrics/test/state/SyncMetricStorage.test.ts b/packages/sdk-metrics/test/state/SyncMetricStorage.test.ts index 072cc9d16d..e2e0378a45 100644 --- a/packages/sdk-metrics/test/state/SyncMetricStorage.test.ts +++ b/packages/sdk-metrics/test/state/SyncMetricStorage.test.ts @@ -45,7 +45,8 @@ describe('SyncMetricStorage', () => { const metricStorage = new SyncMetricStorage( defaultInstrumentDescriptor, new SumAggregator(true), - new NoopAttributesProcessor() + new NoopAttributesProcessor(), + [] ); for (const value of commonValues) { @@ -58,22 +59,19 @@ describe('SyncMetricStorage', () => { describe('collect', () => { describe('Delta Collector', () => { - const collectors = [deltaCollector]; it('should collect and reset memos', async () => { const metricStorage = new SyncMetricStorage( defaultInstrumentDescriptor, new SumAggregator(true), - new NoopAttributesProcessor() + new NoopAttributesProcessor(), + [deltaCollector] ); + metricStorage.record(1, {}, api.context.active(), [0, 0]); metricStorage.record(2, {}, api.context.active(), [1, 1]); metricStorage.record(3, {}, api.context.active(), [2, 2]); { - const metric = metricStorage.collect( - deltaCollector, - collectors, - [3, 3] - ); + const metric = metricStorage.collect(deltaCollector, [3, 3]); assertMetricData(metric, DataPointType.SUM); assert.strictEqual(metric.dataPoints.length, 1); @@ -82,22 +80,14 @@ describe('SyncMetricStorage', () => { // The attributes should not be memorized. { - const metric = metricStorage.collect( - deltaCollector, - collectors, - [4, 4] - ); + const metric = metricStorage.collect(deltaCollector, [4, 4]); assert.strictEqual(metric, undefined); } metricStorage.record(1, {}, api.context.active(), [5, 5]); { - const metric = metricStorage.collect( - deltaCollector, - [deltaCollector], - [6, 6] - ); + const metric = metricStorage.collect(deltaCollector, [6, 6]); assertMetricData(metric, DataPointType.SUM); assert.strictEqual(metric.dataPoints.length, 1); @@ -107,22 +97,18 @@ describe('SyncMetricStorage', () => { }); describe('Cumulative Collector', () => { - const collectors = [cumulativeCollector]; it('should collect cumulative metrics', async () => { const metricStorage = new SyncMetricStorage( defaultInstrumentDescriptor, new SumAggregator(true), - new NoopAttributesProcessor() + new NoopAttributesProcessor(), + [cumulativeCollector] ); metricStorage.record(1, {}, api.context.active(), [0, 0]); metricStorage.record(2, {}, api.context.active(), [1, 1]); metricStorage.record(3, {}, api.context.active(), [2, 2]); { - const metric = metricStorage.collect( - cumulativeCollector, - collectors, - [3, 3] - ); + const metric = metricStorage.collect(cumulativeCollector, [3, 3]); assertMetricData(metric, DataPointType.SUM); assert.strictEqual(metric.dataPoints.length, 1); @@ -131,11 +117,7 @@ describe('SyncMetricStorage', () => { // The attributes should be memorized. { - const metric = metricStorage.collect( - cumulativeCollector, - collectors, - [4, 4] - ); + const metric = metricStorage.collect(cumulativeCollector, [4, 4]); assertMetricData(metric, DataPointType.SUM); assert.strictEqual(metric.dataPoints.length, 1); @@ -144,11 +126,7 @@ describe('SyncMetricStorage', () => { metricStorage.record(1, {}, api.context.active(), [5, 5]); { - const metric = metricStorage.collect( - cumulativeCollector, - collectors, - [6, 6] - ); + const metric = metricStorage.collect(cumulativeCollector, [6, 6]); assertMetricData(metric, DataPointType.SUM); assert.strictEqual(metric.dataPoints.length, 1); diff --git a/packages/sdk-metrics/test/state/TemporalMetricProcessor.test.ts b/packages/sdk-metrics/test/state/TemporalMetricProcessor.test.ts index 26a10aea57..77edc36b17 100644 --- a/packages/sdk-metrics/test/state/TemporalMetricProcessor.test.ts +++ b/packages/sdk-metrics/test/state/TemporalMetricProcessor.test.ts @@ -48,20 +48,18 @@ describe('TemporalMetricProcessor', () => { describe('buildMetrics', () => { describe('single delta collector', () => { - const collectors = [deltaCollector1]; - it('should build delta recording metrics', () => { const spy = sinon.spy(deltaCollector1, 'selectAggregationTemporality'); const aggregator = new SumAggregator(true); const deltaMetricStorage = new DeltaMetricProcessor(aggregator); - const temporalMetricStorage = new TemporalMetricProcessor(aggregator); - + const temporalMetricStorage = new TemporalMetricProcessor(aggregator, [ + deltaCollector1, + ]); deltaMetricStorage.record(1, {}, api.context.active(), [1, 1]); { const metric = temporalMetricStorage.buildMetrics( deltaCollector1, - collectors, defaultInstrumentDescriptor, deltaMetricStorage.collect(), [2, 2] @@ -81,7 +79,6 @@ describe('TemporalMetricProcessor', () => { { const metric = temporalMetricStorage.buildMetrics( deltaCollector1, - collectors, defaultInstrumentDescriptor, deltaMetricStorage.collect(), [4, 4] @@ -101,7 +98,6 @@ describe('TemporalMetricProcessor', () => { { const metric = temporalMetricStorage.buildMetrics( deltaCollector1, - collectors, defaultInstrumentDescriptor, deltaMetricStorage.collect(), [5, 5] @@ -117,18 +113,18 @@ describe('TemporalMetricProcessor', () => { }); describe('two delta collector', () => { - const collectors = [deltaCollector1, deltaCollector2]; - it('should build delta recording metrics', () => { const aggregator = new SumAggregator(true); const deltaMetricStorage = new DeltaMetricProcessor(aggregator); - const temporalMetricStorage = new TemporalMetricProcessor(aggregator); + const temporalMetricStorage = new TemporalMetricProcessor(aggregator, [ + deltaCollector1, + deltaCollector2, + ]); deltaMetricStorage.record(1, {}, api.context.active(), [1, 1]); { const metric = temporalMetricStorage.buildMetrics( deltaCollector1, - collectors, defaultInstrumentDescriptor, deltaMetricStorage.collect(), [2, 2] @@ -147,7 +143,6 @@ describe('TemporalMetricProcessor', () => { { const metric = temporalMetricStorage.buildMetrics( deltaCollector2, - collectors, defaultInstrumentDescriptor, deltaMetricStorage.collect(), [3, 3] @@ -166,7 +161,6 @@ describe('TemporalMetricProcessor', () => { }); describe('single cumulative collector', () => { - const collectors = [cumulativeCollector1]; it('should build delta recording metrics', () => { const spy = sinon.spy( cumulativeCollector1, @@ -175,13 +169,14 @@ describe('TemporalMetricProcessor', () => { const aggregator = new SumAggregator(true); const deltaMetricStorage = new DeltaMetricProcessor(aggregator); - const temporalMetricStorage = new TemporalMetricProcessor(aggregator); + const temporalMetricStorage = new TemporalMetricProcessor(aggregator, [ + cumulativeCollector1, + ]); deltaMetricStorage.record(1, {}, api.context.active(), [1, 1]); { const metric = temporalMetricStorage.buildMetrics( cumulativeCollector1, - collectors, defaultInstrumentDescriptor, deltaMetricStorage.collect(), [2, 2] @@ -201,7 +196,6 @@ describe('TemporalMetricProcessor', () => { { const metric = temporalMetricStorage.buildMetrics( cumulativeCollector1, - collectors, defaultInstrumentDescriptor, deltaMetricStorage.collect(), [4, 4] @@ -223,17 +217,18 @@ describe('TemporalMetricProcessor', () => { }); describe('cumulative collector with delta collector', () => { - const collectors = [deltaCollector1, cumulativeCollector1]; it('should build delta recording metrics', () => { const aggregator = new SumAggregator(true); const deltaMetricStorage = new DeltaMetricProcessor(aggregator); - const temporalMetricStorage = new TemporalMetricProcessor(aggregator); + const temporalMetricStorage = new TemporalMetricProcessor(aggregator, [ + cumulativeCollector1, + deltaCollector1, + ]); deltaMetricStorage.record(1, {}, api.context.active(), [1, 1]); { const metric = temporalMetricStorage.buildMetrics( cumulativeCollector1, - collectors, defaultInstrumentDescriptor, deltaMetricStorage.collect(), [2, 2] @@ -253,7 +248,6 @@ describe('TemporalMetricProcessor', () => { { const metric = temporalMetricStorage.buildMetrics( deltaCollector1, - collectors, defaultInstrumentDescriptor, deltaMetricStorage.collect(), [4, 4] @@ -271,7 +265,6 @@ describe('TemporalMetricProcessor', () => { { const metric = temporalMetricStorage.buildMetrics( cumulativeCollector1, - collectors, defaultInstrumentDescriptor, deltaMetricStorage.collect(), [5, 5] diff --git a/packages/sdk-metrics/test/util.ts b/packages/sdk-metrics/test/util.ts index 338a2f3978..75d7e66f03 100644 --- a/packages/sdk-metrics/test/util.ts +++ b/packages/sdk-metrics/test/util.ts @@ -33,6 +33,7 @@ import { DataPoint, DataPointType, ScopeMetrics, + MetricDescriptor, } from '../src/export/MetricData'; import { isNotNullish } from '../src/utils'; import { HrTime } from '@opentelemetry/api'; @@ -58,6 +59,7 @@ export const defaultInstrumentDescriptor: InstrumentDescriptor = { type: InstrumentType.COUNTER, unit: '1', valueType: ValueType.DOUBLE, + advice: {}, }; export const defaultInstrumentationScope: InstrumentationScope = { @@ -104,12 +106,12 @@ export function assertScopeMetrics( export function assertMetricData( actual: unknown, dataPointType?: DataPointType, - instrumentDescriptor: Partial | null = defaultInstrumentDescriptor, + metricDescriptor: Partial | null = defaultInstrumentDescriptor, aggregationTemporality?: AggregationTemporality ): asserts actual is MetricData { const it = actual as MetricData; - if (instrumentDescriptor != null) { - assertPartialDeepStrictEqual(it.descriptor, instrumentDescriptor); + if (metricDescriptor != null) { + assertPartialDeepStrictEqual(it.descriptor, metricDescriptor); } if (isNotNullish(dataPointType)) { assert.strictEqual(it.dataPointType, dataPointType); diff --git a/packages/template/package.json b/packages/template/package.json index b7836e5409..a5f1e971b0 100644 --- a/packages/template/package.json +++ b/packages/template/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/template", - "version": "1.17.0", + "version": "1.17.1", "private": true, "publishConfig": { "access": "restricted" diff --git a/selenium-tests/package.json b/selenium-tests/package.json index 9592f050de..4ddf94829e 100644 --- a/selenium-tests/package.json +++ b/selenium-tests/package.json @@ -1,6 +1,6 @@ { "name": "@opentelemetry/selenium-tests", - "version": "1.17.0", + "version": "1.18.0", "private": true, "description": "OpenTelemetry Selenium Tests", "main": "index.js", @@ -56,16 +56,16 @@ "@opentelemetry/api": "^1.0.0" }, "dependencies": { - "@opentelemetry/context-zone-peer-dep": "1.17.0", - "@opentelemetry/core": "1.17.0", - "@opentelemetry/exporter-trace-otlp-http": "0.43.0", - "@opentelemetry/exporter-zipkin": "1.17.0", - "@opentelemetry/instrumentation": "0.43.0", - "@opentelemetry/instrumentation-fetch": "0.43.0", - "@opentelemetry/instrumentation-xml-http-request": "0.43.0", - "@opentelemetry/sdk-metrics": "1.17.0", - "@opentelemetry/sdk-trace-base": "1.17.0", - "@opentelemetry/sdk-trace-web": "1.17.0", + "@opentelemetry/context-zone-peer-dep": "1.17.1", + "@opentelemetry/core": "1.17.1", + "@opentelemetry/exporter-trace-otlp-http": "0.44.0", + "@opentelemetry/exporter-zipkin": "1.17.1", + "@opentelemetry/instrumentation": "0.44.0", + "@opentelemetry/instrumentation-fetch": "0.44.0", + "@opentelemetry/instrumentation-xml-http-request": "0.44.0", + "@opentelemetry/sdk-metrics": "1.17.1", + "@opentelemetry/sdk-trace-base": "1.17.1", + "@opentelemetry/sdk-trace-web": "1.17.1", "zone.js": "0.11.4" } }