0.302.0
💥 Breaking Changes
- chore(configuration, sdk-config)!: rename the
@opentelemetry/configurationpackage to@opentelemetry/sdk-config#7284 @trentm - fix(sampler-composite)!: update to 'SamplingIntent#adjustedCountReliable' and drop traceId from
getSamplingIntentper spec change #7365 @trentm
🚀 Features
- feat(sdk-node): a
customizeConfigoption tostartNodeSdk()#7375 @trentm - feat(sdk-node): support passing in custom component providers #7352 @trentm
- feat(sdk-config): export all generated schema types #7351 @trentm
- feat(sdk-node): wire up
always_recordin declarative config to create an AlwaysRecord sampler #7322 @trentm - feat(sdk-config): add support for parsing
file_format: "1.2"declarative config files- See the OTel Configuration v1.2.0 release notes: https://github.com/open-telemetry/opentelemetry-configuration/releases/tag/v1.2.0
- feat(api-config): add
@opentelemetry/api-config, an experimental package with the declarative-configConfigProviderandConfigPropertiestypes and a globalconfigaccessor #6868 @mwear @trentm - feat(sdk-config): add
createConfigProvider()to build aConfigProviderover the parsed configuration model #6868 @mwear @trentm - feat(instrumentation): support the
instrumentation/developmentsection of declarative config.Instrumentation#setConfigProvider()is an optional method thatregisterInstrumentations()calls on each instrumentation, alongsidesetTracerProvider()and friends. ThereadDeclarativeConfig()util reads an instrumentation's own block (instrumentation/development.js.<name>) and the sharedgeneralblock through a typed reader, mapping snake_case config properties onto config fields. Unrecognized properties and type mismatches warn #6868 @mwear @trentm - feat(instrumentation-http): read declarative config via
setConfigProvider(), mapping theinstrumentation/development.js.@opentelemetry/instrumentation-httpproperties it supports and thegeneral.http.{client,server}.*_captured_headersproperties ontoheadersToSpanAttributes#6868 @mwear @trentm - feat(sdk-node): register a global
ConfigProviderfrom the config file, so instrumentations registered withregisterInstrumentations()receive it #6868 @mwear @trentm
🐛 Bug Fixes
- fix(exporter-trace-otlp-http, exporter-logs-otlp-http, exporter-metrics-otlp-http): use the
otlp_http_json_*_exporterotel.component.typevalues for JSON exporters (#7286) @shehjaddev
📚 Documentation
- docs(sdk-node): document usage of
startNodeSdk()#7412 @trentm- This is an alternative to, and eventual replacement of,
new NodeSDK()that supports declarative config and cleans up some of the programmatic config options.
- This is an alternative to, and eventual replacement of,
- docs(instrumentation): say on
InstrumentationBase#_enabledthat browser subclasses set it themselves, since every platform gets the Node.js typings #7389 @overbalance
🏠 Internal
- chore(sdk-node): export StartSdkOptions type for "startNodeSdk"
- chore(opentelemetry-browser-detector): Soft-deprecate
@opentelemetry/opentelemetry-browser-detector@hectorhdzg- The browser detector in this repository is being (soft-)deprecated in favor of
@opentelemetry/browser-sdk/browser-detector. "Soft" deprecation means the export has been marked with@deprecatedand a notice added to the README, but the package will not yet benpm deprecate'd to avoid loud notice to users while opentelemetry-browser.git is still in heavy development.
- The browser detector in this repository is being (soft-)deprecated in favor of
- refactor(sdk-node): internally use a ComponentProvider implementation for creating SDK components from a declarative config #7269 @trentm
- test: use erasable syntax on type assertions #7311 @legendecas
- fix(otlp-transformer): omit proto3 defalt value fields #7316 @legendecas
- refactor(otlp-transformer): decode hex IDs directly into the protobuf buffer #7369 @legendecas
- perf(otlp-transformer): check and copy short ASCII strings in one pass in
ProtobufWriter#writeString#7385 @daniellockyer - perf(otlp-transformer): add a fast path for single-byte varints in
ProtobufWriter#writeVarint#7387 @daniellockyer - perf(otlp-transformer): decode hex IDs with a lookup table #7386 @daniellockyer