@openclaw/diagnostics-otel 2026.6.8 → 2026.6.9-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +98 -0
- package/node_modules/@opentelemetry/api-logs/build/esm/NoopLogger.d.ts +4 -0
- package/node_modules/@opentelemetry/api-logs/build/esm/NoopLogger.js +6 -0
- package/node_modules/@opentelemetry/api-logs/build/esm/NoopLogger.js.map +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esm/api/logs.d.ts +10 -2
- package/node_modules/@opentelemetry/api-logs/build/esm/api/logs.js +10 -2
- package/node_modules/@opentelemetry/api-logs/build/esm/api/logs.js.map +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esm/index.d.ts +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esm/index.js +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esm/index.js.map +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esm/types/LoggerOptions.d.ts +3 -2
- package/node_modules/@opentelemetry/api-logs/build/esm/types/LoggerOptions.js.map +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esm/types/LoggerProvider.d.ts +7 -3
- package/node_modules/@opentelemetry/api-logs/build/esm/types/LoggerProvider.js.map +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esnext/NoopLogger.d.ts +4 -0
- package/node_modules/@opentelemetry/api-logs/build/esnext/NoopLogger.js +6 -0
- package/node_modules/@opentelemetry/api-logs/build/esnext/NoopLogger.js.map +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esnext/api/logs.d.ts +10 -2
- package/node_modules/@opentelemetry/api-logs/build/esnext/api/logs.js +10 -2
- package/node_modules/@opentelemetry/api-logs/build/esnext/api/logs.js.map +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esnext/index.d.ts +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esnext/index.js +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esnext/index.js.map +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esnext/types/LoggerOptions.d.ts +3 -2
- package/node_modules/@opentelemetry/api-logs/build/esnext/types/LoggerOptions.js.map +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esnext/types/LoggerProvider.d.ts +7 -3
- package/node_modules/@opentelemetry/api-logs/build/esnext/types/LoggerProvider.js.map +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/api-logs/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/api-logs/build/src/NoopLogger.d.ts +4 -0
- package/node_modules/@opentelemetry/api-logs/build/src/NoopLogger.js +8 -1
- package/node_modules/@opentelemetry/api-logs/build/src/NoopLogger.js.map +1 -1
- package/node_modules/@opentelemetry/api-logs/build/src/api/logs.d.ts +10 -2
- package/node_modules/@opentelemetry/api-logs/build/src/api/logs.js +10 -2
- package/node_modules/@opentelemetry/api-logs/build/src/api/logs.js.map +1 -1
- package/node_modules/@opentelemetry/api-logs/build/src/index.d.ts +1 -1
- package/node_modules/@opentelemetry/api-logs/build/src/index.js +2 -3
- package/node_modules/@opentelemetry/api-logs/build/src/index.js.map +1 -1
- package/node_modules/@opentelemetry/api-logs/build/src/types/LoggerOptions.d.ts +3 -2
- package/node_modules/@opentelemetry/api-logs/build/src/types/LoggerOptions.js.map +1 -1
- package/node_modules/@opentelemetry/api-logs/build/src/types/LoggerProvider.d.ts +7 -3
- package/node_modules/@opentelemetry/api-logs/build/src/types/LoggerProvider.js.map +1 -1
- package/node_modules/@opentelemetry/api-logs/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/api-logs/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/api-logs/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/api-logs/package.json +5 -5
- package/node_modules/@opentelemetry/configuration/build/src/EnvironmentConfigFactory.js +23 -26
- package/node_modules/@opentelemetry/configuration/build/src/EnvironmentConfigFactory.js.map +1 -1
- package/node_modules/@opentelemetry/configuration/build/src/FileConfigFactory.js +3 -155
- package/node_modules/@opentelemetry/configuration/build/src/FileConfigFactory.js.map +1 -1
- package/node_modules/@opentelemetry/configuration/build/src/generated/types.d.ts +596 -614
- package/node_modules/@opentelemetry/configuration/build/src/generated/types.js.map +1 -1
- package/node_modules/@opentelemetry/configuration/build/src/index.d.ts +1 -1
- package/node_modules/@opentelemetry/configuration/build/src/index.js.map +1 -1
- package/node_modules/@opentelemetry/configuration/build/src/utils.d.ts +12 -1
- package/node_modules/@opentelemetry/configuration/build/src/utils.js +93 -19
- package/node_modules/@opentelemetry/configuration/build/src/utils.js.map +1 -1
- package/node_modules/@opentelemetry/configuration/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/configuration/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/configuration/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/configuration/package.json +6 -6
- package/node_modules/@opentelemetry/context-async-hooks/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/context-async-hooks/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/context-async-hooks/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/context-async-hooks/package.json +4 -4
- package/node_modules/@opentelemetry/core/build/esm/baggage/propagation/W3CBaggagePropagator.js +14 -20
- package/node_modules/@opentelemetry/core/build/esm/baggage/propagation/W3CBaggagePropagator.js.map +1 -1
- package/node_modules/@opentelemetry/core/build/esm/baggage/utils.d.ts +7 -1
- package/node_modules/@opentelemetry/core/build/esm/baggage/utils.js +32 -1
- package/node_modules/@opentelemetry/core/build/esm/baggage/utils.js.map +1 -1
- package/node_modules/@opentelemetry/core/build/esm/common/time.d.ts +7 -2
- package/node_modules/@opentelemetry/core/build/esm/common/time.js +10 -3
- package/node_modules/@opentelemetry/core/build/esm/common/time.js.map +1 -1
- package/node_modules/@opentelemetry/core/build/esm/index.d.ts +1 -1
- package/node_modules/@opentelemetry/core/build/esm/index.js +1 -1
- package/node_modules/@opentelemetry/core/build/esm/index.js.map +1 -1
- package/node_modules/@opentelemetry/core/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/core/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/core/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/core/build/esnext/baggage/propagation/W3CBaggagePropagator.js +14 -20
- package/node_modules/@opentelemetry/core/build/esnext/baggage/propagation/W3CBaggagePropagator.js.map +1 -1
- package/node_modules/@opentelemetry/core/build/esnext/baggage/utils.d.ts +7 -1
- package/node_modules/@opentelemetry/core/build/esnext/baggage/utils.js +32 -1
- package/node_modules/@opentelemetry/core/build/esnext/baggage/utils.js.map +1 -1
- package/node_modules/@opentelemetry/core/build/esnext/common/time.d.ts +7 -2
- package/node_modules/@opentelemetry/core/build/esnext/common/time.js +10 -3
- package/node_modules/@opentelemetry/core/build/esnext/common/time.js.map +1 -1
- package/node_modules/@opentelemetry/core/build/esnext/index.d.ts +1 -1
- package/node_modules/@opentelemetry/core/build/esnext/index.js +1 -1
- package/node_modules/@opentelemetry/core/build/esnext/index.js.map +1 -1
- package/node_modules/@opentelemetry/core/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/core/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/core/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/core/build/src/baggage/propagation/W3CBaggagePropagator.js +12 -18
- package/node_modules/@opentelemetry/core/build/src/baggage/propagation/W3CBaggagePropagator.js.map +1 -1
- package/node_modules/@opentelemetry/core/build/src/baggage/utils.d.ts +7 -1
- package/node_modules/@opentelemetry/core/build/src/baggage/utils.js +33 -1
- package/node_modules/@opentelemetry/core/build/src/baggage/utils.js.map +1 -1
- package/node_modules/@opentelemetry/core/build/src/common/time.d.ts +7 -2
- package/node_modules/@opentelemetry/core/build/src/common/time.js +13 -5
- package/node_modules/@opentelemetry/core/build/src/common/time.js.map +1 -1
- package/node_modules/@opentelemetry/core/build/src/index.d.ts +1 -1
- package/node_modules/@opentelemetry/core/build/src/index.js +3 -1
- package/node_modules/@opentelemetry/core/build/src/index.js.map +1 -1
- package/node_modules/@opentelemetry/core/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/core/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/core/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/core/package.json +6 -6
- package/node_modules/@opentelemetry/exporter-logs-otlp-grpc/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-grpc/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-grpc/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-grpc/package.json +13 -13
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-http/package.json +13 -13
- package/node_modules/@opentelemetry/exporter-logs-otlp-proto/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-proto/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-proto/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-proto/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-proto/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-proto/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-proto/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-proto/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-proto/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-logs-otlp-proto/package.json +14 -14
- package/node_modules/@opentelemetry/exporter-metrics-otlp-grpc/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-grpc/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-grpc/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-grpc/package.json +13 -13
- package/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-http/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-http/package.json +12 -12
- package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-metrics-otlp-proto/package.json +13 -13
- package/node_modules/@opentelemetry/exporter-prometheus/build/src/PrometheusExporter.js +2 -0
- package/node_modules/@opentelemetry/exporter-prometheus/build/src/PrometheusExporter.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-prometheus/build/src/PrometheusSerializer.js +15 -1
- package/node_modules/@opentelemetry/exporter-prometheus/build/src/PrometheusSerializer.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-prometheus/build/src/semconv.d.ts +9 -0
- package/node_modules/@opentelemetry/exporter-prometheus/build/src/semconv.js +21 -0
- package/node_modules/@opentelemetry/exporter-prometheus/build/src/semconv.js.map +1 -0
- package/node_modules/@opentelemetry/exporter-prometheus/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-prometheus/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-prometheus/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-prometheus/package.json +7 -7
- package/node_modules/@opentelemetry/exporter-trace-otlp-grpc/README.md +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-grpc/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-grpc/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-grpc/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-grpc/package.json +12 -12
- package/node_modules/@opentelemetry/exporter-trace-otlp-http/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-http/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-http/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-http/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-http/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-http/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-http/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-http/package.json +12 -12
- package/node_modules/@opentelemetry/exporter-trace-otlp-proto/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-proto/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-proto/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-proto/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-proto/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-proto/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-proto/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-proto/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-proto/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-trace-otlp-proto/package.json +12 -12
- package/node_modules/@opentelemetry/exporter-zipkin/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-zipkin/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-zipkin/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-zipkin/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-zipkin/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-zipkin/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-zipkin/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/exporter-zipkin/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/exporter-zipkin/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/exporter-zipkin/package.json +11 -11
- package/node_modules/@opentelemetry/instrumentation/build/esm/instrumentation.js +1 -1
- package/node_modules/@opentelemetry/instrumentation/build/esm/instrumentation.js.map +1 -1
- package/node_modules/@opentelemetry/instrumentation/build/esm/semver.js +2 -2
- package/node_modules/@opentelemetry/instrumentation/build/esm/semver.js.map +1 -1
- package/node_modules/@opentelemetry/instrumentation/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/instrumentation/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/instrumentation/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/instrumentation/build/esnext/instrumentation.js +1 -1
- package/node_modules/@opentelemetry/instrumentation/build/esnext/instrumentation.js.map +1 -1
- package/node_modules/@opentelemetry/instrumentation/build/esnext/semver.js +2 -2
- package/node_modules/@opentelemetry/instrumentation/build/esnext/semver.js.map +1 -1
- package/node_modules/@opentelemetry/instrumentation/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/instrumentation/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/instrumentation/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/instrumentation/build/src/instrumentation.js +1 -1
- package/node_modules/@opentelemetry/instrumentation/build/src/instrumentation.js.map +1 -1
- package/node_modules/@opentelemetry/instrumentation/build/src/semver.js +2 -2
- package/node_modules/@opentelemetry/instrumentation/build/src/semver.js.map +1 -1
- package/node_modules/@opentelemetry/instrumentation/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/instrumentation/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/instrumentation/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/instrumentation/hook.mjs +3 -14
- package/node_modules/@opentelemetry/instrumentation/package.json +9 -9
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-exporter-base/package.json +9 -9
- package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/configuration/otlp-grpc-env-configuration.js +2 -2
- package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/configuration/otlp-grpc-env-configuration.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/grpc-exporter-transport.d.ts +1 -0
- package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/grpc-exporter-transport.js +17 -0
- package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/grpc-exporter-transport.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/index.d.ts +1 -0
- package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/index.js +5 -1
- package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/index.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/otlp-grpc-exporter-base/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-grpc-exporter-base/package.json +10 -10
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/common/internal.d.ts +6 -3
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/common/internal.js +7 -2
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/common/internal.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/common/protobuf/common-serializer.d.ts +10 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/common/protobuf/common-serializer.js +9 -0
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/common/protobuf/common-serializer.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/common/protobuf/protobuf-reader.d.ts +5 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/common/protobuf/protobuf-reader.js +5 -21
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/common/protobuf/protobuf-reader.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/logs/internal.d.ts +0 -3
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/logs/internal.js +6 -10
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/logs/internal.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/metrics/internal.js +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/metrics/internal.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esm/trace/internal.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/common/internal.d.ts +6 -3
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/common/internal.js +7 -2
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/common/internal.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/common/protobuf/common-serializer.d.ts +10 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/common/protobuf/common-serializer.js +9 -0
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/common/protobuf/common-serializer.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/common/protobuf/protobuf-reader.d.ts +5 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/common/protobuf/protobuf-reader.js +5 -21
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/common/protobuf/protobuf-reader.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/logs/internal.d.ts +0 -3
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/logs/internal.js +6 -10
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/logs/internal.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/metrics/internal.js +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/metrics/internal.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/trace/internal.js +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/esnext/trace/internal.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/src/common/internal.d.ts +6 -3
- package/node_modules/@opentelemetry/otlp-transformer/build/src/common/internal.js +7 -2
- package/node_modules/@opentelemetry/otlp-transformer/build/src/common/internal.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/common-serializer.d.ts +10 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/common-serializer.js +9 -0
- package/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/common-serializer.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/protobuf-reader.d.ts +5 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/protobuf-reader.js +5 -21
- package/node_modules/@opentelemetry/otlp-transformer/build/src/common/protobuf/protobuf-reader.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/src/logs/internal.d.ts +0 -3
- package/node_modules/@opentelemetry/otlp-transformer/build/src/logs/internal.js +6 -11
- package/node_modules/@opentelemetry/otlp-transformer/build/src/logs/internal.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/internal.js +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/src/metrics/internal.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/src/trace/internal.js +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/build/src/trace/internal.js.map +1 -1
- package/node_modules/@opentelemetry/otlp-transformer/package.json +13 -13
- package/node_modules/@opentelemetry/propagator-b3/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/propagator-b3/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/propagator-b3/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/propagator-b3/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/propagator-b3/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/propagator-b3/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/propagator-b3/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/propagator-b3/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/propagator-b3/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/propagator-b3/package.json +6 -6
- package/node_modules/@opentelemetry/propagator-jaeger/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/propagator-jaeger/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/propagator-jaeger/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/propagator-jaeger/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/propagator-jaeger/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/propagator-jaeger/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/propagator-jaeger/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/propagator-jaeger/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/propagator-jaeger/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/propagator-jaeger/package.json +7 -7
- package/node_modules/@opentelemetry/resources/build/esm/detectors/EnvDetector.js +2 -2
- package/node_modules/@opentelemetry/resources/build/esm/detectors/EnvDetector.js.map +1 -1
- package/node_modules/@opentelemetry/resources/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/resources/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/resources/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/resources/build/esnext/detectors/EnvDetector.js +2 -2
- package/node_modules/@opentelemetry/resources/build/esnext/detectors/EnvDetector.js.map +1 -1
- package/node_modules/@opentelemetry/resources/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/resources/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/resources/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/resources/build/src/detectors/EnvDetector.js +2 -2
- package/node_modules/@opentelemetry/resources/build/src/detectors/EnvDetector.js.map +1 -1
- package/node_modules/@opentelemetry/resources/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/resources/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/resources/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/resources/package.json +5 -5
- package/node_modules/@opentelemetry/sdk-logs/README.md +3 -0
- package/node_modules/@opentelemetry/sdk-logs/build/esm/LogRecordImpl.d.ts +4 -3
- package/node_modules/@opentelemetry/sdk-logs/build/esm/LogRecordImpl.js +5 -57
- package/node_modules/@opentelemetry/sdk-logs/build/esm/LogRecordImpl.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esm/Logger.d.ts +4 -4
- package/node_modules/@opentelemetry/sdk-logs/build/esm/Logger.js +5 -5
- package/node_modules/@opentelemetry/sdk-logs/build/esm/Logger.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esm/LoggerProvider.js +12 -5
- package/node_modules/@opentelemetry/sdk-logs/build/esm/LoggerProvider.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esm/export/BatchLogRecordProcessorBase.js +6 -3
- package/node_modules/@opentelemetry/sdk-logs/build/esm/export/BatchLogRecordProcessorBase.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esm/export/ReadableLogRecord.d.ts +4 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esm/export/ReadableLogRecord.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esm/export/SdkLogRecord.d.ts +7 -0
- package/node_modules/@opentelemetry/sdk-logs/build/esm/export/SdkLogRecord.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esm/export/SimpleLogRecordProcessor.js +0 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esm/export/SimpleLogRecordProcessor.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esm/internal/utils.d.ts +6 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esm/internal/utils.js +62 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esm/internal/utils.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esm/utils/validation.d.ts +21 -2
- package/node_modules/@opentelemetry/sdk-logs/build/esm/utils/validation.js +112 -3
- package/node_modules/@opentelemetry/sdk-logs/build/esm/utils/validation.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/LogRecordImpl.d.ts +4 -3
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/LogRecordImpl.js +5 -57
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/LogRecordImpl.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/Logger.d.ts +4 -4
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/Logger.js +5 -5
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/Logger.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/LoggerProvider.js +12 -5
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/LoggerProvider.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/BatchLogRecordProcessorBase.js +6 -3
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/BatchLogRecordProcessorBase.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/ReadableLogRecord.d.ts +4 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/ReadableLogRecord.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/SdkLogRecord.d.ts +7 -0
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/SdkLogRecord.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/SimpleLogRecordProcessor.js +0 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/export/SimpleLogRecordProcessor.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/internal/utils.d.ts +6 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/internal/utils.js +62 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/internal/utils.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/utils/validation.d.ts +21 -2
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/utils/validation.js +112 -3
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/utils/validation.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/LogRecordImpl.d.ts +4 -3
- package/node_modules/@opentelemetry/sdk-logs/build/src/LogRecordImpl.js +4 -56
- package/node_modules/@opentelemetry/sdk-logs/build/src/LogRecordImpl.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/Logger.d.ts +4 -4
- package/node_modules/@opentelemetry/sdk-logs/build/src/Logger.js +5 -5
- package/node_modules/@opentelemetry/sdk-logs/build/src/Logger.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/LoggerProvider.js +11 -4
- package/node_modules/@opentelemetry/sdk-logs/build/src/LoggerProvider.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/export/BatchLogRecordProcessorBase.js +6 -3
- package/node_modules/@opentelemetry/sdk-logs/build/src/export/BatchLogRecordProcessorBase.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/export/ReadableLogRecord.d.ts +4 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/export/ReadableLogRecord.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/export/SdkLogRecord.d.ts +7 -0
- package/node_modules/@opentelemetry/sdk-logs/build/src/export/SdkLogRecord.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/export/SimpleLogRecordProcessor.js +0 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/export/SimpleLogRecordProcessor.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/internal/utils.d.ts +6 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/internal/utils.js +62 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/internal/utils.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/utils/validation.d.ts +21 -2
- package/node_modules/@opentelemetry/sdk-logs/build/src/utils/validation.js +115 -4
- package/node_modules/@opentelemetry/sdk-logs/build/src/utils/validation.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-logs/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-logs/package.json +11 -11
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/MeterProvider.d.ts +6 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/MeterProvider.js +4 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/MeterProvider.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/export/MetricReader.d.ts +9 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/export/MetricReader.js +19 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/export/MetricReader.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/export/MetricReaderMetrics.d.ts +12 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/export/MetricReaderMetrics.js +36 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/export/MetricReaderMetrics.js.map +1 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/export/PeriodicExportingMetricReader.js +2 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/export/PeriodicExportingMetricReader.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/semconv.d.ts +82 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/semconv.js +91 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/semconv.js.map +1 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/state/DeltaMetricProcessor.js +0 -3
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/state/DeltaMetricProcessor.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/state/HashMap.js +0 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/state/HashMap.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/state/TemporalMetricProcessor.js +0 -2
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/state/TemporalMetricProcessor.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/MeterProvider.d.ts +6 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/MeterProvider.js +4 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/MeterProvider.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/export/MetricReader.d.ts +9 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/export/MetricReader.js +19 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/export/MetricReader.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/export/MetricReaderMetrics.d.ts +12 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/export/MetricReaderMetrics.js +36 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/export/MetricReaderMetrics.js.map +1 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/export/PeriodicExportingMetricReader.js +2 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/export/PeriodicExportingMetricReader.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/semconv.d.ts +82 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/semconv.js +91 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/semconv.js.map +1 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/state/DeltaMetricProcessor.js +0 -3
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/state/DeltaMetricProcessor.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/state/HashMap.js +0 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/state/HashMap.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/state/TemporalMetricProcessor.js +0 -2
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/state/TemporalMetricProcessor.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/src/MeterProvider.d.ts +6 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/src/MeterProvider.js +4 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/src/MeterProvider.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReader.d.ts +9 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReader.js +19 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReader.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReaderMetrics.d.ts +12 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReaderMetrics.js +40 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/src/export/MetricReaderMetrics.js.map +1 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/src/export/PeriodicExportingMetricReader.js +2 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/src/export/PeriodicExportingMetricReader.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/src/semconv.d.ts +82 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/src/semconv.js +94 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/src/semconv.js.map +1 -0
- package/node_modules/@opentelemetry/sdk-metrics/build/src/state/DeltaMetricProcessor.js +0 -3
- package/node_modules/@opentelemetry/sdk-metrics/build/src/state/DeltaMetricProcessor.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/src/state/HashMap.js +0 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/src/state/HashMap.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/src/state/TemporalMetricProcessor.js +0 -2
- package/node_modules/@opentelemetry/sdk-metrics/build/src/state/TemporalMetricProcessor.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-metrics/package.json +10 -10
- package/node_modules/@opentelemetry/sdk-node/README.md +1 -0
- package/node_modules/@opentelemetry/sdk-node/build/src/index.d.ts +0 -1
- package/node_modules/@opentelemetry/sdk-node/build/src/index.js +1 -3
- package/node_modules/@opentelemetry/sdk-node/build/src/index.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-node/build/src/sdk.js +3 -3
- package/node_modules/@opentelemetry/sdk-node/build/src/sdk.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-node/build/src/start.js +2 -2
- package/node_modules/@opentelemetry/sdk-node/build/src/start.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-node/build/src/utils.d.ts +1 -1
- package/node_modules/@opentelemetry/sdk-node/build/src/utils.js +175 -103
- package/node_modules/@opentelemetry/sdk-node/build/src/utils.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-node/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/sdk-node/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-node/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-node/package.json +30 -29
- package/node_modules/@opentelemetry/sdk-trace-base/build/esm/BasicTracerProvider.d.ts +3 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/esm/BasicTracerProvider.js +10 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/esm/BasicTracerProvider.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/esm/Span.d.ts +3 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/esm/Span.js +23 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/esm/Span.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/esm/Tracer.d.ts +8 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/esm/Tracer.js +10 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/esm/Tracer.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/esm/inspect.d.ts +32 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/esm/inspect.js +53 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/esm/inspect.js.map +1 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/esm/version.d.ts +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/esm/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/esm/version.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/BasicTracerProvider.d.ts +3 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/BasicTracerProvider.js +10 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/BasicTracerProvider.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/Span.d.ts +3 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/Span.js +23 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/Span.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/Tracer.d.ts +8 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/Tracer.js +10 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/Tracer.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/inspect.d.ts +32 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/inspect.js +53 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/inspect.js.map +1 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/version.d.ts +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/esnext/version.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/src/BasicTracerProvider.d.ts +3 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/src/BasicTracerProvider.js +10 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/src/BasicTracerProvider.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/src/Span.d.ts +3 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/src/Span.js +23 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/src/Span.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/src/Tracer.d.ts +8 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/src/Tracer.js +10 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/src/Tracer.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/src/inspect.d.ts +32 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/src/inspect.js +58 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/src/inspect.js.map +1 -0
- package/node_modules/@opentelemetry/sdk-trace-base/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-trace-base/package.json +9 -9
- package/node_modules/@opentelemetry/sdk-trace-node/build/src/version.d.ts +1 -1
- package/node_modules/@opentelemetry/sdk-trace-node/build/src/version.js +1 -1
- package/node_modules/@opentelemetry/sdk-trace-node/build/src/version.js.map +1 -1
- package/node_modules/@opentelemetry/sdk-trace-node/package.json +8 -8
- package/node_modules/@protobufjs/aspromise/LICENSE +26 -0
- package/node_modules/@protobufjs/aspromise/README.md +13 -0
- package/node_modules/{protobufjs/src/util/aspromise.d.ts → @protobufjs/aspromise/index.d.ts} +13 -13
- package/node_modules/{protobufjs/src/util/aspromise.js → @protobufjs/aspromise/index.js} +52 -52
- package/node_modules/@protobufjs/aspromise/package.json +21 -0
- package/node_modules/@protobufjs/aspromise/tests/index.js +130 -0
- package/node_modules/@protobufjs/base64/LICENSE +26 -0
- package/node_modules/@protobufjs/base64/README.md +19 -0
- package/node_modules/{protobufjs/src/util/base64.d.ts → @protobufjs/base64/index.d.ts} +32 -32
- package/node_modules/{protobufjs/src/util/base64.js → @protobufjs/base64/index.js} +139 -146
- package/node_modules/@protobufjs/base64/package.json +21 -0
- package/node_modules/@protobufjs/base64/tests/index.js +46 -0
- package/node_modules/@protobufjs/codegen/LICENSE +26 -0
- package/node_modules/@protobufjs/codegen/README.md +49 -0
- package/node_modules/{protobufjs/src/util/codegen.d.ts → @protobufjs/codegen/index.d.ts} +31 -31
- package/node_modules/{protobufjs/src/util/codegen.js → @protobufjs/codegen/index.js} +112 -113
- package/node_modules/@protobufjs/codegen/package.json +13 -0
- package/node_modules/@protobufjs/codegen/tests/index.js +13 -0
- package/node_modules/@protobufjs/eventemitter/CHANGELOG.md +8 -0
- package/node_modules/@protobufjs/eventemitter/LICENSE +26 -0
- package/node_modules/@protobufjs/eventemitter/README.md +22 -0
- package/node_modules/{protobufjs/src/util/eventemitter.d.ts → @protobufjs/eventemitter/index.d.ts} +45 -45
- package/node_modules/{protobufjs/src/util/eventemitter.js → @protobufjs/eventemitter/index.js} +86 -86
- package/node_modules/@protobufjs/eventemitter/package.json +21 -0
- package/node_modules/@protobufjs/eventemitter/tests/index.js +83 -0
- package/node_modules/@protobufjs/fetch/CHANGELOG.md +8 -0
- package/node_modules/@protobufjs/fetch/LICENSE +26 -0
- package/node_modules/@protobufjs/fetch/README.md +13 -0
- package/node_modules/{protobufjs/src/util/fetch.d.ts → @protobufjs/fetch/index.d.ts} +56 -56
- package/node_modules/{protobufjs/src/util/fetch.js → @protobufjs/fetch/index.js} +112 -112
- package/node_modules/@protobufjs/fetch/package.json +27 -0
- package/node_modules/@protobufjs/fetch/tests/data/file.txt +1 -0
- package/node_modules/@protobufjs/fetch/tests/index.js +158 -0
- package/node_modules/@protobufjs/fetch/util/fs.js +11 -0
- package/node_modules/@protobufjs/float/LICENSE +26 -0
- package/node_modules/@protobufjs/float/README.md +102 -0
- package/node_modules/@protobufjs/float/bench/index.js +87 -0
- package/node_modules/@protobufjs/float/bench/suite.js +46 -0
- package/node_modules/{protobufjs/src/util/float.js → @protobufjs/float/index.js} +335 -335
- package/node_modules/@protobufjs/float/package.json +26 -0
- package/node_modules/@protobufjs/float/tests/index.js +100 -0
- package/node_modules/@protobufjs/inquire/CHANGELOG.md +8 -0
- package/node_modules/@protobufjs/inquire/LICENSE +26 -0
- package/node_modules/@protobufjs/inquire/README.md +13 -0
- package/node_modules/{protobufjs/src/util/inquire.d.ts → @protobufjs/inquire/index.d.ts} +10 -10
- package/node_modules/{protobufjs/src/util/inquire.js → @protobufjs/inquire/index.js} +38 -38
- package/node_modules/@protobufjs/inquire/package.json +21 -0
- package/node_modules/@protobufjs/inquire/tests/data/array.js +1 -0
- package/node_modules/@protobufjs/inquire/tests/data/emptyArray.js +1 -0
- package/node_modules/@protobufjs/inquire/tests/data/emptyObject.js +1 -0
- package/node_modules/@protobufjs/inquire/tests/data/object.js +1 -0
- package/node_modules/@protobufjs/inquire/tests/index.js +20 -0
- package/node_modules/@protobufjs/path/LICENSE +26 -0
- package/node_modules/@protobufjs/path/README.md +19 -0
- package/node_modules/{protobufjs/src/util/path.d.ts → @protobufjs/path/index.d.ts} +22 -22
- package/node_modules/{protobufjs/src/util/path.js → @protobufjs/path/index.js} +65 -72
- package/node_modules/@protobufjs/path/package.json +21 -0
- package/node_modules/@protobufjs/path/tests/index.js +60 -0
- package/node_modules/@protobufjs/pool/.npmignore +3 -0
- package/node_modules/@protobufjs/pool/LICENSE +26 -0
- package/node_modules/@protobufjs/pool/README.md +13 -0
- package/node_modules/{protobufjs/src/util/pool.d.ts → @protobufjs/pool/index.d.ts} +32 -32
- package/node_modules/{protobufjs/src/util/pool.js → @protobufjs/pool/index.js} +48 -48
- package/node_modules/@protobufjs/pool/package.json +21 -0
- package/node_modules/@protobufjs/pool/tests/index.js +33 -0
- package/node_modules/@protobufjs/utf8/LICENSE +26 -0
- package/node_modules/@protobufjs/utf8/README.md +20 -0
- package/node_modules/{protobufjs/src/util/utf8.d.ts → @protobufjs/utf8/index.d.ts} +24 -24
- package/node_modules/{protobufjs/src/util/utf8.js → @protobufjs/utf8/index.js} +104 -130
- package/node_modules/@protobufjs/utf8/package.json +21 -0
- package/node_modules/@protobufjs/utf8/tests/data/surrogate_pair_bug.txt +207 -0
- package/node_modules/@protobufjs/utf8/tests/data/utf8.txt +216 -0
- package/node_modules/@protobufjs/utf8/tests/index.js +74 -0
- package/node_modules/@types/node/LICENSE +21 -0
- package/node_modules/@types/node/README.md +15 -0
- package/node_modules/@types/node/assert/strict.d.ts +59 -0
- package/node_modules/@types/node/assert.d.ts +950 -0
- package/node_modules/@types/node/async_hooks.d.ts +711 -0
- package/node_modules/@types/node/buffer.buffer.d.ts +466 -0
- package/node_modules/@types/node/buffer.d.ts +1765 -0
- package/node_modules/@types/node/child_process.d.ts +1366 -0
- package/node_modules/@types/node/cluster.d.ts +432 -0
- package/node_modules/@types/node/compatibility/iterators.d.ts +21 -0
- package/node_modules/@types/node/console.d.ts +93 -0
- package/node_modules/@types/node/constants.d.ts +14 -0
- package/node_modules/@types/node/crypto.d.ts +4058 -0
- package/node_modules/@types/node/dgram.d.ts +537 -0
- package/node_modules/@types/node/diagnostics_channel.d.ts +552 -0
- package/node_modules/@types/node/dns/promises.d.ts +497 -0
- package/node_modules/@types/node/dns.d.ts +876 -0
- package/node_modules/@types/node/domain.d.ts +150 -0
- package/node_modules/@types/node/events.d.ts +1008 -0
- package/node_modules/@types/node/fs/promises.d.ts +1468 -0
- package/node_modules/@types/node/fs.d.ts +4780 -0
- package/node_modules/@types/node/globals.d.ts +150 -0
- package/node_modules/@types/node/globals.typedarray.d.ts +101 -0
- package/node_modules/@types/node/http.d.ts +2147 -0
- package/node_modules/@types/node/http2.d.ts +2485 -0
- package/node_modules/@types/node/https.d.ts +400 -0
- package/node_modules/@types/node/index.d.ts +117 -0
- package/node_modules/@types/node/inspector/promises.d.ts +35 -0
- package/node_modules/@types/node/inspector.d.ts +264 -0
- package/node_modules/@types/node/inspector.generated.d.ts +4406 -0
- package/node_modules/@types/node/module.d.ts +755 -0
- package/node_modules/@types/node/net.d.ts +970 -0
- package/node_modules/@types/node/os.d.ts +498 -0
- package/node_modules/@types/node/package.json +155 -0
- package/node_modules/@types/node/path/posix.d.ts +8 -0
- package/node_modules/@types/node/path/win32.d.ts +8 -0
- package/node_modules/@types/node/path.d.ts +178 -0
- package/node_modules/@types/node/perf_hooks.d.ts +612 -0
- package/node_modules/@types/node/process.d.ts +2204 -0
- package/node_modules/@types/node/punycode.d.ts +89 -0
- package/node_modules/@types/node/querystring.d.ts +139 -0
- package/node_modules/@types/node/quic.d.ts +897 -0
- package/node_modules/@types/node/readline/promises.d.ts +158 -0
- package/node_modules/@types/node/readline.d.ts +507 -0
- package/node_modules/@types/node/repl.d.ts +420 -0
- package/node_modules/@types/node/sea.d.ts +47 -0
- package/node_modules/@types/node/sqlite.d.ts +1068 -0
- package/node_modules/@types/node/stream/consumers.d.ts +114 -0
- package/node_modules/@types/node/stream/iter.d.ts +301 -0
- package/node_modules/@types/node/stream/promises.d.ts +211 -0
- package/node_modules/@types/node/stream/web.d.ts +300 -0
- package/node_modules/@types/node/stream.d.ts +1774 -0
- package/node_modules/@types/node/string_decoder.d.ts +27 -0
- package/node_modules/@types/node/test/reporters.d.ts +59 -0
- package/node_modules/@types/node/test.d.ts +2279 -0
- package/node_modules/@types/node/timers/promises.d.ts +93 -0
- package/node_modules/@types/node/timers.d.ts +149 -0
- package/node_modules/@types/node/tls.d.ts +1193 -0
- package/node_modules/@types/node/trace_events.d.ts +103 -0
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +462 -0
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +71 -0
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +36 -0
- package/node_modules/@types/node/ts5.6/index.d.ts +119 -0
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +72 -0
- package/node_modules/@types/node/ts5.7/index.d.ts +119 -0
- package/node_modules/@types/node/tty.d.ts +225 -0
- package/node_modules/@types/node/url.d.ts +556 -0
- package/node_modules/@types/node/util/types.d.ts +558 -0
- package/node_modules/@types/node/util.d.ts +1677 -0
- package/node_modules/@types/node/v8.d.ts +980 -0
- package/node_modules/@types/node/vm.d.ts +1136 -0
- package/node_modules/@types/node/wasi.d.ts +131 -0
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +59 -0
- package/node_modules/@types/node/web-globals/blob.d.ts +23 -0
- package/node_modules/@types/node/web-globals/console.d.ts +9 -0
- package/node_modules/@types/node/web-globals/crypto.d.ts +39 -0
- package/node_modules/@types/node/web-globals/domexception.d.ts +68 -0
- package/node_modules/@types/node/web-globals/encoding.d.ts +11 -0
- package/node_modules/@types/node/web-globals/events.d.ts +106 -0
- package/node_modules/@types/node/web-globals/fetch.d.ts +69 -0
- package/node_modules/@types/node/web-globals/importmeta.d.ts +13 -0
- package/node_modules/@types/node/web-globals/messaging.d.ts +23 -0
- package/node_modules/@types/node/web-globals/navigator.d.ts +25 -0
- package/node_modules/@types/node/web-globals/performance.d.ts +45 -0
- package/node_modules/@types/node/web-globals/storage.d.ts +24 -0
- package/node_modules/@types/node/web-globals/streams.d.ts +115 -0
- package/node_modules/@types/node/web-globals/timers.d.ts +44 -0
- package/node_modules/@types/node/web-globals/url.d.ts +24 -0
- package/node_modules/@types/node/worker_threads.d.ts +671 -0
- package/node_modules/@types/node/zlib/iter.d.ts +131 -0
- package/node_modules/@types/node/zlib.d.ts +589 -0
- package/node_modules/protobufjs/README.md +556 -263
- package/node_modules/protobufjs/dist/light/protobuf.js +1569 -1919
- package/node_modules/protobufjs/dist/light/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/light/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.js +906 -1132
- package/node_modules/protobufjs/dist/minimal/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.js +1576 -1993
- package/node_modules/protobufjs/dist/protobuf.js.map +1 -1
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.min.js.map +1 -1
- package/node_modules/protobufjs/ext/descriptor/README.md +70 -3
- package/node_modules/protobufjs/ext/descriptor/index.d.ts +193 -0
- package/node_modules/protobufjs/ext/descriptor/index.js +1185 -1
- package/node_modules/protobufjs/ext/descriptor/test.js +54 -0
- package/node_modules/protobufjs/index.d.ts +720 -834
- package/node_modules/protobufjs/package.json +44 -20
- package/node_modules/protobufjs/src/converter.js +36 -60
- package/node_modules/protobufjs/src/decoder.js +53 -124
- package/node_modules/protobufjs/src/encoder.js +2 -10
- package/node_modules/protobufjs/src/enum.js +3 -8
- package/node_modules/protobufjs/src/field.js +11 -13
- package/node_modules/protobufjs/src/index-light.js +1 -1
- package/node_modules/protobufjs/src/mapfield.js +0 -1
- package/node_modules/protobufjs/src/message.js +11 -5
- package/node_modules/protobufjs/src/method.js +4 -5
- package/node_modules/protobufjs/src/namespace.js +3 -10
- package/node_modules/protobufjs/src/object.js +20 -20
- package/node_modules/protobufjs/src/oneof.js +0 -3
- package/node_modules/protobufjs/src/parse.js +16 -78
- package/node_modules/protobufjs/src/reader.js +31 -136
- package/node_modules/protobufjs/src/reader_buffer.js +3 -24
- package/node_modules/protobufjs/src/root.js +3 -7
- package/node_modules/protobufjs/src/roots.js +1 -1
- package/node_modules/protobufjs/src/service.js +6 -13
- package/node_modules/protobufjs/src/tokenize.js +1 -6
- package/node_modules/protobufjs/src/type.js +30 -44
- package/node_modules/protobufjs/src/typescript.jsdoc +15 -0
- package/node_modules/protobufjs/src/util/minimal.js +12 -36
- package/node_modules/protobufjs/src/util.js +17 -6
- package/node_modules/protobufjs/src/verifier.js +6 -6
- package/node_modules/protobufjs/src/wrappers.js +1 -0
- package/node_modules/protobufjs/src/writer.js +16 -42
- package/node_modules/protobufjs/src/writer_buffer.js +1 -18
- package/node_modules/protobufjs/tsconfig.json +5 -3
- package/node_modules/undici-types/LICENSE +21 -0
- package/node_modules/undici-types/README.md +6 -0
- package/node_modules/undici-types/agent.d.ts +32 -0
- package/node_modules/undici-types/api.d.ts +43 -0
- package/node_modules/undici-types/balanced-pool.d.ts +30 -0
- package/node_modules/undici-types/cache-interceptor.d.ts +179 -0
- package/node_modules/undici-types/cache.d.ts +36 -0
- package/node_modules/undici-types/client-stats.d.ts +15 -0
- package/node_modules/undici-types/client.d.ts +123 -0
- package/node_modules/undici-types/connector.d.ts +36 -0
- package/node_modules/undici-types/content-type.d.ts +21 -0
- package/node_modules/undici-types/cookies.d.ts +30 -0
- package/node_modules/undici-types/diagnostics-channel.d.ts +74 -0
- package/node_modules/undici-types/dispatcher.d.ts +279 -0
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +22 -0
- package/node_modules/undici-types/errors.d.ts +177 -0
- package/node_modules/undici-types/eventsource.d.ts +66 -0
- package/node_modules/undici-types/fetch.d.ts +211 -0
- package/node_modules/undici-types/formdata.d.ts +108 -0
- package/node_modules/undici-types/global-dispatcher.d.ts +9 -0
- package/node_modules/undici-types/global-origin.d.ts +7 -0
- package/node_modules/undici-types/h2c-client.d.ts +73 -0
- package/node_modules/undici-types/handlers.d.ts +15 -0
- package/node_modules/undici-types/header.d.ts +160 -0
- package/node_modules/undici-types/index.d.ts +91 -0
- package/node_modules/undici-types/interceptors.d.ts +80 -0
- package/node_modules/undici-types/mock-agent.d.ts +68 -0
- package/node_modules/undici-types/mock-call-history.d.ts +111 -0
- package/node_modules/undici-types/mock-client.d.ts +27 -0
- package/node_modules/undici-types/mock-errors.d.ts +12 -0
- package/node_modules/undici-types/mock-interceptor.d.ts +94 -0
- package/node_modules/undici-types/mock-pool.d.ts +27 -0
- package/node_modules/undici-types/package.json +55 -0
- package/node_modules/undici-types/patch.d.ts +29 -0
- package/node_modules/undici-types/pool-stats.d.ts +19 -0
- package/node_modules/undici-types/pool.d.ts +41 -0
- package/node_modules/undici-types/proxy-agent.d.ts +29 -0
- package/node_modules/undici-types/readable.d.ts +68 -0
- package/node_modules/undici-types/retry-agent.d.ts +8 -0
- package/node_modules/undici-types/retry-handler.d.ts +125 -0
- package/node_modules/undici-types/round-robin-pool.d.ts +41 -0
- package/node_modules/undici-types/snapshot-agent.d.ts +109 -0
- package/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
- package/node_modules/undici-types/util.d.ts +18 -0
- package/node_modules/undici-types/utility.d.ts +7 -0
- package/node_modules/undici-types/webidl.d.ts +347 -0
- package/node_modules/undici-types/websocket.d.ts +188 -0
- package/npm-shrinkwrap.json +294 -204
- package/package.json +13 -13
- package/node_modules/protobufjs/ext/README.md +0 -81
- package/node_modules/protobufjs/ext/descriptor.d.ts +0 -86
- package/node_modules/protobufjs/ext/descriptor.generated.d.ts +0 -409
- package/node_modules/protobufjs/ext/descriptor.js +0 -1266
- package/node_modules/protobufjs/ext/textformat.d.ts +0 -19
- package/node_modules/protobufjs/ext/textformat.generated.d.ts +0 -11
- package/node_modules/protobufjs/ext/textformat.js +0 -1235
- package/node_modules/protobufjs/google/protobuf/compiler/plugin.json +0 -126
- package/node_modules/protobufjs/google/protobuf/compiler/plugin.proto +0 -47
- package/node_modules/protobufjs/src/typescript.js +0 -25
- /package/node_modules/{protobufjs/src/util/float.d.ts → @protobufjs/float/index.d.ts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MetricReader.js","sourceRoot":"","sources":["../../../src/export/MetricReader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,GAAG,MAAM,oBAAoB,CA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BACR,YAAY;aACb;YACD,MAAM;SACP,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAAyB;QACtC,4DAA4D;QAC5D,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;YAC9C,OAAO;SACR;QAED,oDAAoD;QACpD,IAAI,OAAO,EAAE,aAAa,IAAI,IAAI,EAAE;YAClC,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;SACzB;aAAM;YACL,MAAM,eAAe,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;SACjE;QAED,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,OAA2B;QAC1C,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,qDAAqD,CAAC,CAAC;YACrE,OAAO;SACR;QAED,oDAAoD;QACpD,IAAI,OAAO,EAAE,aAAa,IAAI,IAAI,EAAE;YAClC,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC;YAC1B,OAAO;SACR;QAED,MAAM,eAAe,CAAC,IAAI,CAAC,YAAY,EAAE,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IACpE,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport * as api from '@opentelemetry/api';\nimport type { AggregationTemporality } from './AggregationTemporality';\nimport type { MetricProducer } from './MetricProducer';\nimport type { CollectionResult, InstrumentType } from './MetricData';\nimport { callWithTimeout } from '../utils';\nimport type {\n CollectionOptions,\n ForceFlushOptions,\n ShutdownOptions,\n} from '../types';\nimport type {\n AggregationSelector,\n AggregationTemporalitySelector,\n} from './AggregationSelector';\nimport {\n DEFAULT_AGGREGATION_SELECTOR,\n DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR,\n} from './AggregationSelector';\nimport type { AggregationOption } from '../view/AggregationOption';\nimport type { CardinalitySelector } from './CardinalitySelector';\n\nexport interface MetricReaderOptions {\n /**\n * Aggregation selector based on metric instrument types. If no views are\n * configured for a metric instrument, a per-metric-reader aggregation is\n * selected with this selector.\n *\n * <p> NOTE: the provided function MUST be pure\n */\n aggregationSelector?: AggregationSelector;\n /**\n * Aggregation temporality selector based on metric instrument types. If\n * not configured, cumulative is used for all instruments.\n *\n * <p> NOTE: the provided function MUST be pure\n */\n aggregationTemporalitySelector?: AggregationTemporalitySelector;\n /**\n * Cardinality selector based on metric instrument types. If not configured,\n * a default value is used.\n *\n * <p> NOTE: the provided function MUST be pure\n */\n cardinalitySelector?: CardinalitySelector;\n /**\n * **Note, this option is experimental**. Additional MetricProducers to use as a source of\n * aggregated metric data in addition to the SDK's metric data. The resource returned by\n * these MetricProducers is ignored; the SDK's resource will be used instead.\n * @experimental\n */\n metricProducers?: MetricProducer[];\n}\n\n/**\n * Reads metrics from the SDK. Implementations MUST follow the Metric Reader Specification as well as the requirements\n * listed in this interface. Consider extending {@link MetricReader} to get a specification-compliant base implementation\n * of this interface\n */\nexport interface IMetricReader {\n /**\n * Set the {@link MetricProducer} used by this instance. **This should only be called once by the\n * SDK and should be considered internal.**\n *\n * <p> NOTE: implementations MUST throw when called more than once\n *\n * @param metricProducer\n */\n setMetricProducer(metricProducer: MetricProducer): void;\n\n /**\n * Select the {@link AggregationOption} for the given {@link InstrumentType} for this\n * reader.\n *\n * <p> NOTE: implementations MUST be pure\n */\n selectAggregation(instrumentType: InstrumentType): AggregationOption;\n\n /**\n * Select the {@link AggregationTemporality} for the given\n * {@link InstrumentType} for this reader.\n *\n * <p> NOTE: implementations MUST be pure\n */\n selectAggregationTemporality(\n instrumentType: InstrumentType\n ): AggregationTemporality;\n\n /**\n * Select the cardinality limit for the given {@link InstrumentType} for this\n * reader.\n *\n * <p> NOTE: implementations MUST be pure\n */\n selectCardinalityLimit(instrumentType: InstrumentType): number;\n\n /**\n * Collect all metrics from the associated {@link MetricProducer}\n */\n collect(options?: CollectionOptions): Promise<CollectionResult>;\n\n /**\n * Shuts down the metric reader, the promise will reject after the optional timeout or resolve after completion.\n *\n * <p> NOTE: this operation MAY continue even after the promise rejects due to a timeout.\n * @param options options with timeout.\n */\n shutdown(options?: ShutdownOptions): Promise<void>;\n\n /**\n * Flushes metrics read by this reader, the promise will reject after the optional timeout or resolve after completion.\n *\n * <p> NOTE: this operation MAY continue even after the promise rejects due to a timeout.\n * @param options options with timeout.\n */\n forceFlush(options?: ForceFlushOptions): Promise<void>;\n}\n\n/**\n * A registered reader of metrics that, when linked to a {@link MetricProducer}, offers global\n * control over metrics.\n */\nexport abstract class MetricReader implements IMetricReader {\n // Tracks the shutdown state.\n // TODO: use BindOncePromise here once a new version of @opentelemetry/core is available.\n private _shutdown = false;\n // Additional MetricProducers which will be combined with the SDK's output\n private _metricProducers: MetricProducer[];\n // MetricProducer used by this instance which produces metrics from the SDK\n private _sdkMetricProducer?: MetricProducer;\n private readonly _aggregationTemporalitySelector: AggregationTemporalitySelector;\n private readonly _aggregationSelector: AggregationSelector;\n private readonly _cardinalitySelector?: CardinalitySelector;\n\n constructor(options?: MetricReaderOptions) {\n this._aggregationSelector =\n options?.aggregationSelector ?? DEFAULT_AGGREGATION_SELECTOR;\n this._aggregationTemporalitySelector =\n options?.aggregationTemporalitySelector ??\n DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR;\n this._metricProducers = options?.metricProducers ?? [];\n this._cardinalitySelector = options?.cardinalitySelector;\n }\n\n setMetricProducer(metricProducer: MetricProducer) {\n if (this._sdkMetricProducer) {\n // This check ensures the following requirement from the spec\n // (https://opentelemetry.io/docs/specs/otel/metrics/sdk/#metricreader):\n // > The SDK MUST NOT allow a `MetricReader` instance to be registered\n // > on more than one `MeterProvider` instance.\n //\n // So while the argument is a `MetricProducer`, the relevant user-level\n // error message is about the **MeterProvider**.\n throw new Error(\n 'MetricReader can not be bound to a MeterProvider again.'\n );\n }\n this._sdkMetricProducer = metricProducer;\n this.onInitialized();\n }\n\n selectAggregation(instrumentType: InstrumentType): AggregationOption {\n return this._aggregationSelector(instrumentType);\n }\n\n selectAggregationTemporality(\n instrumentType: InstrumentType\n ): AggregationTemporality {\n return this._aggregationTemporalitySelector(instrumentType);\n }\n\n selectCardinalityLimit(instrumentType: InstrumentType): number {\n return this._cardinalitySelector\n ? this._cardinalitySelector(instrumentType)\n : 2000; // default value if no selector is provided\n }\n\n /**\n * Handle once the SDK has initialized this {@link MetricReader}\n * Overriding this method is optional.\n */\n protected onInitialized(): void {\n // Default implementation is empty.\n }\n\n /**\n * Handle a shutdown signal by the SDK.\n *\n * <p> For push exporters, this should shut down any intervals and close any open connections.\n * @protected\n */\n protected abstract onShutdown(): Promise<void>;\n\n /**\n * Handle a force flush signal by the SDK.\n *\n * <p> In all scenarios metrics should be collected via {@link collect()}.\n * <p> For push exporters, this should collect and report metrics.\n * @protected\n */\n protected abstract onForceFlush(): Promise<void>;\n\n async collect(options?: CollectionOptions): Promise<CollectionResult> {\n if (this._sdkMetricProducer === undefined) {\n throw new Error('MetricReader is not bound to a MetricProducer');\n }\n\n // Subsequent invocations to collect are not allowed. SDKs SHOULD return some failure for these calls.\n if (this._shutdown) {\n throw new Error('MetricReader is shutdown');\n }\n\n const [sdkCollectionResults, ...additionalCollectionResults] =\n await Promise.all([\n this._sdkMetricProducer.collect({\n timeoutMillis: options?.timeoutMillis,\n }),\n ...this._metricProducers.map(producer =>\n producer.collect({\n timeoutMillis: options?.timeoutMillis,\n })\n ),\n ]);\n\n // Merge the results, keeping the SDK's Resource\n const errors = sdkCollectionResults.errors.concat(\n additionalCollectionResults.flatMap(result => result.errors)\n );\n const resource = sdkCollectionResults.resourceMetrics.resource;\n const scopeMetrics =\n sdkCollectionResults.resourceMetrics.scopeMetrics.concat(\n additionalCollectionResults.flatMap(\n result => result.resourceMetrics.scopeMetrics\n )\n );\n return {\n resourceMetrics: {\n resource,\n scopeMetrics,\n },\n errors,\n };\n }\n\n async shutdown(options?: ShutdownOptions): Promise<void> {\n // Do not call shutdown again if it has already been called.\n if (this._shutdown) {\n api.diag.error('Cannot call shutdown twice.');\n return;\n }\n\n // No timeout if timeoutMillis is undefined or null.\n if (options?.timeoutMillis == null) {\n await this.onShutdown();\n } else {\n await callWithTimeout(this.onShutdown(), options.timeoutMillis);\n }\n\n this._shutdown = true;\n }\n\n async forceFlush(options?: ForceFlushOptions): Promise<void> {\n if (this._shutdown) {\n api.diag.warn('Cannot forceFlush on already shutdown MetricReader.');\n return;\n }\n\n // No timeout if timeoutMillis is undefined or null.\n if (options?.timeoutMillis == null) {\n await this.onForceFlush();\n return;\n }\n\n await callWithTimeout(this.onForceFlush(), options.timeoutMillis);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"MetricReader.js","sourceRoot":"","sources":["../../../src/export/MetricReader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAI1C,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAU3C,OAAO,EACL,4BAA4B,EAC5B,wCAAwC,GACzC,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAuG9E;;;GAGG;AACH,MAAM,OAAgB,YAAY;IAChC,6BAA6B;IAC7B,yFAAyF;IACjF,SAAS,GAAG,KAAK,CAAC;IAC1B,0EAA0E;IAClE,gBAAgB,CAAmB;IAC3C,2EAA2E;IACnE,kBAAkB,CAAkB;IAC5C,wCAAwC;IAChC,eAAe,CAAsB;IAC5B,+BAA+B,CAAiC;IAChE,oBAAoB,CAAsB;IAC1C,oBAAoB,CAAuB;IAC3C,kBAAkB,CAAS;IAE5C,Y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AAC,aAAa,CAAC,CAAC;IACpE,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport * as api from '@opentelemetry/api';\nimport type { AggregationTemporality } from './AggregationTemporality';\nimport type { MetricProducer } from './MetricProducer';\nimport type { CollectionResult, InstrumentType } from './MetricData';\nimport { callWithTimeout } from '../utils';\nimport type {\n CollectionOptions,\n ForceFlushOptions,\n ShutdownOptions,\n} from '../types';\nimport type {\n AggregationSelector,\n AggregationTemporalitySelector,\n} from './AggregationSelector';\nimport {\n DEFAULT_AGGREGATION_SELECTOR,\n DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR,\n} from './AggregationSelector';\nimport type { AggregationOption } from '../view/AggregationOption';\nimport type { CardinalitySelector } from './CardinalitySelector';\nimport { MetricReaderMetrics } from './MetricReaderMetrics';\nimport { VERSION } from '../version';\nimport { hrTime, hrTimeDuration, hrTimeToSeconds } from '@opentelemetry/core';\n\nexport interface MetricReaderOptions {\n /**\n * Aggregation selector based on metric instrument types. If no views are\n * configured for a metric instrument, a per-metric-reader aggregation is\n * selected with this selector.\n *\n * <p> NOTE: the provided function MUST be pure\n */\n aggregationSelector?: AggregationSelector;\n /**\n * Aggregation temporality selector based on metric instrument types. If\n * not configured, cumulative is used for all instruments.\n *\n * <p> NOTE: the provided function MUST be pure\n */\n aggregationTemporalitySelector?: AggregationTemporalitySelector;\n /**\n * Cardinality selector based on metric instrument types. If not configured,\n * a default value is used.\n *\n * <p> NOTE: the provided function MUST be pure\n */\n cardinalitySelector?: CardinalitySelector;\n /**\n * **Note, this option is experimental**. Additional MetricProducers to use as a source of\n * aggregated metric data in addition to the SDK's metric data. The resource returned by\n * these MetricProducers is ignored; the SDK's resource will be used instead.\n * @experimental\n */\n metricProducers?: MetricProducer[];\n /**\n * The component type used for reporting self-observability SDK metrics.\n * @experimental This option is experimental and is subject to breaking changes in minor releases.\n */\n otelComponentType?: string;\n}\n\n/**\n * Reads metrics from the SDK. Implementations MUST follow the Metric Reader Specification as well as the requirements\n * listed in this interface. Consider extending {@link MetricReader} to get a specification-compliant base implementation\n * of this interface\n */\nexport interface IMetricReader {\n /**\n * Set the {@link MetricProducer} used by this instance. **This should only be called once by the\n * SDK and should be considered internal.**\n *\n * <p> NOTE: implementations MUST throw when called more than once\n *\n * @param metricProducer\n */\n setMetricProducer(metricProducer: MetricProducer): void;\n\n /**\n * Select the {@link AggregationOption} for the given {@link InstrumentType} for this\n * reader.\n *\n * <p> NOTE: implementations MUST be pure\n */\n selectAggregation(instrumentType: InstrumentType): AggregationOption;\n\n /**\n * Select the {@link AggregationTemporality} for the given\n * {@link InstrumentType} for this reader.\n *\n * <p> NOTE: implementations MUST be pure\n */\n selectAggregationTemporality(\n instrumentType: InstrumentType\n ): AggregationTemporality;\n\n /**\n * Select the cardinality limit for the given {@link InstrumentType} for this\n * reader.\n *\n * <p> NOTE: implementations MUST be pure\n */\n selectCardinalityLimit(instrumentType: InstrumentType): number;\n\n /**\n * Collect all metrics from the associated {@link MetricProducer}\n */\n collect(options?: CollectionOptions): Promise<CollectionResult>;\n\n /**\n * Shuts down the metric reader, the promise will reject after the optional timeout or resolve after completion.\n *\n * <p> NOTE: this operation MAY continue even after the promise rejects due to a timeout.\n * @param options options with timeout.\n */\n shutdown(options?: ShutdownOptions): Promise<void>;\n\n /**\n * Flushes metrics read by this reader, the promise will reject after the optional timeout or resolve after completion.\n *\n * <p> NOTE: this operation MAY continue even after the promise rejects due to a timeout.\n * @param options options with timeout.\n */\n forceFlush(options?: ForceFlushOptions): Promise<void>;\n}\n\n/**\n * A registered reader of metrics that, when linked to a {@link MetricProducer}, offers global\n * control over metrics.\n */\nexport abstract class MetricReader implements IMetricReader {\n // Tracks the shutdown state.\n // TODO: use BindOncePromise here once a new version of @opentelemetry/core is available.\n private _shutdown = false;\n // Additional MetricProducers which will be combined with the SDK's output\n private _metricProducers: MetricProducer[];\n // MetricProducer used by this instance which produces metrics from the SDK\n private _sdkMetricProducer?: MetricProducer;\n // Metrics about the MetricReader itself\n private _selfObsMetrics: MetricReaderMetrics;\n private readonly _aggregationTemporalitySelector: AggregationTemporalitySelector;\n private readonly _aggregationSelector: AggregationSelector;\n private readonly _cardinalitySelector?: CardinalitySelector;\n private readonly _otelComponentType: string;\n\n constructor(options?: MetricReaderOptions) {\n this._aggregationSelector =\n options?.aggregationSelector ?? DEFAULT_AGGREGATION_SELECTOR;\n this._aggregationTemporalitySelector =\n options?.aggregationTemporalitySelector ??\n DEFAULT_AGGREGATION_TEMPORALITY_SELECTOR;\n this._metricProducers = options?.metricProducers ?? [];\n this._cardinalitySelector = options?.cardinalitySelector;\n this._otelComponentType =\n options?.otelComponentType ?? this.constructor.name;\n this._selfObsMetrics = new MetricReaderMetrics(\n this._otelComponentType,\n api.createNoopMeter()\n );\n }\n\n setMetricProducer(metricProducer: MetricProducer) {\n if (this._sdkMetricProducer) {\n // This check ensures the following requirement from the spec\n // (https://opentelemetry.io/docs/specs/otel/metrics/sdk/#metricreader):\n // > The SDK MUST NOT allow a `MetricReader` instance to be registered\n // > on more than one `MeterProvider` instance.\n //\n // So while the argument is a `MetricProducer`, the relevant user-level\n // error message is about the **MeterProvider**.\n throw new Error(\n 'MetricReader can not be bound to a MeterProvider again.'\n );\n }\n this._sdkMetricProducer = metricProducer;\n this.onInitialized();\n }\n\n _setSelfObsMeterProvider(meterProvider: api.MeterProvider): void {\n const meter = meterProvider.getMeter('@opentelemetry/sdk-metrics', VERSION);\n this._selfObsMetrics = new MetricReaderMetrics(\n this._otelComponentType,\n meter\n );\n }\n\n selectAggregation(instrumentType: InstrumentType): AggregationOption {\n return this._aggregationSelector(instrumentType);\n }\n\n selectAggregationTemporality(\n instrumentType: InstrumentType\n ): AggregationTemporality {\n return this._aggregationTemporalitySelector(instrumentType);\n }\n\n selectCardinalityLimit(instrumentType: InstrumentType): number {\n return this._cardinalitySelector\n ? this._cardinalitySelector(instrumentType)\n : 2000; // default value if no selector is provided\n }\n\n /**\n * Handle once the SDK has initialized this {@link MetricReader}\n * Overriding this method is optional.\n */\n protected onInitialized(): void {\n // Default implementation is empty.\n }\n\n /**\n * Handle a shutdown signal by the SDK.\n *\n * <p> For push exporters, this should shut down any intervals and close any open connections.\n * @protected\n */\n protected abstract onShutdown(): Promise<void>;\n\n /**\n * Handle a force flush signal by the SDK.\n *\n * <p> In all scenarios metrics should be collected via {@link collect()}.\n * <p> For push exporters, this should collect and report metrics.\n * @protected\n */\n protected abstract onForceFlush(): Promise<void>;\n\n async collect(options?: CollectionOptions): Promise<CollectionResult> {\n if (this._sdkMetricProducer === undefined) {\n throw new Error('MetricReader is not bound to a MetricProducer');\n }\n\n // Subsequent invocations to collect are not allowed. SDKs SHOULD return some failure for these calls.\n if (this._shutdown) {\n throw new Error('MetricReader is shutdown');\n }\n\n const startTime = hrTime();\n const [sdkCollectionResults, ...additionalCollectionResults] =\n await Promise.all([\n this._sdkMetricProducer.collect({\n timeoutMillis: options?.timeoutMillis,\n }),\n ...this._metricProducers.map(producer =>\n producer.collect({\n timeoutMillis: options?.timeoutMillis,\n })\n ),\n ]);\n const endTime = hrTime();\n\n // Merge the results, keeping the SDK's Resource\n const errors = sdkCollectionResults.errors.concat(\n additionalCollectionResults.flatMap(result => result.errors)\n );\n\n const collectDuration = hrTimeToSeconds(hrTimeDuration(startTime, endTime));\n this._selfObsMetrics.recordCollection(\n collectDuration,\n errors.length > 0\n ? ((errors[0] as Error).name ?? 'collect_error')\n : undefined\n );\n\n const resource = sdkCollectionResults.resourceMetrics.resource;\n const scopeMetrics =\n sdkCollectionResults.resourceMetrics.scopeMetrics.concat(\n additionalCollectionResults.flatMap(\n result => result.resourceMetrics.scopeMetrics\n )\n );\n return {\n resourceMetrics: {\n resource,\n scopeMetrics,\n },\n errors,\n };\n }\n\n async shutdown(options?: ShutdownOptions): Promise<void> {\n // Do not call shutdown again if it has already been called.\n if (this._shutdown) {\n api.diag.error('Cannot call shutdown twice.');\n return;\n }\n\n // No timeout if timeoutMillis is undefined or null.\n if (options?.timeoutMillis == null) {\n await this.onShutdown();\n } else {\n await callWithTimeout(this.onShutdown(), options.timeoutMillis);\n }\n\n this._shutdown = true;\n }\n\n async forceFlush(options?: ForceFlushOptions): Promise<void> {\n if (this._shutdown) {\n api.diag.warn('Cannot forceFlush on already shutdown MetricReader.');\n return;\n }\n\n // No timeout if timeoutMillis is undefined or null.\n if (options?.timeoutMillis == null) {\n await this.onForceFlush();\n return;\n }\n\n await callWithTimeout(this.onForceFlush(), options.timeoutMillis);\n }\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Meter } from '@opentelemetry/api';
|
|
2
|
+
/**
|
|
3
|
+
* Generates `otel.sdk.metric_reader.*` self-observability metrics.
|
|
4
|
+
* https://opentelemetry.io/docs/specs/semconv/otel/sdk-metrics/#metric-otelsdkmetric_readercollectionduration
|
|
5
|
+
*/
|
|
6
|
+
export declare class MetricReaderMetrics {
|
|
7
|
+
private readonly collectionDuration;
|
|
8
|
+
private readonly standardAttrs;
|
|
9
|
+
constructor(componentType: string, meter: Meter);
|
|
10
|
+
recordCollection(durationSecs: number, error: string | undefined): void;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=MetricReaderMetrics.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright The OpenTelemetry Authors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
import { ATTR_ERROR_TYPE, ATTR_OTEL_COMPONENT_NAME, ATTR_OTEL_COMPONENT_TYPE, METRIC_OTEL_SDK_METRIC_READER_COLLECTION_DURATION, } from '../semconv';
|
|
6
|
+
const componentCounter = new Map();
|
|
7
|
+
/**
|
|
8
|
+
* Generates `otel.sdk.metric_reader.*` self-observability metrics.
|
|
9
|
+
* https://opentelemetry.io/docs/specs/semconv/otel/sdk-metrics/#metric-otelsdkmetric_readercollectionduration
|
|
10
|
+
*/
|
|
11
|
+
export class MetricReaderMetrics {
|
|
12
|
+
collectionDuration;
|
|
13
|
+
standardAttrs;
|
|
14
|
+
constructor(componentType, meter) {
|
|
15
|
+
const counter = componentCounter.get(componentType) ?? 0;
|
|
16
|
+
componentCounter.set(componentType, counter + 1);
|
|
17
|
+
this.standardAttrs = {
|
|
18
|
+
[ATTR_OTEL_COMPONENT_TYPE]: componentType,
|
|
19
|
+
[ATTR_OTEL_COMPONENT_NAME]: `${componentType}/${counter}`,
|
|
20
|
+
};
|
|
21
|
+
this.collectionDuration = meter.createHistogram(METRIC_OTEL_SDK_METRIC_READER_COLLECTION_DURATION, {
|
|
22
|
+
unit: 's',
|
|
23
|
+
description: 'The duration of the collect operation of the metric reader.',
|
|
24
|
+
advice: {
|
|
25
|
+
explicitBucketBoundaries: [],
|
|
26
|
+
},
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
recordCollection(durationSecs, error) {
|
|
30
|
+
const attrs = error
|
|
31
|
+
? { ...this.standardAttrs, [ATTR_ERROR_TYPE]: error }
|
|
32
|
+
: this.standardAttrs;
|
|
33
|
+
this.collectionDuration.record(durationSecs, attrs);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=MetricReaderMetrics.js.map
|
package/node_modules/@opentelemetry/sdk-metrics/build/esnext/export/MetricReaderMetrics.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MetricReaderMetrics.js","sourceRoot":"","sources":["../../../src/export/MetricReaderMetrics.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EACL,eAAe,EACf,wBAAwB,EACxB,wBAAwB,EACxB,iDAAiD,GAClD,MAAM,YAAY,CAAC;AAEpB,MAAM,gBAAgB,GAAG,IAAI,GAAG,EAAkB,CAAC;AAEnD;;;GAGG;AACH,MAAM,OAAO,mBAAmB;IACb,kBAAkB,CAAY;IAC9B,aAAa,CAAa;IAE3C,YAAY,aAAqB,EAAE,KAAY;QAC7C,MAAM,OAAO,GAAG,gBAAgB,CAAC,GAAG,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QACzD,gBAAgB,CAAC,GAAG,CAAC,aAAa,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC;QAEjD,IAAI,CAAC,aAAa,GAAG;YACnB,CAAC,wBAAwB,CAAC,EAAE,aAAa;YACzC,CAAC,wBAAwB,CAAC,EAAE,GAAG,aAAa,IAAI,OAAO,EAAE;SAC1D,CAAC;QAEF,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC,eAAe,CAC7C,iDAAiD,EACjD;YACE,IAAI,EAAE,GAAG;YACT,WAAW,EACT,6DAA6D;YAC/D,MAAM,EAAE;gBACN,wBAAwB,EAAE,EAAE;aAC7B;SACF,CACF,CAAC;IACJ,CAAC;IAED,gBAAgB,CAAC,YAAoB,EAAE,KAAyB;QAC9D,MAAM,KAAK,GAAG,KAAK;YACjB,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC,eAAe,CAAC,EAAE,KAAK,EAAE;YACrD,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC;QACvB,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;IACtD,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Attributes, Histogram, Meter } from '@opentelemetry/api';\nimport {\n ATTR_ERROR_TYPE,\n ATTR_OTEL_COMPONENT_NAME,\n ATTR_OTEL_COMPONENT_TYPE,\n METRIC_OTEL_SDK_METRIC_READER_COLLECTION_DURATION,\n} from '../semconv';\n\nconst componentCounter = new Map<string, number>();\n\n/**\n * Generates `otel.sdk.metric_reader.*` self-observability metrics.\n * https://opentelemetry.io/docs/specs/semconv/otel/sdk-metrics/#metric-otelsdkmetric_readercollectionduration\n */\nexport class MetricReaderMetrics {\n private readonly collectionDuration: Histogram;\n private readonly standardAttrs: Attributes;\n\n constructor(componentType: string, meter: Meter) {\n const counter = componentCounter.get(componentType) ?? 0;\n componentCounter.set(componentType, counter + 1);\n\n this.standardAttrs = {\n [ATTR_OTEL_COMPONENT_TYPE]: componentType,\n [ATTR_OTEL_COMPONENT_NAME]: `${componentType}/${counter}`,\n };\n\n this.collectionDuration = meter.createHistogram(\n METRIC_OTEL_SDK_METRIC_READER_COLLECTION_DURATION,\n {\n unit: 's',\n description:\n 'The duration of the collect operation of the metric reader.',\n advice: {\n explicitBucketBoundaries: [],\n },\n }\n );\n }\n\n recordCollection(durationSecs: number, error: string | undefined) {\n const attrs = error\n ? { ...this.standardAttrs, [ATTR_ERROR_TYPE]: error }\n : this.standardAttrs;\n this.collectionDuration.record(durationSecs, attrs);\n }\n}\n"]}
|
package/node_modules/@opentelemetry/sdk-metrics/build/esnext/export/PeriodicExportingMetricReader.js
CHANGED
|
@@ -7,6 +7,7 @@ import { internal, ExportResultCode, globalErrorHandler, } from '@opentelemetry/
|
|
|
7
7
|
import { MetricReader } from './MetricReader';
|
|
8
8
|
import { callWithTimeout, TimeoutError } from '../utils';
|
|
9
9
|
import { InstrumentType } from './MetricData';
|
|
10
|
+
import { OTEL_COMPONENT_TYPE_VALUE_PERIODIC_METRIC_READER } from '../semconv';
|
|
10
11
|
/**
|
|
11
12
|
* {@link MetricReader} which collects metrics based on a user-configurable time interval, and passes the metrics to
|
|
12
13
|
* the configured {@link PushMetricExporter}
|
|
@@ -22,6 +23,7 @@ export class PeriodicExportingMetricReader extends MetricReader {
|
|
|
22
23
|
super({
|
|
23
24
|
aggregationSelector: exporter.selectAggregation?.bind(exporter),
|
|
24
25
|
aggregationTemporalitySelector: exporter.selectAggregationTemporality?.bind(exporter),
|
|
26
|
+
otelComponentType: OTEL_COMPONENT_TYPE_VALUE_PERIODIC_METRIC_READER,
|
|
25
27
|
metricProducers,
|
|
26
28
|
cardinalitySelector: (instrumentType) => {
|
|
27
29
|
const limits = {
|
|
@@ -1 +1 @@
|
|
|
1
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CAAC;IAEkB,aAAa;QAC9B,iGAAiG;QACjG,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE;YAChC,wGAAwG;YACxG,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAC;QACvB,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAEzB,iEAAiE;QACjE,IAAI,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ,EAAE;YACtC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;SACxB;IACH,CAAC;IAES,KAAK,CAAC,YAAY;QAC1B,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;QACtB,MAAM,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;IACpC,CAAC;IAES,KAAK,CAAC,UAAU;QACxB,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC/B;QACD,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC;QAC1B,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;IAClC,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport * as api from '@opentelemetry/api';\nimport {\n internal,\n ExportResultCode,\n globalErrorHandler,\n} from '@opentelemetry/core';\nimport { MetricReader } from './MetricReader';\nimport type { PushMetricExporter } from './MetricExporter';\nimport { callWithTimeout, TimeoutError } from '../utils';\nimport type { MetricProducer } from './MetricProducer';\nimport { InstrumentType } from './MetricData';\n\nexport type PeriodicExportingMetricReaderOptions = {\n /**\n * The backing exporter for the metric reader.\n */\n exporter: PushMetricExporter;\n /**\n * An internal milliseconds for the metric reader to initiate metric\n * collection.\n */\n exportIntervalMillis?: number;\n /**\n * Milliseconds for the async observable callback to timeout.\n */\n exportTimeoutMillis?: number;\n /**\n * **Note, this option is experimental**. Additional MetricProducers to use as a source of\n * aggregated metric data in addition to the SDK's metric data. The resource returned by\n * these MetricProducers is ignored; the SDK's resource will be used instead.\n * @experimental\n */\n metricProducers?: MetricProducer[];\n /**\n * Cardinality limits for the metric reader, applied per instrument. If not configured, defaults to 2000 time series per instrument. These are wrapped in a cardinalitySelector function that returns limits based on the instrument type, so they can be configured differently per type if desired.\n *\n */\n cardinalityLimits?: {\n counter?: number;\n gauge?: number;\n histogram?: number;\n upDownCounter?: number;\n observableCounter?: number;\n observableGauge?: number;\n observableUpDownCounter?: number;\n default?: number;\n };\n};\n\n/**\n * {@link MetricReader} which collects metrics based on a user-configurable time interval, and passes the metrics to\n * the configured {@link PushMetricExporter}\n */\nexport class PeriodicExportingMetricReader extends MetricReader {\n private _interval?: ReturnType<typeof setInterval>;\n private _exporter: PushMetricExporter;\n private readonly _exportInterval: number;\n private readonly _exportTimeout: number;\n\n constructor(options: PeriodicExportingMetricReaderOptions) {\n const {\n exporter,\n exportIntervalMillis = 60000,\n metricProducers,\n cardinalityLimits,\n } = options;\n let { exportTimeoutMillis = 30000 } = options;\n\n super({\n aggregationSelector: exporter.selectAggregation?.bind(exporter),\n aggregationTemporalitySelector:\n exporter.selectAggregationTemporality?.bind(exporter),\n metricProducers,\n cardinalitySelector: (instrumentType: InstrumentType) => {\n const limits = {\n default: 2000,\n ...cardinalityLimits,\n };\n\n switch (instrumentType) {\n case InstrumentType.COUNTER:\n return limits.counter ?? limits.default;\n case InstrumentType.GAUGE:\n return limits.gauge ?? limits.default;\n case InstrumentType.HISTOGRAM:\n return limits.histogram ?? limits.default;\n case InstrumentType.OBSERVABLE_COUNTER:\n return limits.observableCounter ?? limits.default;\n case InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:\n return limits.observableUpDownCounter ?? limits.default;\n case InstrumentType.OBSERVABLE_GAUGE:\n return limits.observableGauge ?? limits.default;\n case InstrumentType.UP_DOWN_COUNTER:\n return limits.upDownCounter ?? limits.default;\n default:\n return limits.default;\n }\n },\n });\n\n if (exportIntervalMillis <= 0) {\n throw Error('exportIntervalMillis must be greater than 0');\n }\n\n if (exportTimeoutMillis <= 0) {\n throw Error('exportTimeoutMillis must be greater than 0');\n }\n\n if (exportIntervalMillis < exportTimeoutMillis) {\n if (\n 'exportIntervalMillis' in options &&\n 'exportTimeoutMillis' in options\n ) {\n // An invalid combination of values was explicitly provided.\n throw Error(\n 'exportIntervalMillis must be greater than or equal to exportTimeoutMillis'\n );\n } else {\n // An invalid combination of value was implicitly provided.\n api.diag.info(\n `Timeout of ${exportTimeoutMillis} exceeds the interval of ${exportIntervalMillis}. Clamping timeout to interval duration.`\n );\n exportTimeoutMillis = exportIntervalMillis;\n }\n }\n\n this._exportInterval = exportIntervalMillis;\n this._exportTimeout = exportTimeoutMillis;\n this._exporter = exporter;\n }\n\n private async _runOnce(): Promise<void> {\n try {\n await callWithTimeout(this._doRun(), this._exportTimeout);\n } catch (err) {\n if (err instanceof TimeoutError) {\n api.diag.error(\n 'Export took longer than %s milliseconds and timed out.',\n this._exportTimeout\n );\n return;\n }\n\n globalErrorHandler(err);\n }\n }\n\n private async _doRun(): Promise<void> {\n const { resourceMetrics, errors } = await this.collect({\n timeoutMillis: this._exportTimeout,\n });\n\n if (errors.length > 0) {\n api.diag.error(\n 'PeriodicExportingMetricReader: metrics collection errors',\n ...errors\n );\n }\n\n if (resourceMetrics.resource.asyncAttributesPending) {\n try {\n await resourceMetrics.resource.waitForAsyncAttributes?.();\n } catch (e) {\n api.diag.debug('Error while resolving async portion of resource: ', e);\n globalErrorHandler(e);\n }\n }\n\n if (resourceMetrics.scopeMetrics.length === 0) {\n return;\n }\n\n const result = await internal._export(this._exporter, resourceMetrics);\n if (result.code !== ExportResultCode.SUCCESS) {\n throw new Error(\n `PeriodicExportingMetricReader: metrics export failed (error ${result.error})`\n );\n }\n }\n\n protected override onInitialized(): void {\n // start running the interval as soon as this reader is initialized and keep handle for shutdown.\n this._interval = setInterval(() => {\n // this._runOnce never rejects. Using void operator to suppress @typescript-eslint/no-floating-promises.\n void this._runOnce();\n }, this._exportInterval);\n\n // depending on runtime, this may be a 'number' or NodeJS.Timeout\n if (typeof this._interval !== 'number') {\n this._interval.unref();\n }\n }\n\n protected async onForceFlush(): Promise<void> {\n await this._runOnce();\n await this._exporter.forceFlush();\n }\n\n protected async onShutdown(): Promise<void> {\n if (this._interval) {\n clearInterval(this._interval);\n }\n await this.onForceFlush();\n await this._exporter.shutdown();\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"PeriodicExportingMetricReader.js","sourceRoot":"","sources":["../../../src/export/PeriodicExportingMetricReader.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,GAAG,MAAM,oBAAoB,CAAC;AAC1C,OAAO,EACL,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,EAAE,gDAAgD,EAAE,MAAM,YAAY,CAAC;AAuC9E;;;GAGG;AACH,MAAM,OAAO,6BAA8B,SAAQ,YAAY;IACrD,SAAS,CAAkC;IAC3C,SAAS,CAAqB;IACrB,eAAe,CAAS;IACxB,cAAc,CAAS;IAExC,YAAY,OAA6C;QACvD,MAAM,EACJ,QAAQ,EACR,oBAAoB,GAAG,KAAK,EAC5B,eAAe,EACf,iBAAiB,GAClB,GAAG,OAAO,CAAC;QACZ,IAAI,EAAE,mBAAmB,GAAG,KAAK,EAAE,GAAG,OAAO,CAAC;QAE9C,KAAK,CAAC;YACJ,mBAAmB,EAAE,QAAQ,CAAC,iBAAiB,EAAE,IAAI,CAAC,QAAQ,CAAC;YAC/D,8BAA8B,EAC5B,QAAQ,CAAC,4BAA4B,EAAE,IAAI,CAAC,QAAQ,CAAC;YACvD,iBAAiB,EAAE,gDAAgD;YACnE,eAAe;YACf,mBAAmB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vB;SACF;QAED,IAAI,eAAe,CAAC,YAAY,CAAC,MAAM,KAAK,CAAC,EAAE;YAC7C,OAAO;SACR;QAED,MAAM,MAAM,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,eAAe,CAAC,CAAC;QACvE,IAAI,MAAM,CAAC,IAAI,KAAK,gBAAgB,CAAC,OAAO,EAAE;YAC5C,MAAM,IAAI,KAAK,CACb,+DAA+D,MAAM,CAAC,KAAK,GAAG,CAC/E,CAAC;SACH;IACH,CAAC;IAEkB,aAAa;QAC9B,iGAAiG;QACjG,IAAI,CAAC,SAAS,GAAG,WAAW,CAAC,GAAG,EAAE;YAChC,wGAAwG;YACxG,KAAK,IAAI,CAAC,QAAQ,EAAE,CAAC;QACvB,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC;QAEzB,iEAAiE;QACjE,IAAI,OAAO,IAAI,CAAC,SAAS,KAAK,QAAQ,EAAE;YACtC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;SACxB;IACH,CAAC;IAES,KAAK,CAAC,YAAY;QAC1B,MAAM,IAAI,CAAC,QAAQ,EAAE,CAAC;QACtB,MAAM,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;IACpC,CAAC;IAES,KAAK,CAAC,UAAU;QACxB,IAAI,IAAI,CAAC,SAAS,EAAE;YAClB,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;SAC/B;QACD,MAAM,IAAI,CAAC,YAAY,EAAE,CAAC;QAC1B,MAAM,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;IAClC,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport * as api from '@opentelemetry/api';\nimport {\n internal,\n ExportResultCode,\n globalErrorHandler,\n} from '@opentelemetry/core';\nimport { MetricReader } from './MetricReader';\nimport type { PushMetricExporter } from './MetricExporter';\nimport { callWithTimeout, TimeoutError } from '../utils';\nimport { InstrumentType } from './MetricData';\nimport type { MetricProducer } from './MetricProducer';\nimport { OTEL_COMPONENT_TYPE_VALUE_PERIODIC_METRIC_READER } from '../semconv';\n\nexport type PeriodicExportingMetricReaderOptions = {\n /**\n * The backing exporter for the metric reader.\n */\n exporter: PushMetricExporter;\n /**\n * An internal milliseconds for the metric reader to initiate metric\n * collection.\n */\n exportIntervalMillis?: number;\n /**\n * Milliseconds for the async observable callback to timeout.\n */\n exportTimeoutMillis?: number;\n /**\n * **Note, this option is experimental**. Additional MetricProducers to use as a source of\n * aggregated metric data in addition to the SDK's metric data. The resource returned by\n * these MetricProducers is ignored; the SDK's resource will be used instead.\n * @experimental\n */\n metricProducers?: MetricProducer[];\n /**\n * Cardinality limits for the metric reader, applied per instrument. If not configured, defaults to 2000 time series per instrument. These are wrapped in a cardinalitySelector function that returns limits based on the instrument type, so they can be configured differently per type if desired.\n *\n */\n cardinalityLimits?: {\n counter?: number;\n gauge?: number;\n histogram?: number;\n upDownCounter?: number;\n observableCounter?: number;\n observableGauge?: number;\n observableUpDownCounter?: number;\n default?: number;\n };\n};\n\n/**\n * {@link MetricReader} which collects metrics based on a user-configurable time interval, and passes the metrics to\n * the configured {@link PushMetricExporter}\n */\nexport class PeriodicExportingMetricReader extends MetricReader {\n private _interval?: ReturnType<typeof setInterval>;\n private _exporter: PushMetricExporter;\n private readonly _exportInterval: number;\n private readonly _exportTimeout: number;\n\n constructor(options: PeriodicExportingMetricReaderOptions) {\n const {\n exporter,\n exportIntervalMillis = 60000,\n metricProducers,\n cardinalityLimits,\n } = options;\n let { exportTimeoutMillis = 30000 } = options;\n\n super({\n aggregationSelector: exporter.selectAggregation?.bind(exporter),\n aggregationTemporalitySelector:\n exporter.selectAggregationTemporality?.bind(exporter),\n otelComponentType: OTEL_COMPONENT_TYPE_VALUE_PERIODIC_METRIC_READER,\n metricProducers,\n cardinalitySelector: (instrumentType: InstrumentType) => {\n const limits = {\n default: 2000,\n ...cardinalityLimits,\n };\n\n switch (instrumentType) {\n case InstrumentType.COUNTER:\n return limits.counter ?? limits.default;\n case InstrumentType.GAUGE:\n return limits.gauge ?? limits.default;\n case InstrumentType.HISTOGRAM:\n return limits.histogram ?? limits.default;\n case InstrumentType.OBSERVABLE_COUNTER:\n return limits.observableCounter ?? limits.default;\n case InstrumentType.OBSERVABLE_UP_DOWN_COUNTER:\n return limits.observableUpDownCounter ?? limits.default;\n case InstrumentType.OBSERVABLE_GAUGE:\n return limits.observableGauge ?? limits.default;\n case InstrumentType.UP_DOWN_COUNTER:\n return limits.upDownCounter ?? limits.default;\n default:\n return limits.default;\n }\n },\n });\n\n if (exportIntervalMillis <= 0) {\n throw Error('exportIntervalMillis must be greater than 0');\n }\n\n if (exportTimeoutMillis <= 0) {\n throw Error('exportTimeoutMillis must be greater than 0');\n }\n\n if (exportIntervalMillis < exportTimeoutMillis) {\n if (\n 'exportIntervalMillis' in options &&\n 'exportTimeoutMillis' in options\n ) {\n // An invalid combination of values was explicitly provided.\n throw Error(\n 'exportIntervalMillis must be greater than or equal to exportTimeoutMillis'\n );\n } else {\n // An invalid combination of value was implicitly provided.\n api.diag.info(\n `Timeout of ${exportTimeoutMillis} exceeds the interval of ${exportIntervalMillis}. Clamping timeout to interval duration.`\n );\n exportTimeoutMillis = exportIntervalMillis;\n }\n }\n\n this._exportInterval = exportIntervalMillis;\n this._exportTimeout = exportTimeoutMillis;\n this._exporter = exporter;\n }\n\n private async _runOnce(): Promise<void> {\n try {\n await callWithTimeout(this._doRun(), this._exportTimeout);\n } catch (err) {\n if (err instanceof TimeoutError) {\n api.diag.error(\n 'Export took longer than %s milliseconds and timed out.',\n this._exportTimeout\n );\n return;\n }\n\n globalErrorHandler(err);\n }\n }\n\n private async _doRun(): Promise<void> {\n const { resourceMetrics, errors } = await this.collect({\n timeoutMillis: this._exportTimeout,\n });\n\n if (errors.length > 0) {\n api.diag.error(\n 'PeriodicExportingMetricReader: metrics collection errors',\n ...errors\n );\n }\n\n if (resourceMetrics.resource.asyncAttributesPending) {\n try {\n await resourceMetrics.resource.waitForAsyncAttributes?.();\n } catch (e) {\n api.diag.debug('Error while resolving async portion of resource: ', e);\n globalErrorHandler(e);\n }\n }\n\n if (resourceMetrics.scopeMetrics.length === 0) {\n return;\n }\n\n const result = await internal._export(this._exporter, resourceMetrics);\n if (result.code !== ExportResultCode.SUCCESS) {\n throw new Error(\n `PeriodicExportingMetricReader: metrics export failed (error ${result.error})`\n );\n }\n }\n\n protected override onInitialized(): void {\n // start running the interval as soon as this reader is initialized and keep handle for shutdown.\n this._interval = setInterval(() => {\n // this._runOnce never rejects. Using void operator to suppress @typescript-eslint/no-floating-promises.\n void this._runOnce();\n }, this._exportInterval);\n\n // depending on runtime, this may be a 'number' or NodeJS.Timeout\n if (typeof this._interval !== 'number') {\n this._interval.unref();\n }\n }\n\n protected async onForceFlush(): Promise<void> {\n await this._runOnce();\n await this._exporter.forceFlush();\n }\n\n protected async onShutdown(): Promise<void> {\n if (this._interval) {\n clearInterval(this._interval);\n }\n await this.onForceFlush();\n await this._exporter.shutdown();\n }\n}\n"]}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance.
|
|
3
|
+
*
|
|
4
|
+
* @example otlp_grpc_span_exporter/0
|
|
5
|
+
* @example custom-name
|
|
6
|
+
*
|
|
7
|
+
* @note Implementations **SHOULD** ensure a low cardinality for this attribute, even across application or SDK restarts.
|
|
8
|
+
* E.g. implementations **MUST NOT** use UUIDs as values for this attribute.
|
|
9
|
+
*
|
|
10
|
+
* Implementations **MAY** achieve these goals by following a `<otel.component.type>/<instance-counter>` pattern, e.g. `batching_span_processor/0`.
|
|
11
|
+
* Hereby `otel.component.type` refers to the corresponding attribute value of the component.
|
|
12
|
+
*
|
|
13
|
+
* The value of `instance-counter` **MAY** be automatically assigned by the component and uniqueness within the enclosing SDK instance **MUST** be guaranteed.
|
|
14
|
+
* For example, `<instance-counter>` **MAY** be implemented by using a monotonically increasing counter (starting with `0`), which is incremented every time an
|
|
15
|
+
* instance of the given component type is started.
|
|
16
|
+
*
|
|
17
|
+
* With this implementation, for example the first Batching Span Processor would have `batching_span_processor/0`
|
|
18
|
+
* as `otel.component.name`, the second one `batching_span_processor/1` and so on.
|
|
19
|
+
* These values will therefore be reused in the case of an application restart.
|
|
20
|
+
*
|
|
21
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
22
|
+
*/
|
|
23
|
+
export declare const ATTR_OTEL_COMPONENT_NAME: "otel.component.name";
|
|
24
|
+
/**
|
|
25
|
+
* A name identifying the type of the OpenTelemetry component.
|
|
26
|
+
*
|
|
27
|
+
* @example batching_span_processor
|
|
28
|
+
* @example com.example.MySpanExporter
|
|
29
|
+
*
|
|
30
|
+
* @note If none of the standardized values apply, implementations **SHOULD** use the language-defined name of the type.
|
|
31
|
+
* E.g. for Java the fully qualified classname **SHOULD** be used in this case.
|
|
32
|
+
*
|
|
33
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
34
|
+
*/
|
|
35
|
+
export declare const ATTR_OTEL_COMPONENT_TYPE: "otel.component.type";
|
|
36
|
+
/**
|
|
37
|
+
* Enum value "periodic_metric_reader" for attribute {@link ATTR_OTEL_COMPONENT_TYPE}.
|
|
38
|
+
*
|
|
39
|
+
* The builtin SDK periodically exporting metric reader
|
|
40
|
+
*
|
|
41
|
+
* @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
42
|
+
*/
|
|
43
|
+
export declare const OTEL_COMPONENT_TYPE_VALUE_PERIODIC_METRIC_READER: "periodic_metric_reader";
|
|
44
|
+
/**
|
|
45
|
+
* The duration of the collect operation of the metric reader.
|
|
46
|
+
*
|
|
47
|
+
* @note For successful collections, `error.type` **MUST NOT** be set. For failed collections, `error.type` **SHOULD** contain the failure cause.
|
|
48
|
+
* It can happen that metrics collection is successful for some MetricProducers, while others fail. In that case `error.type` **SHOULD** be set to any of the failure causes.
|
|
49
|
+
*
|
|
50
|
+
* @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
51
|
+
*/
|
|
52
|
+
export declare const METRIC_OTEL_SDK_METRIC_READER_COLLECTION_DURATION: "otel.sdk.metric_reader.collection.duration";
|
|
53
|
+
/**
|
|
54
|
+
* Describes a class of error the operation ended with.
|
|
55
|
+
*
|
|
56
|
+
* @example timeout
|
|
57
|
+
* @example java.net.UnknownHostException
|
|
58
|
+
* @example server_certificate_invalid
|
|
59
|
+
* @example 500
|
|
60
|
+
*
|
|
61
|
+
* @note The `error.type` **SHOULD** be predictable, and **SHOULD** have low cardinality.
|
|
62
|
+
*
|
|
63
|
+
* When `error.type` is set to a type (e.g., an exception type), its
|
|
64
|
+
* canonical class name identifying the type within the artifact **SHOULD** be used.
|
|
65
|
+
*
|
|
66
|
+
* Instrumentations **SHOULD** document the list of errors they report.
|
|
67
|
+
*
|
|
68
|
+
* The cardinality of `error.type` within one instrumentation library **SHOULD** be low.
|
|
69
|
+
* Telemetry consumers that aggregate data from multiple instrumentation libraries and applications
|
|
70
|
+
* should be prepared for `error.type` to have high cardinality at query time when no
|
|
71
|
+
* additional filters are applied.
|
|
72
|
+
*
|
|
73
|
+
* If the operation has completed successfully, instrumentations **SHOULD NOT** set `error.type`.
|
|
74
|
+
*
|
|
75
|
+
* If a specific domain defines its own set of error identifiers (such as HTTP or RPC status codes),
|
|
76
|
+
* it's **RECOMMENDED** to:
|
|
77
|
+
*
|
|
78
|
+
* - Use a domain-specific attribute
|
|
79
|
+
* - Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.
|
|
80
|
+
*/
|
|
81
|
+
export declare const ATTR_ERROR_TYPE: "error.type";
|
|
82
|
+
//# sourceMappingURL=semconv.d.ts.map
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright The OpenTelemetry Authors
|
|
3
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
+
*/
|
|
5
|
+
/*
|
|
6
|
+
* This file contains a copy of unstable semantic convention definitions
|
|
7
|
+
* used by this package.
|
|
8
|
+
* @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* A name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance.
|
|
12
|
+
*
|
|
13
|
+
* @example otlp_grpc_span_exporter/0
|
|
14
|
+
* @example custom-name
|
|
15
|
+
*
|
|
16
|
+
* @note Implementations **SHOULD** ensure a low cardinality for this attribute, even across application or SDK restarts.
|
|
17
|
+
* E.g. implementations **MUST NOT** use UUIDs as values for this attribute.
|
|
18
|
+
*
|
|
19
|
+
* Implementations **MAY** achieve these goals by following a `<otel.component.type>/<instance-counter>` pattern, e.g. `batching_span_processor/0`.
|
|
20
|
+
* Hereby `otel.component.type` refers to the corresponding attribute value of the component.
|
|
21
|
+
*
|
|
22
|
+
* The value of `instance-counter` **MAY** be automatically assigned by the component and uniqueness within the enclosing SDK instance **MUST** be guaranteed.
|
|
23
|
+
* For example, `<instance-counter>` **MAY** be implemented by using a monotonically increasing counter (starting with `0`), which is incremented every time an
|
|
24
|
+
* instance of the given component type is started.
|
|
25
|
+
*
|
|
26
|
+
* With this implementation, for example the first Batching Span Processor would have `batching_span_processor/0`
|
|
27
|
+
* as `otel.component.name`, the second one `batching_span_processor/1` and so on.
|
|
28
|
+
* These values will therefore be reused in the case of an application restart.
|
|
29
|
+
*
|
|
30
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
31
|
+
*/
|
|
32
|
+
export const ATTR_OTEL_COMPONENT_NAME = 'otel.component.name';
|
|
33
|
+
/**
|
|
34
|
+
* A name identifying the type of the OpenTelemetry component.
|
|
35
|
+
*
|
|
36
|
+
* @example batching_span_processor
|
|
37
|
+
* @example com.example.MySpanExporter
|
|
38
|
+
*
|
|
39
|
+
* @note If none of the standardized values apply, implementations **SHOULD** use the language-defined name of the type.
|
|
40
|
+
* E.g. for Java the fully qualified classname **SHOULD** be used in this case.
|
|
41
|
+
*
|
|
42
|
+
* @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
43
|
+
*/
|
|
44
|
+
export const ATTR_OTEL_COMPONENT_TYPE = 'otel.component.type';
|
|
45
|
+
/**
|
|
46
|
+
* Enum value "periodic_metric_reader" for attribute {@link ATTR_OTEL_COMPONENT_TYPE}.
|
|
47
|
+
*
|
|
48
|
+
* The builtin SDK periodically exporting metric reader
|
|
49
|
+
*
|
|
50
|
+
* @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
51
|
+
*/
|
|
52
|
+
export const OTEL_COMPONENT_TYPE_VALUE_PERIODIC_METRIC_READER = 'periodic_metric_reader';
|
|
53
|
+
/**
|
|
54
|
+
* The duration of the collect operation of the metric reader.
|
|
55
|
+
*
|
|
56
|
+
* @note For successful collections, `error.type` **MUST NOT** be set. For failed collections, `error.type` **SHOULD** contain the failure cause.
|
|
57
|
+
* It can happen that metrics collection is successful for some MetricProducers, while others fail. In that case `error.type` **SHOULD** be set to any of the failure causes.
|
|
58
|
+
*
|
|
59
|
+
* @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.
|
|
60
|
+
*/
|
|
61
|
+
export const METRIC_OTEL_SDK_METRIC_READER_COLLECTION_DURATION = 'otel.sdk.metric_reader.collection.duration';
|
|
62
|
+
/**
|
|
63
|
+
* Describes a class of error the operation ended with.
|
|
64
|
+
*
|
|
65
|
+
* @example timeout
|
|
66
|
+
* @example java.net.UnknownHostException
|
|
67
|
+
* @example server_certificate_invalid
|
|
68
|
+
* @example 500
|
|
69
|
+
*
|
|
70
|
+
* @note The `error.type` **SHOULD** be predictable, and **SHOULD** have low cardinality.
|
|
71
|
+
*
|
|
72
|
+
* When `error.type` is set to a type (e.g., an exception type), its
|
|
73
|
+
* canonical class name identifying the type within the artifact **SHOULD** be used.
|
|
74
|
+
*
|
|
75
|
+
* Instrumentations **SHOULD** document the list of errors they report.
|
|
76
|
+
*
|
|
77
|
+
* The cardinality of `error.type` within one instrumentation library **SHOULD** be low.
|
|
78
|
+
* Telemetry consumers that aggregate data from multiple instrumentation libraries and applications
|
|
79
|
+
* should be prepared for `error.type` to have high cardinality at query time when no
|
|
80
|
+
* additional filters are applied.
|
|
81
|
+
*
|
|
82
|
+
* If the operation has completed successfully, instrumentations **SHOULD NOT** set `error.type`.
|
|
83
|
+
*
|
|
84
|
+
* If a specific domain defines its own set of error identifiers (such as HTTP or RPC status codes),
|
|
85
|
+
* it's **RECOMMENDED** to:
|
|
86
|
+
*
|
|
87
|
+
* - Use a domain-specific attribute
|
|
88
|
+
* - Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.
|
|
89
|
+
*/
|
|
90
|
+
export const ATTR_ERROR_TYPE = 'error.type';
|
|
91
|
+
//# sourceMappingURL=semconv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semconv.js","sourceRoot":"","sources":["../../src/semconv.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,qBAA8B,CAAC;AAEvE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,qBAA8B,CAAC;AAEvE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gDAAgD,GAC3D,wBAAiC,CAAC;AAEpC;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,iDAAiD,GAC5D,4CAAqD,CAAC;AAExD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,YAAqB,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/*\n * This file contains a copy of unstable semantic convention definitions\n * used by this package.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n\n/**\n * A name uniquely identifying the instance of the OpenTelemetry component within its containing SDK instance.\n *\n * @example otlp_grpc_span_exporter/0\n * @example custom-name\n *\n * @note Implementations **SHOULD** ensure a low cardinality for this attribute, even across application or SDK restarts.\n * E.g. implementations **MUST NOT** use UUIDs as values for this attribute.\n *\n * Implementations **MAY** achieve these goals by following a `<otel.component.type>/<instance-counter>` pattern, e.g. `batching_span_processor/0`.\n * Hereby `otel.component.type` refers to the corresponding attribute value of the component.\n *\n * The value of `instance-counter` **MAY** be automatically assigned by the component and uniqueness within the enclosing SDK instance **MUST** be guaranteed.\n * For example, `<instance-counter>` **MAY** be implemented by using a monotonically increasing counter (starting with `0`), which is incremented every time an\n * instance of the given component type is started.\n *\n * With this implementation, for example the first Batching Span Processor would have `batching_span_processor/0`\n * as `otel.component.name`, the second one `batching_span_processor/1` and so on.\n * These values will therefore be reused in the case of an application restart.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_OTEL_COMPONENT_NAME = 'otel.component.name' as const;\n\n/**\n * A name identifying the type of the OpenTelemetry component.\n *\n * @example batching_span_processor\n * @example com.example.MySpanExporter\n *\n * @note If none of the standardized values apply, implementations **SHOULD** use the language-defined name of the type.\n * E.g. for Java the fully qualified classname **SHOULD** be used in this case.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const ATTR_OTEL_COMPONENT_TYPE = 'otel.component.type' as const;\n\n/**\n * Enum value \"periodic_metric_reader\" for attribute {@link ATTR_OTEL_COMPONENT_TYPE}.\n *\n * The builtin SDK periodically exporting metric reader\n *\n * @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const OTEL_COMPONENT_TYPE_VALUE_PERIODIC_METRIC_READER =\n 'periodic_metric_reader' as const;\n\n/**\n * The duration of the collect operation of the metric reader.\n *\n * @note For successful collections, `error.type` **MUST NOT** be set. For failed collections, `error.type` **SHOULD** contain the failure cause.\n * It can happen that metrics collection is successful for some MetricProducers, while others fail. In that case `error.type` **SHOULD** be set to any of the failure causes.\n *\n * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const METRIC_OTEL_SDK_METRIC_READER_COLLECTION_DURATION =\n 'otel.sdk.metric_reader.collection.duration' as const;\n\n/**\n * Describes a class of error the operation ended with.\n *\n * @example timeout\n * @example java.net.UnknownHostException\n * @example server_certificate_invalid\n * @example 500\n *\n * @note The `error.type` **SHOULD** be predictable, and **SHOULD** have low cardinality.\n *\n * When `error.type` is set to a type (e.g., an exception type), its\n * canonical class name identifying the type within the artifact **SHOULD** be used.\n *\n * Instrumentations **SHOULD** document the list of errors they report.\n *\n * The cardinality of `error.type` within one instrumentation library **SHOULD** be low.\n * Telemetry consumers that aggregate data from multiple instrumentation libraries and applications\n * should be prepared for `error.type` to have high cardinality at query time when no\n * additional filters are applied.\n *\n * If the operation has completed successfully, instrumentations **SHOULD NOT** set `error.type`.\n *\n * If a specific domain defines its own set of error identifiers (such as HTTP or RPC status codes),\n * it's **RECOMMENDED** to:\n *\n * - Use a domain-specific attribute\n * - Set `error.type` to capture all errors, regardless of whether they are defined within the domain-specific set or not.\n */\nexport const ATTR_ERROR_TYPE = 'error.type' as const;\n"]}
|
|
@@ -48,7 +48,6 @@ export class DeltaMetricProcessor {
|
|
|
48
48
|
// Diff with recorded cumulative memo.
|
|
49
49
|
if (this._cumulativeMemoStorage.has(attributes, hashCode)) {
|
|
50
50
|
// has() returned true, previous is present.
|
|
51
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
52
51
|
const previous = this._cumulativeMemoStorage.get(attributes, hashCode);
|
|
53
52
|
delta = this._aggregator.diff(previous, accumulation);
|
|
54
53
|
}
|
|
@@ -59,7 +58,6 @@ export class DeltaMetricProcessor {
|
|
|
59
58
|
hashCode = this._overflowHashCode;
|
|
60
59
|
if (this._cumulativeMemoStorage.has(attributes, hashCode)) {
|
|
61
60
|
// has() returned true, previous is present.
|
|
62
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
63
61
|
const previous = this._cumulativeMemoStorage.get(attributes, hashCode);
|
|
64
62
|
delta = this._aggregator.diff(previous, accumulation);
|
|
65
63
|
}
|
|
@@ -68,7 +66,6 @@ export class DeltaMetricProcessor {
|
|
|
68
66
|
// Merge with uncollected active delta.
|
|
69
67
|
if (this._activeCollectionStorage.has(attributes, hashCode)) {
|
|
70
68
|
// has() returned true, active is present.
|
|
71
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
72
69
|
const active = this._activeCollectionStorage.get(attributes, hashCode);
|
|
73
70
|
delta = this._aggregator.merge(active, delta);
|
|
74
71
|
}
|
package/node_modules/@opentelemetry/sdk-metrics/build/esnext/state/DeltaMetricProcessor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeltaMetricProcessor.js","sourceRoot":"","sources":["../../../src/state/DeltaMetricProcessor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,OAAO,oBAAoB;IACvB,wBAAwB,GAAG,IAAI,gBAAgB,EAAK,CAAC;IAC7D,kDAAkD;IAClD,0EAA0E;IAClE,sBAAsB,GAAG,IAAI,gBAAgB,EAAK,CAAC;IACnD,iBAAiB,CAAS;IAC1B,mBAAmB,GAAG,EAAE,sBAAsB,EAAE,IAAI,EAAE,CAAC;IACvD,iBAAiB,CAAS;IAC1B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IAAI,CAAC,iBAAiB,EAAE;oBAC9D,UAAU,GAAG,IAAI,CAAC,mBAAmB,CAAC;oBACtC,QAAQ,GAAG,IAAI,CAAC,iBAAiB,CAAC;oBAClC,IAAI,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE;wBACzD,4CAA4C;wBAC5C,MAAM,QAAQ,GAAG,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAC9C,UAAU,EACV,QAAQ,CACR,CAAC;wBACH,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;qBACvD;iBACF;aACF;YACD,uCAAuC;YACvC,IAAI,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAC,EAAE;gBAC3D,0CAA0C;gBAC1C,MAAM,MAAM,GAAG,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,UAAU,EAAE,QAAQ,CAAE,CAAC;gBACxE,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;aAC/C;YAED,gDAAgD;YAChD,IAAI,CAAC,sBAAsB,CAAC,GAAG,CAAC,UAAU,EAAE,YAAY,EAAE,QAAQ,CAAC,CAAC;YACpE,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;SAChE;IACH,CAAC;IAED;;;OAGG;IACH,OAAO;QACL,MAAM,eAAe,GAAG,IAAI,CAAC,wBAAwB,CAAC;QACtD,IAAI,CAAC,wBAAwB,GAAG,IAAI,gBAAgB,EAAE,CAAC;QAEvD,OAAO,eAAe,CAAC;IACzB,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Context, HrTime, Attributes } from '@opentelemetry/api';\nimport type { Maybe } from '../utils';\nimport { hashAttributes } from '../utils';\nimport type { Accumulation, Aggregator } from '../aggregator/types';\nimport { AttributeHashMap } from './HashMap';\n\n/**\n * Internal interface.\n *\n * Allows synchronous collection of metrics. This processor should allow\n * allocation of new aggregation cells for metrics and convert cumulative\n * recording to delta data points.\n */\nexport class DeltaMetricProcessor<T extends Maybe<Accumulation>> {\n private _activeCollectionStorage = new AttributeHashMap<T>();\n // TODO: find a reasonable mean to clean the memo;\n // https://github.com/open-telemetry/opentelemetry-specification/pull/2208\n private _cumulativeMemoStorage = new AttributeHashMap<T>();\n private _cardinalityLimit: number;\n private _overflowAttributes = { 'otel.metric.overflow': true };\n private _overflowHashCode: string;\n private _aggregator: Aggregator<T>;\n\n constructor(aggregator: Aggregator<T>, aggregationCardinalityLimit?: number) {\n this._aggregator = aggregator;\n this._cardinalityLimit = (aggregationCardinalityLimit ?? 2000) - 1;\n this._overflowHashCode = hashAttributes(this._overflowAttributes);\n }\n\n record(\n value: number,\n attributes: Attributes,\n _context: Context,\n collectionTime: HrTime\n ) {\n let accumulation = this._activeCollectionStorage.get(attributes);\n\n if (!accumulation) {\n if (this._activeCollectionStorage.size >= this._cardinalityLimit) {\n const overflowAccumulation = this._activeCollectionStorage.getOrDefault(\n this._overflowAttributes,\n () => this._aggregator.createAccumulation(collectionTime)\n );\n overflowAccumulation?.record(value);\n return;\n }\n\n accumulation = this._aggregator.createAccumulation(collectionTime);\n this._activeCollectionStorage.set(attributes, accumulation);\n }\n\n accumulation?.record(value);\n }\n\n batchCumulate(\n measurements: AttributeHashMap<number>,\n collectionTime: HrTime\n ) {\n for (const [\n originalAttributes,\n value,\n originalHashCode,\n ] of measurements.entries()) {\n let attributes = originalAttributes;\n let hashCode = originalHashCode;\n const accumulation = this._aggregator.createAccumulation(collectionTime);\n accumulation?.record(value);\n let delta = accumulation;\n // Diff with recorded cumulative memo.\n if (this._cumulativeMemoStorage.has(attributes, hashCode)) {\n // has() returned true, previous is present.\n const previous = this._cumulativeMemoStorage.get(attributes, hashCode)!;\n delta = this._aggregator.diff(previous, accumulation);\n } else {\n // If the cardinality limit is reached, we need to change the attributes\n if (this._cumulativeMemoStorage.size >= this._cardinalityLimit) {\n attributes = this._overflowAttributes;\n hashCode = this._overflowHashCode;\n if (this._cumulativeMemoStorage.has(attributes, hashCode)) {\n // has() returned true, previous is present.\n const previous = this._cumulativeMemoStorage.get(\n attributes,\n hashCode\n )!;\n delta = this._aggregator.diff(previous, accumulation);\n }\n }\n }\n // Merge with uncollected active delta.\n if (this._activeCollectionStorage.has(attributes, hashCode)) {\n // has() returned true, active is present.\n const active = this._activeCollectionStorage.get(attributes, hashCode)!;\n delta = this._aggregator.merge(active, delta);\n }\n\n // Save the current record and the delta record.\n this._cumulativeMemoStorage.set(attributes, accumulation, hashCode);\n this._activeCollectionStorage.set(attributes, delta, hashCode);\n }\n }\n\n /**\n * Returns a collection of delta metrics. Start time is the when first\n * time event collected.\n */\n collect() {\n const unreportedDelta = this._activeCollectionStorage;\n this._activeCollectionStorage = new AttributeHashMap();\n\n return unreportedDelta;\n }\n}\n"]}
|
|
@@ -50,7 +50,6 @@ export class HashMap {
|
|
|
50
50
|
let next = valueIterator.next();
|
|
51
51
|
while (next.done !== true) {
|
|
52
52
|
// next.value[0] here can not be undefined
|
|
53
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
54
53
|
yield [this._keyMap.get(next.value[0]), next.value[1], next.value[0]];
|
|
55
54
|
next = valueIterator.next();
|
|
56
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HashMap.js","sourceRoot":"","sources":["../../../src/state/HashMap.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAM1C,MAAM,OAAO,OAAO;IACV,SAAS,GAAG,IAAI,GAAG,EAA2B,CAAC;IAC/C,OAAO,GAAG,IAAI,GAAG,EAAyB,CAAC;IAC3C,KAAK,CAAC;IAEd,YAAY,IAAiC;QA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CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACrC,IAAI,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC;SAC3B;IACH,CAAC;IAED,CAAC,OAAO;QACN,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,CAAC;QAC/C,IAAI,IAAI,GAAG,aAAa,CAAC,IAAI,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE;YACzB,0CAA0C;YAC1C,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YACvE,IAAI,GAAG,aAAa,CAAC,IAAI,EAAE,CAAC;SAC7B;IACH,CAAC;IAED,IAAI,IAAI;QACN,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC;IAC7B,CAAC;CACF;AAED,MAAM,OAAO,gBAA4B,SAAQ,OAIhD;IACC;QACE,KAAK,CAAC,cAAc,CAAC,CAAC;IACxB,CAAC;CACF","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { Attributes } from '@opentelemetry/api';\nimport { hashAttributes } from '../utils';\n\nexport interface Hash<ValueType, HashCodeType> {\n (value: ValueType): HashCodeType;\n}\n\nexport class HashMap<KeyType, ValueType, HashCodeType> {\n private _valueMap = new Map<HashCodeType, ValueType>();\n private _keyMap = new Map<HashCodeType, KeyType>();\n private _hash;\n\n constructor(hash: Hash<KeyType, HashCodeType>) {\n this._hash = hash;\n }\n\n get(key: KeyType, hashCode?: HashCodeType) {\n hashCode ??= this._hash(key);\n return this._valueMap.get(hashCode);\n }\n\n getOrDefault(key: KeyType, defaultFactory: () => ValueType) {\n const hash = this._hash(key);\n if (this._valueMap.has(hash)) {\n return this._valueMap.get(hash);\n }\n const val = defaultFactory();\n if (!this._keyMap.has(hash)) {\n this._keyMap.set(hash, key);\n }\n this._valueMap.set(hash, val);\n return val;\n }\n\n set(key: KeyType, value: ValueType, hashCode?: HashCodeType) {\n hashCode ??= this._hash(key);\n if (!this._keyMap.has(hashCode)) {\n this._keyMap.set(hashCode, key);\n }\n this._valueMap.set(hashCode, value);\n }\n\n has(key: KeyType, hashCode?: HashCodeType) {\n hashCode ??= this._hash(key);\n return this._valueMap.has(hashCode);\n }\n\n *keys(): IterableIterator<[KeyType, HashCodeType]> {\n const keyIterator = this._keyMap.entries();\n let next = keyIterator.next();\n while (next.done !== true) {\n yield [next.value[1], next.value[0]];\n next = keyIterator.next();\n }\n }\n\n *entries(): IterableIterator<[KeyType, ValueType, HashCodeType]> {\n const valueIterator = this._valueMap.entries();\n let next = valueIterator.next();\n while (next.done !== true) {\n // next.value[0] here can not be undefined\n yield [this._keyMap.get(next.value[0])!, next.value[1], next.value[0]];\n next = valueIterator.next();\n }\n }\n\n get size() {\n return this._valueMap.size;\n }\n}\n\nexport class AttributeHashMap<ValueType> extends HashMap<\n Attributes,\n ValueType,\n string\n> {\n constructor() {\n super(hashAttributes);\n }\n}\n"]}
|
package/node_modules/@opentelemetry/sdk-metrics/build/esnext/state/TemporalMetricProcessor.js
CHANGED
|
@@ -36,7 +36,6 @@ export class TemporalMetricProcessor {
|
|
|
36
36
|
let aggregationTemporality;
|
|
37
37
|
// Check our last report time.
|
|
38
38
|
if (this._reportHistory.has(collector)) {
|
|
39
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
40
39
|
const last = this._reportHistory.get(collector);
|
|
41
40
|
const lastCollectionTime = last.collectionTime;
|
|
42
41
|
aggregationTemporality = last.aggregationTemporality;
|
|
@@ -111,7 +110,6 @@ export class TemporalMetricProcessor {
|
|
|
111
110
|
if (last.has(key, hash)) {
|
|
112
111
|
const lastAccumulation = last.get(key, hash);
|
|
113
112
|
// last.has() returned true, lastAccumulation is present.
|
|
114
|
-
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
115
113
|
const accumulation = aggregator.merge(lastAccumulation, record);
|
|
116
114
|
result.set(key, accumulation, hash);
|
|
117
115
|
}
|
package/node_modules/@opentelemetry/sdk-metrics/build/esnext/state/TemporalMetricProcessor.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TemporalMetricProcessor.js","sourceRoot":"","sources":["../../../src/state/TemporalMetricProcessor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAG1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAoB7C;;;;;GAKG;AACH,MAAM,OAAO,uBAAuB;IAC1B,WAAW,CAAgB;IAC3B,wBAAwB,GAAG,IAAI,GAAG,EAGvC,CAAC;IACI,cAAc,GAAG,IAAI,GAAG,EAG7B,CAAC;IAEJ,YACE,UAAyB,EACzB,gBAAyC;QAEzC,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC;QAC9B,gBAAgB,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE;YAChC,IAAI,CAAC,wBAAwB,CAAC,GAAG,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;OAQG;IACH,YAAY,CACV,SAAgC,EAChC,oBAA0C,EAC1C,oBAAyC,EACzC,cAAsB;QAEtB,IAAI,CAAC,mBAAmB,CAAC,oBAAoB,CAAC,CAAC;QAC/C,MAAM,uBAAuB,GAC3B,IAAI,CAAC,iCAAiC,CAAC,SAAS,CAAC,CAAC;QAEpD,IAAI,MAAM,GAAG,uBAAuB,CAAC;QACrC,IAAI,sBAA8C,CAAC;QACnD,8BAA8B;QAC9B,IAAI,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE;YAC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AAI,CAAC,KAAK,CAAC;YACvC,IAAI,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE;gBACvB,MAAM,gBAAgB,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;gBAC7C,yDAAyD;gBACzD,oEAAoE;gBACpE,MAAM,YAAY,GAAG,UAAU,CAAC,KAAK,CAAC,gBAAiB,EAAE,MAAM,CAAC,CAAC;gBACjE,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;aACrC;iBAAM;gBACL,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC;aAC/B;YAED,IAAI,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;SACxB;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,kBAAkB,CACvB,IAAyB,EACzB,OAA4B,EAC5B,kBAA0B;QAE1B,KAAK,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE;YACrC,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YACnD,mBAAmB,EAAE,YAAY,CAAC,kBAAkB,CAAC,CAAC;SACvD;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAED,mFAAmF;AACnF,SAAS,kCAAkC,CACzC,GAAwB;IAExB,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAuC,CAAC;AACzE,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { HrTime } from '@opentelemetry/api';\nimport type {\n Accumulation,\n AccumulationRecord,\n Aggregator,\n} from '../aggregator/types';\nimport type { MetricData } from '../export/MetricData';\nimport type { InstrumentDescriptor } from '../InstrumentDescriptor';\nimport { AggregationTemporality } from '../export/AggregationTemporality';\nimport type { Maybe } from '../utils';\nimport type { MetricCollectorHandle } from './MetricCollector';\nimport { AttributeHashMap } from './HashMap';\n\n/**\n * Remembers what was presented to a specific exporter.\n */\ninterface LastReportedHistory<T extends Maybe<Accumulation>> {\n /**\n * The last accumulation of metric data.\n */\n accumulations: AttributeHashMap<T>;\n /**\n * The timestamp the data was reported.\n */\n collectionTime: HrTime;\n /**\n * The AggregationTemporality used to aggregate reports.\n */\n aggregationTemporality: AggregationTemporality;\n}\n\n/**\n * Internal interface.\n *\n * Provides unique reporting for each collector. Allows synchronous collection\n * of metrics and reports given temporality values.\n */\nexport class TemporalMetricProcessor<T extends Maybe<Accumulation>> {\n private _aggregator: Aggregator<T>;\n private _unreportedAccumulations = new Map<\n MetricCollectorHandle,\n AttributeHashMap<T>[]\n >();\n private _reportHistory = new Map<\n MetricCollectorHandle,\n LastReportedHistory<T>\n >();\n\n constructor(\n aggregator: Aggregator<T>,\n collectorHandles: MetricCollectorHandle[]\n ) {\n this._aggregator = aggregator;\n collectorHandles.forEach(handle => {\n this._unreportedAccumulations.set(handle, []);\n });\n }\n\n /**\n * Builds the {@link MetricData} streams to report against a specific MetricCollector.\n * @param collector The information of the MetricCollector.\n * @param collectors The registered collectors.\n * @param instrumentDescriptor The instrumentation descriptor that these metrics generated with.\n * @param currentAccumulations The current accumulation of metric data from instruments.\n * @param collectionTime The current collection timestamp.\n * @returns The {@link MetricData} points or `null`.\n */\n buildMetrics(\n collector: MetricCollectorHandle,\n instrumentDescriptor: InstrumentDescriptor,\n currentAccumulations: AttributeHashMap<T>,\n collectionTime: HrTime\n ): Maybe<MetricData> {\n this._stashAccumulations(currentAccumulations);\n const unreportedAccumulations =\n this._getMergedUnreportedAccumulations(collector);\n\n let result = unreportedAccumulations;\n let aggregationTemporality: AggregationTemporality;\n // Check our last report time.\n if (this._reportHistory.has(collector)) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const last = this._reportHistory.get(collector)!;\n const lastCollectionTime = last.collectionTime;\n aggregationTemporality = last.aggregationTemporality;\n\n // Use aggregation temporality + instrument to determine if we do a merge or a diff of\n // previous. We have the following four scenarios:\n // 1. Cumulative Aggregation (temporality) + Delta recording (sync instrument).\n // Here we merge with our last record to get a cumulative aggregation.\n // 2. Cumulative Aggregation + Cumulative recording (async instrument).\n // Cumulative records are converted to delta recording with DeltaMetricProcessor.\n // Here we merge with our last record to get a cumulative aggregation.\n // 3. Delta Aggregation + Delta recording\n // Calibrate the startTime of metric streams to be the reader's lastCollectionTime.\n // 4. Delta Aggregation + Cumulative recording.\n // Cumulative records are converted to delta recording with DeltaMetricProcessor.\n // Calibrate the startTime of metric streams to be the reader's lastCollectionTime.\n if (aggregationTemporality === AggregationTemporality.CUMULATIVE) {\n // We need to make sure the current delta recording gets merged into the previous cumulative\n // for the next cumulative recording.\n result = TemporalMetricProcessor.merge(\n last.accumulations,\n unreportedAccumulations,\n this._aggregator\n );\n } else {\n result = TemporalMetricProcessor.calibrateStartTime(\n last.accumulations,\n unreportedAccumulations,\n lastCollectionTime\n );\n }\n } else {\n // Call into user code to select aggregation temporality for the instrument.\n aggregationTemporality = collector.selectAggregationTemporality(\n instrumentDescriptor.type\n );\n }\n\n // Update last reported (cumulative) accumulation.\n this._reportHistory.set(collector, {\n accumulations: result,\n collectionTime,\n aggregationTemporality,\n });\n\n const accumulationRecords = AttributesMapToAccumulationRecords(result);\n\n // do not convert to metric data if there is nothing to convert.\n if (accumulationRecords.length === 0) {\n return undefined;\n }\n\n return this._aggregator.toMetricData(\n instrumentDescriptor,\n aggregationTemporality,\n accumulationRecords,\n /* endTime */ collectionTime\n );\n }\n\n private _stashAccumulations(currentAccumulation: AttributeHashMap<T>) {\n const registeredCollectors = this._unreportedAccumulations.keys();\n for (const collector of registeredCollectors) {\n let stash = this._unreportedAccumulations.get(collector);\n if (stash === undefined) {\n stash = [];\n this._unreportedAccumulations.set(collector, stash);\n }\n stash.push(currentAccumulation);\n }\n }\n\n private _getMergedUnreportedAccumulations(collector: MetricCollectorHandle) {\n let result = new AttributeHashMap<T>();\n const unreportedList = this._unreportedAccumulations.get(collector);\n this._unreportedAccumulations.set(collector, []);\n if (unreportedList === undefined) {\n return result;\n }\n for (const it of unreportedList) {\n result = TemporalMetricProcessor.merge(result, it, this._aggregator);\n }\n return result;\n }\n\n static merge<T extends Maybe<Accumulation>>(\n last: AttributeHashMap<T>,\n current: AttributeHashMap<T>,\n aggregator: Aggregator<T>\n ) {\n const result = last;\n const iterator = current.entries();\n let next = iterator.next();\n while (next.done !== true) {\n const [key, record, hash] = next.value;\n if (last.has(key, hash)) {\n const lastAccumulation = last.get(key, hash);\n // last.has() returned true, lastAccumulation is present.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const accumulation = aggregator.merge(lastAccumulation!, record);\n result.set(key, accumulation, hash);\n } else {\n result.set(key, record, hash);\n }\n\n next = iterator.next();\n }\n return result;\n }\n\n /**\n * Calibrate the reported metric streams' startTime to lastCollectionTime. Leaves\n * the new stream to be the initial observation time unchanged.\n */\n static calibrateStartTime<T extends Maybe<Accumulation>>(\n last: AttributeHashMap<T>,\n current: AttributeHashMap<T>,\n lastCollectionTime: HrTime\n ) {\n for (const [key, hash] of last.keys()) {\n const currentAccumulation = current.get(key, hash);\n currentAccumulation?.setStartTime(lastCollectionTime);\n }\n return current;\n }\n}\n\n// TypeScript complains about converting 3 elements tuple to AccumulationRecord<T>.\nfunction AttributesMapToAccumulationRecords<T>(\n map: AttributeHashMap<T>\n): AccumulationRecord<T>[] {\n return Array.from(map.entries()) as unknown as AccumulationRecord<T>[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TemporalMetricProcessor.js","sourceRoot":"","sources":["../../../src/state/TemporalMetricProcessor.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAG1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AA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,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,kBAAkB,CACvB,IAAyB,EACzB,OAA4B,EAC5B,kBAA0B;QAE1B,KAAK,MAAM,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE;YACrC,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YACnD,mBAAmB,EAAE,YAAY,CAAC,kBAAkB,CAAC,CAAC;SACvD;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAED,mFAAmF;AACnF,SAAS,kCAAkC,CACzC,GAAwB;IAExB,OAAO,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAuC,CAAC;AACzE,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\nimport type { HrTime } from '@opentelemetry/api';\nimport type {\n Accumulation,\n AccumulationRecord,\n Aggregator,\n} from '../aggregator/types';\nimport type { MetricData } from '../export/MetricData';\nimport type { InstrumentDescriptor } from '../InstrumentDescriptor';\nimport { AggregationTemporality } from '../export/AggregationTemporality';\nimport type { Maybe } from '../utils';\nimport type { MetricCollectorHandle } from './MetricCollector';\nimport { AttributeHashMap } from './HashMap';\n\n/**\n * Remembers what was presented to a specific exporter.\n */\ninterface LastReportedHistory<T extends Maybe<Accumulation>> {\n /**\n * The last accumulation of metric data.\n */\n accumulations: AttributeHashMap<T>;\n /**\n * The timestamp the data was reported.\n */\n collectionTime: HrTime;\n /**\n * The AggregationTemporality used to aggregate reports.\n */\n aggregationTemporality: AggregationTemporality;\n}\n\n/**\n * Internal interface.\n *\n * Provides unique reporting for each collector. Allows synchronous collection\n * of metrics and reports given temporality values.\n */\nexport class TemporalMetricProcessor<T extends Maybe<Accumulation>> {\n private _aggregator: Aggregator<T>;\n private _unreportedAccumulations = new Map<\n MetricCollectorHandle,\n AttributeHashMap<T>[]\n >();\n private _reportHistory = new Map<\n MetricCollectorHandle,\n LastReportedHistory<T>\n >();\n\n constructor(\n aggregator: Aggregator<T>,\n collectorHandles: MetricCollectorHandle[]\n ) {\n this._aggregator = aggregator;\n collectorHandles.forEach(handle => {\n this._unreportedAccumulations.set(handle, []);\n });\n }\n\n /**\n * Builds the {@link MetricData} streams to report against a specific MetricCollector.\n * @param collector The information of the MetricCollector.\n * @param collectors The registered collectors.\n * @param instrumentDescriptor The instrumentation descriptor that these metrics generated with.\n * @param currentAccumulations The current accumulation of metric data from instruments.\n * @param collectionTime The current collection timestamp.\n * @returns The {@link MetricData} points or `null`.\n */\n buildMetrics(\n collector: MetricCollectorHandle,\n instrumentDescriptor: InstrumentDescriptor,\n currentAccumulations: AttributeHashMap<T>,\n collectionTime: HrTime\n ): Maybe<MetricData> {\n this._stashAccumulations(currentAccumulations);\n const unreportedAccumulations =\n this._getMergedUnreportedAccumulations(collector);\n\n let result = unreportedAccumulations;\n let aggregationTemporality: AggregationTemporality;\n // Check our last report time.\n if (this._reportHistory.has(collector)) {\n const last = this._reportHistory.get(collector)!;\n const lastCollectionTime = last.collectionTime;\n aggregationTemporality = last.aggregationTemporality;\n\n // Use aggregation temporality + instrument to determine if we do a merge or a diff of\n // previous. We have the following four scenarios:\n // 1. Cumulative Aggregation (temporality) + Delta recording (sync instrument).\n // Here we merge with our last record to get a cumulative aggregation.\n // 2. Cumulative Aggregation + Cumulative recording (async instrument).\n // Cumulative records are converted to delta recording with DeltaMetricProcessor.\n // Here we merge with our last record to get a cumulative aggregation.\n // 3. Delta Aggregation + Delta recording\n // Calibrate the startTime of metric streams to be the reader's lastCollectionTime.\n // 4. Delta Aggregation + Cumulative recording.\n // Cumulative records are converted to delta recording with DeltaMetricProcessor.\n // Calibrate the startTime of metric streams to be the reader's lastCollectionTime.\n if (aggregationTemporality === AggregationTemporality.CUMULATIVE) {\n // We need to make sure the current delta recording gets merged into the previous cumulative\n // for the next cumulative recording.\n result = TemporalMetricProcessor.merge(\n last.accumulations,\n unreportedAccumulations,\n this._aggregator\n );\n } else {\n result = TemporalMetricProcessor.calibrateStartTime(\n last.accumulations,\n unreportedAccumulations,\n lastCollectionTime\n );\n }\n } else {\n // Call into user code to select aggregation temporality for the instrument.\n aggregationTemporality = collector.selectAggregationTemporality(\n instrumentDescriptor.type\n );\n }\n\n // Update last reported (cumulative) accumulation.\n this._reportHistory.set(collector, {\n accumulations: result,\n collectionTime,\n aggregationTemporality,\n });\n\n const accumulationRecords = AttributesMapToAccumulationRecords(result);\n\n // do not convert to metric data if there is nothing to convert.\n if (accumulationRecords.length === 0) {\n return undefined;\n }\n\n return this._aggregator.toMetricData(\n instrumentDescriptor,\n aggregationTemporality,\n accumulationRecords,\n /* endTime */ collectionTime\n );\n }\n\n private _stashAccumulations(currentAccumulation: AttributeHashMap<T>) {\n const registeredCollectors = this._unreportedAccumulations.keys();\n for (const collector of registeredCollectors) {\n let stash = this._unreportedAccumulations.get(collector);\n if (stash === undefined) {\n stash = [];\n this._unreportedAccumulations.set(collector, stash);\n }\n stash.push(currentAccumulation);\n }\n }\n\n private _getMergedUnreportedAccumulations(collector: MetricCollectorHandle) {\n let result = new AttributeHashMap<T>();\n const unreportedList = this._unreportedAccumulations.get(collector);\n this._unreportedAccumulations.set(collector, []);\n if (unreportedList === undefined) {\n return result;\n }\n for (const it of unreportedList) {\n result = TemporalMetricProcessor.merge(result, it, this._aggregator);\n }\n return result;\n }\n\n static merge<T extends Maybe<Accumulation>>(\n last: AttributeHashMap<T>,\n current: AttributeHashMap<T>,\n aggregator: Aggregator<T>\n ) {\n const result = last;\n const iterator = current.entries();\n let next = iterator.next();\n while (next.done !== true) {\n const [key, record, hash] = next.value;\n if (last.has(key, hash)) {\n const lastAccumulation = last.get(key, hash);\n // last.has() returned true, lastAccumulation is present.\n const accumulation = aggregator.merge(lastAccumulation!, record);\n result.set(key, accumulation, hash);\n } else {\n result.set(key, record, hash);\n }\n\n next = iterator.next();\n }\n return result;\n }\n\n /**\n * Calibrate the reported metric streams' startTime to lastCollectionTime. Leaves\n * the new stream to be the initial observation time unchanged.\n */\n static calibrateStartTime<T extends Maybe<Accumulation>>(\n last: AttributeHashMap<T>,\n current: AttributeHashMap<T>,\n lastCollectionTime: HrTime\n ) {\n for (const [key, hash] of last.keys()) {\n const currentAccumulation = current.get(key, hash);\n currentAccumulation?.setStartTime(lastCollectionTime);\n }\n return current;\n }\n}\n\n// TypeScript complains about converting 3 elements tuple to AccumulationRecord<T>.\nfunction AttributesMapToAccumulationRecords<T>(\n map: AttributeHashMap<T>\n): AccumulationRecord<T>[] {\n return Array.from(map.entries()) as unknown as AccumulationRecord<T>[];\n}\n"]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.
|
|
1
|
+
export declare const VERSION = "2.8.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '2.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,4DAA4D;AAC5D,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC","sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n */\n\n// this is autogenerated file, see scripts/version-update.js\nexport const VERSION = '2.8.0';\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { MeterProvider as IMeterProvider, Meter as IMeter, MeterOptions } from '@opentelemetry/api';
|
|
2
2
|
import type { Resource } from '@opentelemetry/resources';
|
|
3
|
-
import type
|
|
3
|
+
import { type IMetricReader } from './export/MetricReader';
|
|
4
4
|
import type { ForceFlushOptions, ShutdownOptions } from './types';
|
|
5
5
|
import type { ViewOptions } from './view/View';
|
|
6
6
|
/**
|
|
@@ -11,6 +11,11 @@ export interface MeterProviderOptions {
|
|
|
11
11
|
resource?: Resource;
|
|
12
12
|
views?: ViewOptions[];
|
|
13
13
|
readers?: IMetricReader[];
|
|
14
|
+
/**
|
|
15
|
+
* Whether to enable SDK metrics for this meter provider.
|
|
16
|
+
* @experimental This option is experimental and is subject to breaking changes in minor releases.
|
|
17
|
+
*/
|
|
18
|
+
sdkMetricsEnabled?: boolean;
|
|
14
19
|
}
|
|
15
20
|
/**
|
|
16
21
|
* This class implements the {@link MeterProvider} interface.
|