Open
Description
Now to extract _sum
and count
for histogram metics it is need to make following changes in configuration, for example for jvm_gc_collection_seconds
metric
sumologic:
metrics:
collector:
otelcol:
config:
merge:
processors:
transform/extract_sum_count_from_histograms:
error_mode: ignore
metric_statements:
- context: metric
statements:
- extract_sum_metric(true) where IsMatch(name, "^(jvm_gc_collection_seconds|apiserver_request_duration_seconds|coredns_dns_request_duration_seconds|kubelet_runtime_operations_duration_seconds)$")
- extract_count_metric(true) where IsMatch(name, "^(jvm_gc_collection_seconds|apiserver_request_duration_seconds|coredns_dns_request_duration_seconds|kubelet_runtime_operations_duration_seconds)$")
metadata:
metrics:
config:
merge:
processors:
filter/drop_unnecessary_metrics:
error_mode: ignore
metrics:
metric:
- resource.attributes["job"] != "pod-annotations" and IsMatch(name, "scrape_.*")
- IsMatch(name, "^(jvm_gc_collection_seconds|apiserver_request_duration_seconds|coredns_dns_request_duration_seconds|kubelet_runtime_operations_duration_seconds)$")
Related pull request in which this basic support for histogram metrics was added: #3192
I would be good to have easier mechanism to extract _sum
and _count` for example by providing list of regular expressions for histogram metrics in the values.yaml