-
Notifications
You must be signed in to change notification settings - Fork 773
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
Metrics Exporters: Include Resource
Data in Labels
#3087
Comments
Prometheus Exporter spec is still experimental, and people are actively working on it. We can start incorporating the changes to the .NET Prometheus Exporter, as specs land. (Note that Prometheus Exporter package is not stable, and will not be released as stable when we release the rest of the SDK as 1.2, because the Prometheus Exporter spec is not stable. (Metric SDK spec just reached stable yesterday)) |
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/sdk_exporters/prometheus.md The Prometheus Exporter spec we'll be need to follow. |
An update on the Prometheus exporter spec front. From the spec for handling resource in prometheus exporters:
|
Any update on this ? |
I'd like to see this feature included in the Prom exporter, @cijothomas are you happy to accept a PR for this? |
yes! |
Feature Request
Using the latest OTel RCs on NuGet (1.2.0-RC3) I have the following configuration for OTel metrics in a simple ASP.NET Core + Akka.NET app:
And here's the data I see from the
/metrics
route in one instance of that application:In both the
/metrics
output and in the Prometheus UI itself, I don't see any of theResource
metadata associated with my OTel metrics - not the app name or instance id. This isn't the case for OTel tracing, which includes this data helpfully inside each individual span.It would be tremendously useful if I could have this
Resource
data associated with the metrics produced by each process.It looks like this is addressed, to some extent, in the OTel Metrics Data model and more specifically, in the Prometheus compatibility guide: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/metrics/datamodel.md#resource-attributes
Describe the solution you'd like:
Per the OTel metrics data model I referenced earlier, it would be ideal if
Resource
serviceName / instanceId values could be associated with the metrics stream from each producer in my environment.Jaeger does this inside its OTel exporter via the following:
opentelemetry-dotnet/src/OpenTelemetry.Exporter.Jaeger/JaegerExporter.cs
Lines 81 to 82 in f531391
However, the OTEL metrics data model muddies the waters a bit - it looks like it explicitly says that
Resource
attributes should not be added asMetric
attributes:I'm not sure if this refers to the internal data model of OTel or how the exporters are supposed to expose those metrics are both. Either way - I would love a solution for my
Resource
metadata to appear as queryable dimensions when building dashboards, alerts, and reports for Prometheus and any other metrics exporter.Describe alternatives you've considered.
Manually adding my own service name / instanceId metrics via Prometheus scrape configuration or custom attributes /
TagList
s that i add to each of my metrics.The text was updated successfully, but these errors were encountered: