Closed
Description
Component(s)
processor/metricstransform
What happened?
Description
Attempting to perform any operation that copies an exponential histogram will result in a nil pointer dereference error as the code currently calls the incorrect method on the metric.
Steps to Reproduce
Have a config that attempts an operation on an exponential histogram metric that results in a copy, such as combine
Expected Result
The metric is correctly processed and exported.
Actual Result
A nil pointer dereference error is printed to the logs.
Collector version
v0.86.0
Environment information
Environment
All
OpenTelemetry Collector configuration
processors:
metricstransform:
transforms:
- include: ^<regex_for_exponential_histogram_metric>\.(?P<new_label>.+)$
match_type: regexp
action: combine
new_name: new_metric
Log output
service/service.go:161 Everything is ready. Begin running and processing data.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x2287efb]
goroutine 51 [running]:
go.opentelemetry.io/collector/pdata/pmetric.Histogram.AggregationTemporality(...)
/go/pkg/mod/go.opentelemetry.io/collector/[email protected]/pmetric/generated_histogram.go:45
Additional context
No response