Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Otel Exponential Histogram Metrics are getting dropped while sending using Prometheusremotwrite exporter #34917

Closed
Shindek77 opened this issue Aug 29, 2024 · 10 comments
Assignees
Labels

Comments

@Shindek77
Copy link

Shindek77 commented Aug 29, 2024

Component(s)

exporter/prometheusremotewrite

Describe the issue you're reporting

Actually, We are getting Metrics data which type is Exponential Histogram, But when we are trying to send that metric data to backend tools like Mimir, VictoriaMetrics etc using promtheusremotewrite exporter, It getting dropped even though as per one below issue and PR prometheusremotewriteexporter support conversion of OTel Exponential Histogram to Prometheus Native Histogram.
#17370
#16207

code:

exporters:
   prometheusremotewrite/vm-test:
        endpoint: http://victoria-metrics-cluster-vminsert.metrics-ns.svc.cluster.local:8480/insert/1200/prometheus
        resource_to_telemetry_conversion:
          enabled: true
        timeout: 30s
        tls:
          insecure: true
service:
   extensions:
    - health_check
    pipelines:
      metrics:
        exporters:
        -  prometheusremotewrite/vm-test
        processors:
        - batch
        receivers:
        - otlp

Please let me know why they are not getting converted...is there parameter that I need to set??

@Shindek77 Shindek77 added the needs triage New item requiring triage label Aug 29, 2024
Copy link
Contributor

Pinging code owners:

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

@ArthurSens
Copy link
Member

I believe this issue is similar to #33703, just for a different exporter.

The problem is that OTLP Histograms don't translate well to Prometheus classic histogram. We might want to take a look in translating it to Prometheus Native Histograms instead, while keeping an eye into implications (e.g. Prometheus doesn't support Native Histograms in text format yet)

@Shindek77
Copy link
Author

Hello @ArthurSens , Thanks for your reply....But as per PR #17370
its already support conversion of OTel Exponential Histogram to Prometheus Native Histogram. Then in our case why its not happening when we are using prometheusremotewrite exporter to send data to VictoriaMetrics in backend as follows:
exporters:
prometheusremotewrite/vm-test:
endpoint: http://victoria-metrics-cluster-vminsert.metrics-ns.svc.cluster.local:8480/insert/1200/prometheus
resource_to_telemetry_conversion:
enabled: true
timeout: 30s
tls:
insecure: true
or is there any other flag that we need to set on prometheusremotewrite exporter for this conversion

Copy link
Contributor

github-actions bot commented Nov 4, 2024

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.

@github-actions github-actions bot added the Stale label Nov 4, 2024
@dashpole
Copy link
Contributor

dashpole commented Nov 11, 2024

I believe this will be solved by PRW 2.0, which is tracked in #33661. I don't think PRW 1.0 supports exponential histograms (in https://prometheus.io/docs/specs/remote_write_spec/, the value is always a double).

@github-actions github-actions bot removed the Stale label Nov 12, 2024
@bboreham
Copy link
Contributor

While the Prometheus Remote-Write Specification 1.0 does not mention native histograms, the data structures were added in Prometheus code two years ago, merged to main and released behind a feature flag.

It does not need Remote-Write 2.0.

@dashpole dashpole added enhancement New feature or request good first issue Good for newcomers and removed good first issue Good for newcomers labels Nov 19, 2024
@dashpole dashpole changed the title Otel Exponential Histogram Metrics are getting dropped while sending using Prometheusremotwrite exporter Prometheus Remote Write 1.0 Exporter supports exponential histograms Nov 19, 2024
@bboreham
Copy link
Contributor

Can someone explain why #17370, which at least in the title does what is asked for, is not working for OP ?

@dashpole
Copy link
Contributor

My bad. I forgot we implemented that.

It getting dropped even though as per one below issue and PR prometheusremotewriteexporter support conversion of OTel Exponential Histogram to Prometheus Native Histogram.

@Shindek77 are you seeing any errors logged, or are they dropped silently?

@dashpole dashpole changed the title Prometheus Remote Write 1.0 Exporter supports exponential histograms Otel Exponential Histogram Metrics are getting dropped while sending using Prometheusremotwrite exporter Nov 19, 2024
@dashpole dashpole added bug Something isn't working and removed enhancement New feature or request labels Nov 19, 2024
@Shindek77
Copy link
Author

My bad. I forgot we implemented that.

It getting dropped even though as per one below issue and PR prometheusremotewriteexporter support conversion of OTel Exponential Histogram to Prometheus Native Histogram.

@Shindek77 are you seeing any errors logged, or are they dropped silently?

@dashpole , on Opentelemetry side we was not getting any error but on vminsert of VictoriaMetrics we was getting error as below as it was not supporting Exponential Histogram Metrics type:
{"ts":"2024-11-18T06:40:37.212Z","level":"warn","caller":"VictoriaMetrics/lib/protoparser/opentelemetry/stream/streamparser.go:89","msg":"unsupported type for metric \"my_exponential_histogram\""}

@dashpole
Copy link
Contributor

dashpole commented Dec 2, 2024

Ah, you probably should follow along here then: VictoriaMetrics/VictoriaMetrics#3733. If you just want to silence the errors, you can filter out the metrics in question using the filter processor, or (I think) the transform processor.

@dashpole dashpole closed this as completed Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants