Open
Description
Component(s)
exporter/exporterhelper
What happened?
Describe the bug
When using sending_queue with the exporter, the logic in metric_batch.go that splits metricRequest based on batch size causes the name field of some metrics to disappear after the split, not all of them.
Steps to reproduce
- Configure an exporter to use sending_queue.
- Send a batch of metrics large enough to trigger the metricRequest splitting logic in metric_batch.go.
- Observe the metricRequest objects after they have been split.
What did you expect to see?
I expected the name field of all metrics within the split metricRequest objects to be preserved, consistent with the original metricRequest.
What did you see instead?
The name field of some metrics within the newly created metricRequest objects after the split was empty or null, effectively causing those specific metric names to disappear.
Collector version
v0.126.0
Environment information
Environment
OpenTelemetry Collector configuration
receivers:
otlp:
protocols:
grpc:
endpoint: localhost:4317
http:
endpoint: localhost:4318
exporters:
clickhouse:
endpoint: tcp://localhost:9000
sending_queue:
batch:
flush_timeout: 2s
max_size: 4
min_size: 2
enabled: true
queue_size: 10000
sizer: items
Log output
Additional context
No response