opentelemetry-dotnet
opentelemetry-dotnet copied to clipboard
[bug] No Export since v1.11 on net9-android
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
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
Closing as there is no feedback from the reporter.
same here : https://github.com/open-telemetry/opentelemetry-dotnet/issues/6296
In fact, the v1.12.0 contains too many regression, only the v1.10.0 is working properly. Why there is no warning about this and how the v1.12 is still in production ?
In fact, the v1.12.0 contains too many regression
What are the specific regressions?
The other referenced gRPC issue has been fixed (just not released yet), and this issue looks like it might be a duplicate of that one. More information, as requested, is needed if it isn't to be able to investigate further.
Until the change is released, you could validate whether your issue is fixed by using a build from main by consuming the NuGet packages attached to the GitHub Actions workflow run.
Closing as a likely duplicate of #6296, which was fixed in v1.13.0.
If there are other issues preventing you from using the library in .NET 9 on Android, then please open an issue with further details about the problems.