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