open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
3.07k stars 2.37k forks source link

[connector/count] count metrics value always 1 #35115

Closed jxplus closed 1 month ago

jxplus commented 1 month ago

Component(s)

connector/count

Describe the issue you're reporting

version : count-connect v0.108.0

i use count-connector to statistic logs-to-metric, i send logs number 2890,but the value is always 1, like this: ··· app_log_count{,level="DEBUG"} 1 app_log_count{level="INFO"} 1 app_log_count{level="ERROR"} 1 ···

my config is: ··· connectors: count/log: logs: app.log.count: description: The number of logs from each level. attributes:

github-actions[bot] commented 1 month ago

Pinging code owners:

djaglowski commented 1 month ago

This connector emits values with delta temporarily, which sometimes is mistaken as being unintentional. You may be able to use the deltatocumulative processor to aggregate the metrics.

jxplus commented 1 month ago

This connector emits values with delta temporarily, which sometimes is mistaken as being unintentional. You may be able to use the deltatocumulative processor to aggregate the metrics.

ok,thanks,I will try it。