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

system.Diagnostics.Metrics doesn't add my counter in the instrument in case of dotnet MAUI applicaiton when running android emulator using OpenTelemetry #21165

Closed
SVerma799 opened this issue Mar 12, 2024 · 1 comment
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

Comments

@SVerma799
Copy link

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.
image

When i am running as an windows application
image

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

@SVerma799 SVerma799 added the t/bug Something isn't working label Mar 12, 2024
@SVerma799 SVerma799 changed the title ystem.Diagnostics.Metrics does add my counter in the instrument in case of dotnet MAUI applicaiton when running android emulator using OpenTelemetry system.Diagnostics.Metrics does add my counter in the instrument in case of dotnet MAUI applicaiton when running android emulator using OpenTelemetry Mar 12, 2024
@PureWeen PureWeen changed the title system.Diagnostics.Metrics does add my counter in the instrument in case of dotnet MAUI applicaiton when running android emulator using OpenTelemetry system.Diagnostics.Metrics doesn't add my counter in the instrument in case of dotnet MAUI applicaiton when running android emulator using OpenTelemetry Mar 13, 2024
@PureWeen PureWeen added s/needs-repro Attach a solution or code which reproduces the issue platform/windows 🪟 platform/android 🤖 labels Mar 13, 2024
@RoiChen001 RoiChen001 added the s/triaged Issue has been reviewed label Mar 15, 2024
@dotnet-policy-service dotnet-policy-service bot added the s/no-recent-activity Issue has had no recent activity label Mar 20, 2024
Copy link
Contributor

This issue has been automatically marked as stale because it has been marked as requiring author feedback to reproduce the issue but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 24, 2024
@dotnet-policy-service dotnet-policy-service bot removed the s/no-recent-activity Issue has had no recent activity label Apr 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
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
Projects
None yet
Development

No branches or pull requests

3 participants