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] No Export since v1.11 on net9-android #6173

Open
stratdev3 opened this issue Mar 5, 2025 · 1 comment
Open

[bug] No Export since v1.11 on net9-android #6173

stratdev3 opened this issue Mar 5, 2025 · 1 comment
Labels
bug Something isn't working needs-triage New issues which have not been classified or triaged by a community member pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package

Comments

@stratdev3
Copy link

stratdev3 commented Mar 5, 2025

Package

OpenTelemetry

Package Version

Package Name Version
OpenTelemetry.Exporter.OpenTelemetryProtocol 1.11.0

Runtime Version

net9-android

Description

Hi,

I have a regression with the OpenTelemetry.Exporter.OpenTelemetryProtocol version >= 1.11.0 which occur on the net9-android runtime. The previous version v1.10.0 is working.

Data are no longer exported to the destination.

Steps to Reproduce

MeterProvider meterProvider = 
                 Sdk.CreateMeterProviderBuilder()
                    .AddMeter("*")
                    .SetResourceBuilder(
                        ResourceBuilder
                              .CreateEmpty()
                              .AddService("screenshootservice", "0.1")
                    )
                    .AddOtlpExporter((exporterOptions, metricReaderOptions) => {
                        exporterOptions.Endpoint = new Uri("http://localhost:4317");
                        metricReaderOptions.TemporalityPreference = MetricReaderTemporalityPreference.Delta;
                        metricReaderOptions.PeriodicExportingMetricReaderOptions.ExportIntervalMilliseconds = 10_000;
                    })
                    .AddConsoleExporter((consoleExporterOptions, metricReaderOptions) => {
                        metricReaderOptions.PeriodicExportingMetricReaderOptions.ExportIntervalMilliseconds = 10_000;
                    })
                    .Build();

Meter meter = new("screenshootservice", "0.1);

List<KeyValuePair<string, object>> tags = new() {
    new KeyValuePair<string, object>("host", "example"),
};
ObservableGauge<int> counterFps = meter.CreateObservableGauge("screenshootservice.fps",
                                                              () => new Measurement<int>(30, tags),
                                                              "fps",
                                                              "screenshootservice fps");

Expected Result

The metrics should be exporter to the endpoint (a local instance of the opentelemetry-collector-contrib in debug verbose mode)

Actual Result

The metrics are not exported to the endpoint (a local instance of the opentelemetry-collector-contrib in debug verbose mode)

Additional Context

I add AddConsoleExporter() so i confirm the metrics are displayed in the console.
They are just not exported to endpoint.

  • When i use net9, metrics are exported to endpoint.
  • When i use the v1.10, metrics are exported to endpoint.

The issue seems to be related with v1.11 and net9-android.

Thanks

@stratdev3 stratdev3 added bug Something isn't working needs-triage New issues which have not been classified or triaged by a community member labels Mar 5, 2025
@github-actions github-actions bot added the pkg:OpenTelemetry Issues related to OpenTelemetry NuGet package label Mar 5, 2025
@TimothyMothra
Copy link
Contributor

Can you please collect the self diagnostic logs and share? That would help us understand if an error is happening at runtime.
https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry/README.md#self-diagnostics

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 Issues related to OpenTelemetry NuGet package
Projects
None yet
Development

No branches or pull requests

2 participants