-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Hello
Try as i might, i can not get aggregation to work and was hoping someone could lend me a hand
im using OpenTelemetry Collector to export to prometheus
custom_requests_total{Process="36748",instance="AT00240",job="JackHammer.Net",otel_scope_name="JackHammer.Net",otel_scope_schema_url="",otel_scope_version=""} 2
custom_requests_total{Process="7956",instance="AT00240",job="JackHammer.Net",otel_scope_name="JackHammer.Net",otel_scope_schema_url="",otel_scope_version=""} 2
how can i sum/aggregate the values of custom_requests_total ignoring Process in order to send only one custom_requests_total to prometheus
if i try to aggregate on Prometheus, i will surelly kill it because the processes are very shortlived creating a large number of them.
I have trying to add the counter with different attributes and transforms, but i am unable to aggregate the values.
I would realy be grateful if some one help me out.
Thank you
One example of the config (from the many variation a tryed)
receivers:
otlp:
protocols:
http:
endpoint: 127.0.0.1:4318
processors:
metricstransform:
transforms:
- include: custom_requests_total
action: update
operations:
- action: aggregate_labels
label_set: [instance, job]
aggregation_type: sum
exporters:
prometheus:
endpoint: 127.0.0.1:8889
service:
pipelines:
metrics:
receivers: [otlp]
processors: [metricstransform]
exporters: [prometheus]