Images and binaries here: https://github.com/open-telemetry/opentelemetry-collector-releases/releases/tag/v0.151.0
End User Changelog
🛑 Breaking changes 🛑
-
cmd/builder: In the generated Collector source, thereplacestatements in the Go module will now use relative paths by default. (#15097)
We expect that this will not break existing use-cases where the generated collector is only used in an interim manner for builds. It enables the possibility of tracking the generated Collector code as a longer living artifact, allowing it to be run on any machine (whereas absolute paths will be different depending on the machine the Collector source is generated on.) We have addeddist::use_absolute_replace_pathsto go back to the absolute path behaviour in the case where there is an unforeseen use-case that requires absolute paths. -
pkg/confighttp: Stabilize framedSnappy feature gate. (#15096)
💡 Enhancements 💡
-
all: Add declarative schema support for service telemetry resource configuration. (#14411)
Theservice::telemetry::resourceconfiguration now accepts the declarative schema with explicit name/value pairs:service: telemetry: resource: schema_url: https://opentelemetry.io/schemas/1.38.0 attributes: - name: service.name value: my-collector - name: host.name value: collector-host
The legacy inline attribute map format is still supported for backward compatibility:
service: telemetry: resource: service.name: my-collector host.name: collector-host
Note:
resource.detectorsis accepted for forward compatibility but is not yet applied by the collector. -
exporter/otlp_grpc: Added theserver.addressandurl.pathattributes to metrics generated by the otlp exporter. (#14998) -
exporter/otlp_http: Added theserver.addressandurl.pathattributes to metrics generated by the otlp_http exporter. (#14998) -
pkg/config/configgrpc: AddUserAgentfield toClientConfigto allow overriding the default gRPC user-agent string. (#14686)
The otlp gRPC exporter was unconditionally setting the User-Agent via
grpc.WithUserAgent() at dial time, which takes precedence over per-call
metadata, causing any user-configured User-Agent to be silently discarded.
A dedicatedUserAgentfield has been added toClientConfigwhich, when
set, is used in the dial option directly instead of the default BuildInfo-derived string. -
pkg/config/configgrpc: Accept gRPC resolver scheme URIs in client endpoint (e.g. passthrough:///host:port) to allow control over name resolution (#14990)
After the migration to grpc.NewClient, some gRPC client components such as the OTLP
exporter experienced connection issues in dual-stack DNS environments. This can now be
fixed by using the passthrough:/// gRPC resolver scheme in the endpoint field. -
pkg/config/confignet: Add support for Windows Named Pipe (npipe) transport (#15085) -
pkg/service: Emit a warning when using the old v0.2.0 declarative config format (#15088)
🧰 Bug fixes 🧰
-
pkg/otelcol: Print components exactly once in theotelcol componentscommand (#14682)
This resolves an issue where aliased components were skipped. -
pkg/otelcol: Synchronize Collector Run and Shutdown lifecycles so that Shutdown blocks until Run completes all cleanup. (#4947)
Shutdown now blocks until Run finishes cleanup, matching http.Server semantics.
If Shutdown is called before Run, the next Run call returns nil after cleaning up
the config provider. -
pkg/pdata: Use spec-compliant string representation for NaN, Infinity, and -Infinity in Value.AsString(). (#14487) -
pkg/pprofile: Fix data corruption of resource and scope attributes after marshal-unmarshal-merge round-trip. (#15084) -
pkg/service: Non-string resource attributes in telemetry configuration now return an error instead of panicking (#15171) -
pkg/xscraperhelper: fix the merge of profiles in the profiling scraper helpers (#14790) -
receiver/otlp: Fix profiles receiver reporting its samples as spans (#15089)
API Changelog
🛑 Breaking changes 🛑
receiver/otlp:Config.Protocolsis now a named field instead of an anonymous embedded field. (#15178)
Access tocfg.GRPCandcfg.HTTPmust be updated tocfg.Protocols.GRPCandcfg.Protocols.HTTP.
🚩 Deprecations 🚩
cmd/mdatagen: TheDefaultMetricsBuilderConfigfunction is deprecated. UseNewDefaultMetricsBuilderConfiginstead. (#15165)
The generatedDefaultMetricsBuilderConfigfunction has been renamed toNewDefaultMetricsBuilderConfig
to follow Go naming conventions. The old function is kept as a deprecated wrapper and will be removed
in a future release.
💡 Enhancements 💡
-
cmd/mdatagen: Handle default values for configuration fields in generated code in mdatagen. (#14560) -
cmd/mdatagen: Add opt-in override_value support for resource_attributes config viaoverride_value_enabledflag (#15109)
Components can opt in by settingoverride_value_enabled: truein their metadata.yaml.
When enabled, per-attribute config types are generated with typedoverride_valuefields
that let users override resource attribute values in the collector configuration.
Components without the flag continue to use the sharedResourceAttributeConfigtype. -
cmd/mdatagen: Extend mdatagen config code generation to correctly handle default values for allOf embedded references (#14560) -
cmd/mdatagen: Handle string validators in generated config structs (#14807)
Supported validators includeminLength,maxLengthandpattern. -
pkg/config/configgrpc: Add aDefaultBalancerNameconstant for the name of the default load balancer (#15139)
This replaces theBalancerNamefunction. -
pkg/config/configgrpc: Accept gRPC resolver scheme URIs in client endpoint (e.g. passthrough:///host:port) to allow control over name resolution (#14990)
After the migration to grpc.NewClient, some gRPC client components such as the OTLP
exporter experienced connection issues in dual-stack DNS environments. This can now be
fixed by using the passthrough:/// gRPC resolver scheme in the endpoint field. -
pkg/exporterhelper: Added theWithAttrsoption to allow custom attributes on exporter metrics (#14998)
🧰 Bug fixes 🧰
-
cmd/mdatagen: Fix a bug in mdatagen where theallOffield was not being properly handled, resulting in incorrect generation of data models. (#15153) -
pkg/otelcol: Synchronize Collector Run and Shutdown lifecycles so that Shutdown blocks until Run completes all cleanup. (#4947)
Shutdown now blocks until Run finishes cleanup, matching http.Server semantics.
If Shutdown is called before Run, the next Run call returns nil after cleaning up
the config provider. -
pkg/pdata: Use pool-aware constructors in gRPC service handlers so top-level request structs participate in the sync.Pool lifecycle. (#14763)
The gRPC service handlers for all signal types allocated the top-level
ExportXxxServiceRequest with bare new(), bypassing the sync.Pool when
pdata.useProtoPooling is enabled. This caused objects returned to the pool
via Delete to never be retrieved. The handlers now use the pool-aware
New*() constructors.