open-telemetry / opentelemetry-dotnet

The OpenTelemetry .NET Client
https://opentelemetry.io
Apache License 2.0
3.18k stars 753 forks source link

[bug] Expected value after metric, got "#" ("INVALID") while parsing: "Resilience_polly_str#" #5847

Open sumjas opened 1 week ago

sumjas commented 1 week ago

Package

OpenTelemetry.Exporter.Prometheus.AspNetCore

Package Version

Package Name Version
OpenTelemetry.Api 1.8.0
OpenTelemetry 1.8.0
TBD TBD

Runtime Version

net6.0

Description

I'm facing a recurring issue in my deployed environments while scraping metrics using Prometheus. The error message reads: "expected value after metric, got "#" ("INVALID") while parsing: "Resilience_polly_str#"

I'm using Polly library version 8 for resiliency, which internally uses OpenTelemetry for instrumentation. The metrics are being exported using a Prometheus exporter.

Steps to Reproduce

I'm using Polly library version 8 for resiliency, which internally uses OpenTelemetry for instrumentation. The metrics are being exported using a Prometheus exporter.

Expected Result

It should export the metrics without any error.

Actual Result

"expected value after metric, got "#" ("INVALID") while parsing: "Resilience_polly_str#"

Additional Context

I am also going to raise a ticket with the Polly developer community. Please share the suggestions or workaround for this issue if you have any.

sumjas commented 1 week ago

The Prometheus version we are using - v.2.53.0

Here is the error we are seeing.

image
Kielek commented 1 week ago

I think that you missed one important part of the bug. It is Minimal, Reproducible Example. The same link is available in the bug-wizard.