Closed
Description
Describe the bug
When having more than one batchers, for example:
processors:
batch/1:
send_batch_max_size: 10000
timeout: 10s
metadata_keys: ["label1"]
metadata_cardinality_limit: 0
batch/2:
send_batch_max_size: 10000
timeout: 10s
metadata_keys: ["label2"]
metadata_cardinality_limit: 0
The metric is like:
otelcol_processor_batch_metadata_cardinality{service_instance_id="3bb678ea-b864-48a3-bc7f-ca8d5e0f9915",service_name="XXX",service_version="dev"} 1
It's not clear which value it is.
What did you expect to see?
I want to have the processor
label in the metric, and display them in two lines:
# HELP otelcol_processor_batch_metadata_cardinality Number of distinct metadata value combinations being processed
# TYPE otelcol_processor_batch_metadata_cardinality gauge
otelcol_processor_batch_metadata_cardinality{service_instance_id="3bb678ea-b864-48a3-bc7f-ca8d5e0f9915",service_name="XXX",service_version="dev", processor="batch/1"} 1
otelcol_processor_batch_metadata_cardinality{service_instance_id="3bb678ea-b864-48a3-bc7f-ca8d5e0f9915",service_name="XXX",service_version="dev", processor="batch/2"} 1
From the code, https://github.com/open-telemetry/opentelemetry-collector/blob/main/processor/batchprocessor/metrics.go#L97
It can take the value from either processor.
What version did you use?
v0.95.0