system.Diagnostics.Metrics doesn't add my counter in the instrument in case of dotnet MAUI applicaiton when running android emulator using OpenTelemetry #21165
Labels
platform/android 🤖
platform/windows 🪟
s/needs-repro
Attach a solution or code which reproduces the issue
s/triaged
Issue has been reviewed
t/bug
Something isn't working
Description
I created a .NET MAUI application and recording metrics for both android and Windows application.
I am using this code below.
var meterProvider = Sdk.CreateMeterProviderBuilder()
.AddMeter("MyCompany.MyProduct.MyLibrary")
.ConfigureResource(resource => resource.AddService("Test"))
.AddConsoleExporter()
.AddPrometheusHttpListener(
options => options.UriPrefixes = new string[] { $"http://localhost:{9188}/" })
.Build();
MyFruitCounter.Add(1, new("name", "apple"), new("color", "red"));
MyFruitCounter.Add(2, new("name", "lemon"), new("color", "yellow"));
MyFruitCounter.Add(1, new("name", "lemon"), new("color", "yellow"));
MyFruitCounter.Add(2, new("name", "apple"), new("color", "green"));
Above is the code provide (taken) from the documentation for opentelemetry in .Net Version 8.0. I tried to run this in the android emulator and counter is enabled = false and true if I run the application as windows application.
Therefore, i would like to report this issue. I
when I am running in android emulator in google pixel 5 with .Net 8.0. with opentelemetry to record the metric.
When i am running as an windows application
Steps to Reproduce
No response
Link to public reproduction project repository
No response
Version with bug
8.0.3 GA
Is this a regression from previous behavior?
No, this is something new
Last version that worked well
Unknown/Other
Affected platforms
Android, Windows
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: