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
Hi, I found the issue happens with ASP.NET Core Instrumentation only on Windows. The same code is working fine on Mac but it crashed with the ObjectDisposedException on Windows.
It looks related #2905.
System.ObjectDisposedException
HResult=0x80131622
Message=IFeatureCollection has been disposed.
ObjectDisposed_ObjectName_Name
Source=Microsoft.Extensions.Features
StackTrace:
at Microsoft.AspNetCore.Http.Features.FeatureReferences`1.ThrowContextDisposed()
at Microsoft.AspNetCore.Http.Features.FeatureReferences`1.ContextDisposed()
at Microsoft.AspNetCore.Http.Features.FeatureReferences`1.Fetch[TFeature,TState](TFeature& cached, TState state, Func`2 factory)
at Microsoft.AspNetCore.Http.Features.FeatureReferences`1.Fetch[TFeature](TFeature& cached, Func`2 factory)
at Microsoft.AspNetCore.Http.DefaultHttpRequest.get_Protocol()
at Microsoft.AspNetCore.Hosting.HostingRequestStartingLog.get_Item(Int32 index)
at Microsoft.AspNetCore.Hosting.HostingRequestStartingLog.<GetEnumerator>d__11.MoveNext()
at OpenTelemetry.Exporter.OpenTelemetryProtocol.Implementation.LogRecordExtensions.ToOtlpLog(LogRecord logRecord)
at OpenTelemetry.Exporter.OpenTelemetryProtocol.Implementation.LogRecordExtensions.AddBatch(ExportLogsServiceRequest request, Resource processResource, Batch`1& logRecordBatch)
at OpenTelemetry.Exporter.OtlpLogExporter.Export(Batch`1& logRecordBatch)
at OpenTelemetry.BatchExportProcessor`1.ExporterProc()
at System.Threading.Thread.StartCallback()
To avoid this issue, we can add options.ExportProcessorType = OpenTelemetry.ExportProcessorType.Simple; as @justkao mentioned here in additonal context.
Hi, I found the issue happens with ASP.NET Core Instrumentation only on Windows. The same code is working fine on Mac but it crashed with the ObjectDisposedException on Windows.
It looks related #2905.
Here is the project file.
Here is how to configure the OTLP exporter in ASP.NET Core startup code.
Here is how to output the log.
And exception details.
To avoid this issue, we can add
options.ExportProcessorType = OpenTelemetry.ExportProcessorType.Simple;
as @justkao mentioned here in additonal context.Originally posted by @tanaka-takayoshi in #1933 (comment)
The text was updated successfully, but these errors were encountered: