0.200.0
Summary
- The minimum supported Node.js has been raised to
^18.19.0 || >=20.6.0
. This means that support for Node.js 14 and 16 has been dropped. - The minimum supported TypeScript version has been raised to 5.0.4.
- The compilation target for transpiled TypeScript has been raised to ES2022 (from ES2017).
- The public interface has changed
- for notes on migrating to 2.x / 0.200.x see the upgrade guide
- Only stable versions
2.0.0
are compatible with this release
💥 Breaking Change
- feat(exporter-prometheus)!: stop the using
type
field to enforce naming conventions #5291 @chancancode- Any non-monotonic sums will now be treated as counters and will therefore include the
_total
suffix.
- Any non-monotonic sums will now be treated as counters and will therefore include the
- feat(shim-opencenus)!: stop mapping removed Instrument
type
to OpenTelemetry metrics #5291 @chancancode- The internal OpenTelemetry data model dropped the concept of instrument type on exported metrics, therefore mapping it is not necessary anymore.
- feat(instrumentation-fetch)!: passthrough original response to
applyCustomAttributes
hook #5281 @chancancode- Previously, the fetch instrumentation code unconditionally clones every
fetch()
response in order to preserve the ability for theapplyCustomAttributes
hook to consume the response body. This is fundamentally unsound, as it forces the browser to buffer and retain the response body until it is fully received and read, which crates unnecessary memory pressure on large or long-running response streams. In extreme cases, this is effectively a memory leak and can cause the browser tab to crash. If your use case forapplyCustomAttributes
requires access to the response body, please chime in on #5293.
- Previously, the fetch instrumentation code unconditionally clones every
- chore!: Raise the minimum supported Node.js version to
^18.19.0 || >=20.6.0
. Support for Node.js 14, 16, and early minor versions of 18 and 20 have been dropped. This applies to all packages except the 'api' and 'semantic-conventions' packages. #5395 @trentm - feat(sdk-node)!: use
IMetricReader
overMetricReader
#5311- (user-facing):
NodeSDKConfiguration
now provides the more generalIMetricReader
type overMetricReader
- (user-facing):
- feat(exporter-metrics-otlp-http)!: do not read environment variables from window in browsers #5473 @pichlermarc
- (user-facing): all configuration previously possible via
window.OTEL_*
is now not supported anymore, please pass configuration options to constructors instead. - Note: Node.js environment variable configuration continues to work as-is.
- (user-facing): all configuration previously possible via
- feat(sdk-logs)!: do not read environment variables from window in browsers #5472 @pichlermarc
- (user-facing): all configuration previously possible via
window.OTEL_*
is now not supported anymore, please pass configuration options to constructors instead.- Note: Node.js environment variable configuration continues to work as-is.
- (user-facing): all configuration previously possible via
🚀 (Enhancement)
- feat(instrumentation-fetch): add a
requestHook
option #5380 - feat(instrumentation): re-export initialize function from import-in-the-middle #5123
- feat(sdk-node): lower diagnostic level #5360 @cjihrig
- feat(exporter-prometheus): add additional attributes option #5317 @marius-a-mueller
- Add
withResourceConstantLabels
option toExporterConfig
. It can be used to define a regex pattern to choose which resource attributes will be used as static labels on the metrics. The default is to not set any static labels.
- Add
🐛 (Bug Fix)
- fix(instrumentation-grpc): monitor error events with events.errorMonitor #5369 @cjihrig
- fix(exporter-metrics-otlp-http): browser OTLPMetricExporter was not passing config to OTLPMetricExporterBase super class #5331 @trentm
- fix(instrumentation-fetch, instrumentation-xhr): Ignore network events with zero-timings #5332 @chancancode
- fix(exporter-logs/trace-otlp-grpc): fix error for missing dependency otlp-exporter-base #5412 @JamieDanielson
🏠 (Internal)
- chore(instrumentation-grpc): remove unused findIndex() function #5372 @cjihrig
- refactor(otlp-exporter-base): remove unnecessary isNaN() checks #5374 @cjihrig
- refactor(exporter-prometheus): remove unnecessary isNaN() check #5377 @cjihrig
- refactor(sdk-node): move code to auto-instantiate propagators into utils #5355 @pichlermarc
- chore: unpin
@opentelemetry/semantic-conventions
dep to allow better de-duplication in installs #5439 @trentm - refactor(instrumentation-http): migrate away from getEnv() #5469 @pichlermarc
- refactor(sdk-node): migrate away from getEnv() #5475 @pichlermarc