-
Notifications
You must be signed in to change notification settings - Fork 881
[Exporter.Prometheus] Possibility to disable otel_scope attributes #5725
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requesthelp wantedGood for taking. Extra help will be provided by maintainersGood for taking. Extra help will be provided by maintainerspkg:OpenTelemetry.Exporter.Prometheus.AspNetCoreIssues related to OpenTelemetry.Exporter.Prometheus.AspNetCore NuGet packageIssues related to OpenTelemetry.Exporter.Prometheus.AspNetCore NuGet packagepkg:OpenTelemetry.Exporter.Prometheus.HttpListenerIssues related to OpenTelemetry.Exporter.Prometheus.HttpListener NuGet packageIssues related to OpenTelemetry.Exporter.Prometheus.HttpListener NuGet package
Milestone
Description
Fixes #3972
Changes
Add instrument scope info and version to Prometheus exporter as per https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/compatibility/prometheus_and_openmetrics.md#instrumentation-scope-1
Scope info is automatically added to the Prometheus exporters.
Before this change:
# TYPE MyFruitCounter_total counter MyFruitCounter_total{color="red",name="apple"} 66 1702578315791 MyFruitCounter_total{color="yellow",name="lemon"} 77 1702578315791 MyFruitCounter_total{color="green",name="apple"} 22 1702578315791 # EOFAfter (with no
Acceptheader):# TYPE otel_scope_info info # HELP otel_scope_info Scope metadata otel_scope_info{otel_scope_name="MyCompany.MyProduct.MyLibrary"} 1 # TYPE MyFruitCounter_total counter MyFruitCounter_total{otel_scope_name="MyCompany.MyProduct.MyLibrary",otel_scope_version="1.0",color="red",name="apple"} 102 1702577575197 MyFruitCounter_total{otel_scope_name="MyCompany.MyProduct.MyLibrary",otel_scope_version="1.0",color="yellow",name="lemon"} 119 1702577575197 MyFruitCounter_total{otel_scope_name="MyCompany.MyProduct.MyLibrary",otel_scope_version="1.0",color="green",name="apple"} 34 1702577575197 # EOFAfter (when passing
Accept: application/openmetrics-text:# TYPE otel_scope_info info # HELP otel_scope_info Scope metadata otel_scope_info{otel_scope_name="MyCompany.MyProduct.MyLibrary"} 1 # TYPE MyFruitCounter_total counter MyFruitCounter_total{otel_scope_name="MyCompany.MyProduct.MyLibrary",otel_scope_version="1.0",color="red",name="apple"} 4692 1702577811.302 MyFruitCounter_total{otel_scope_name="MyCompany.MyProduct.MyLibrary",otel_scope_version="1.0",color="yellow",name="lemon"} 5474 1702577811.302 MyFruitCounter_total{otel_scope_name="MyCompany.MyProduct.MyLibrary",otel_scope_version="1.0",color="green",name="apple"} 1564 1702577811.302 # EOFMerge requirement checklist
- CONTRIBUTING guidelines followed (nullable enabled, static analysis, etc.)
- Unit tests added/updated
- Appropriate
CHANGELOG.mdfiles updated for non-trivial changes- Changes in public API reviewed (if applicable)
Hi guys, It’s cool, of course, that you added this a feature, but looks like that manuals describes the ability for the exporter to disable this feature
Prometheus exporters SHOULD provide a configuration option to disable the otel_scope_info metric and otel_scope_ labels.
Originally posted by @ezhdn in #5086 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedGood for taking. Extra help will be provided by maintainersGood for taking. Extra help will be provided by maintainerspkg:OpenTelemetry.Exporter.Prometheus.AspNetCoreIssues related to OpenTelemetry.Exporter.Prometheus.AspNetCore NuGet packageIssues related to OpenTelemetry.Exporter.Prometheus.AspNetCore NuGet packagepkg:OpenTelemetry.Exporter.Prometheus.HttpListenerIssues related to OpenTelemetry.Exporter.Prometheus.HttpListener NuGet packageIssues related to OpenTelemetry.Exporter.Prometheus.HttpListener NuGet package