You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Runtime version (e.g. net461, net48, netcoreapp3.1, net5.0 etc. You can
find this information from the *.csproj file):
netcoreapp3.1
Symptom
InvalidOperationException not bubbled when using multiple metric readers through deferred builder which breaks the metric flow without any indication.
What is the expected behavior?
Throw an InvalidOperationException
What is the actual behavior?
App continues without exception, but no longer works
Reproduce
publicvoidConfigureServices(IServiceCollectionservices){services.AddControllers();// Since we are using .NET 3.1 & HTTP, we need to define this for our OTLP exporter:// See https://github.com/open-telemetry/opentelemetry-dotnet/blob/main/src/OpenTelemetry.Exporter.OpenTelemetryProtocol/README.md#special-case-when-using-insecure-channelAppContext.SetSwitch("System.Net.Http.SocketsHttpHandler.Http2UnencryptedSupport",true);services.AddOpenTelemetryMetrics(metricsBuilder =>{metricsBuilder.AddAspNetCoreInstrumentation().AddMeter("App.Meter.Example").AddOtlpExporter();// This is not allowed which causes an InvalidOperationException, but it will not be bubbled from AddOtlpExporter when it uses the deferred approachmetricsBuilder.AddConsoleExporter(options =>options.MetricExportIntervalMilliseconds=5*1000);});}
Bug Report
List of NuGet packages and
version that you are using (e.g.
OpenTelemetry 1.0.2
):OpenTelemetry.Extensions.Hosting
v1.0.0-rc8OpenTelemetry.Exporter.OpenTelemetryProtocol
v1.0.0-rc8Runtime version (e.g.
net461
,net48
,netcoreapp3.1
,net5.0
etc. You canfind this information from the
*.csproj
file):netcoreapp3.1
Symptom
InvalidOperationException
not bubbled when using multiple metric readers through deferred builder which breaks the metric flow without any indication.What is the expected behavior?
Throw an
InvalidOperationException
What is the actual behavior?
App continues without exception, but no longer works
Reproduce
Additional Context
Bug can be closed when #2398 is closed.
The text was updated successfully, but these errors were encountered: