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

[bug] Prometheus Exporter does not expose Meter Tags and Version #5836

Open
ProbablePrime opened this issue Sep 15, 2024 · 0 comments
Open
Labels
bug Something isn't working needs-triage New issues which have not been classified or triaged by a community member pkg:OpenTelemetry.Exporter.Prometheus.HttpListener Issues related to OpenTelemetry.Exporter.Prometheus.HttpListener NuGet package

Comments

@ProbablePrime
Copy link

ProbablePrime commented Sep 15, 2024

Package

OpenTelemetry.Exporter.Prometheus.HttpListener

Package Version

	<PackageReference Include="OpenTelemetry.Exporter.Prometheus.AspNetCore" Version="1.9.0-beta.2" />
	<PackageReference Include="OpenTelemetry.Exporter.Prometheus.HttpListener" Version="1.9.0-beta.2" />
	<PackageReference Include="OpenTelemetry.Extensions.Hosting" Version="1.9.0" />
	<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" Version="1.9.0" />
	<PackageReference Include="OpenTelemetry.Instrumentation.Process" Version="0.5.0-beta.6" />
	<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" Version="1.9.0" />
    <PackageReference Include="System.Diagnostics.DiagnosticSource" Version="9.0.0-rc.1.24431.7" />

Runtime Version

net8.0

Description

When creating a System.Diagnostics.Metrics.Meter with a version and tags, e.g.

var meterTags = new KeyValuePair<string, object>[]
        {
            new KeyValuePair<string, object>("meterKey1", "value1"),
            new KeyValuePair<string, object>("meterKey2", "value2"),
        };
var meter = meterFactory.Create("Test", "1.0.0", meterTags);

The version and tags provided do not show up in Prometheus exported metrics.

Steps to Reproduce

I have a branch of this Repository with one of the integration tests edited to show this issue, you can find the branch here: main...ProbablePrime:opentelemetry-dotnet:prime/tests/meter-tags

Expected Result

I expect, the Meter sourced tags to be included in the output. This is shown in the test case expected data changes.

E.g. counter_double_bytes_total{{otel_scope_name='{MeterName}',otel_scope_version='{MeterVersion}',**meterKey1='value1',meterKey2='value2'**,key1='value1',key2='value2'}}

Actual Result

It results in a failed test.
image

Additional Context

I apologize for any terminology goofs, here. I'm brand new to the OpenTelemetry scene. Please ask questions if you are unsure.

This is based on:

Which may have additional information to help.

Thank you!

@ProbablePrime ProbablePrime added bug Something isn't working needs-triage New issues which have not been classified or triaged by a community member labels Sep 15, 2024
@github-actions github-actions bot added the pkg:OpenTelemetry.Exporter.Prometheus.HttpListener Issues related to OpenTelemetry.Exporter.Prometheus.HttpListener NuGet package label Sep 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage New issues which have not been classified or triaged by a community member pkg:OpenTelemetry.Exporter.Prometheus.HttpListener Issues related to OpenTelemetry.Exporter.Prometheus.HttpListener NuGet package
Projects
None yet
Development

No branches or pull requests

1 participant