open-telemetry / opentelemetry-collector-contrib

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

Using AGGREGATION_ TEMPORARITY_ DELTA does not support histogram metrics #29659

Closed shicli closed 8 months ago

shicli commented 11 months ago

Component(s)

connector/spanmetrics

What happened?

Description

I am using AGGREGATION TEMPORARITY DELTA, but I found that only the calls indicator was generated and there was no histogram indicator. I am confused about this. The reason why I chose DELTA is because CUMULATIV generates too many metrics, so I hope to use DELTA to clean up old data, but in reality, there is no duration data generation. I don't know if I misunderstood it, and I hope you can help me

Steps to Reproduce

connectors:
   count:
    servicegraph:
      latency_histogram_buckets: [5ms, 30ms, 100ms, 500ms, 2s]
      dimensions:
        - span.kind
      #   - dimension-2
      store:
        ttl: 5s
        max_items: 5000
    spanmetrics:
      histogram:
        explicit:
          buckets: [2ms, 6ms, 10ms, 100ms, 250ms, 500ms, 2s]
      dimensions:
        # - name: http.method
        #   default: GET
        - name: http.status_code
      dimensions_cache_size: 100000
      aggregation_temporality: "AGGREGATION_TEMPORALITY_DELTA"

Expected Result

calls and duration

Actual Result

only calls

Collector version

0.88

Environment information

Environment

OS: (e.g., "Ubuntu 20.04") Compiler(if manually compiled): (e.g., "go 14.2")

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

github-actions[bot] commented 11 months ago

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

crobert-1 commented 11 months ago

Hello @shicli, can you share the full configuration of the collector that you're using? I'm unclear on whether this is a problem you're having with the spanmetrics connector, or the servicegraph connector.

shicli commented 11 months ago

`receivers: otlp: protocols: grpc: endpoint: ${env:MY_POD_IP}:4317 http: endpoint: ${env:MY_POD_IP}:4318

exporters: prometheusremotewrite: endpoint: http://thanos-receive.thanos:9090/api/v1/receive resource_to_telemetry_conversion: enabled: true target_info: enabled: true

connectors: spanmetrics: histogram: explicit: buckets: [100us, 1ms, 2ms, 6ms, 10ms, 100ms, 250ms] dimensions:

service: pipelines: traces: exporters:

shicli commented 11 months ago

@crobert-1 @albertteoh When I use "AGGREGATION-TEMPORALITY-CUMULATIVE", I generate calls, duration Sum, duration Bucket, duration_count metric is used, but when I use "AGGREGATION-TEMPORALITY-DELTA", only the calls metric is available.

jmichalek132 commented 10 months ago

As documented in the remote write exporter readme: https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/9dc0e431d52ca69324646e266139cb830d454625/exporter/prometheusremotewriteexporter/README.md?plain=1#L25 remote write exporter doesn't support detlas currently, since prometheus doesn't support ingesting deltas.

github-actions[bot] commented 8 months ago

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.