-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Fix missing logs issue #34423
Fix missing logs issue #34423
Conversation
API change check API changes are not detected in this pull request. |
sdk/monitor/Azure.Monitor.OpenTelemetry.Exporter/src/AzureMonitorLogExporter.cs
Show resolved
Hide resolved
@cijothomas FYI you've mentioned that #34259 might depend on a fix in the OpenTelemetry .NET SDK, @vishweshbankwar do we know if this PR is going to fix #34259 or we need other changes? |
We need other changes. There are two parts that need a fix
Object name: 'Collection'.
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](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()+MoveNext()
at Azure.Monitor.OpenTelemetry.Exporter.Internals.LogsHelper.ExtractProperties(String& message, IDictionary`2 properties, IReadOnlyCollection`1 stateDictionary)
at Azure.Monitor.OpenTelemetry.Exporter.Internals.LogsHelper.GetMessageAndSetProperties(LogRecord logRecord, IDictionary`2 properties)
at Azure.Monitor.OpenTelemetry.Exporter.Models.MessageData..ctor(Int32 version, LogRecord logRecord)
at Azure.Monitor.OpenTelemetry.Exporter.Internals.LogsHelper.OtelToAzureMonitorLogs(Batch`1 batchLogRecord, AzureMonitorResource resource, String instrumentationKey)
at Azure.Monitor.OpenTelemetry.Exporter.AzureMonitorLogExporter.Export(Batch`1& batch)] |
Got it, would you reopen the issue + update the PR description here to reflect the intention? Thanks! |
@reyang I have updated the description here and sent another PR to handle part 2 i.e. the exception. |
#34259 reported that logs are not exported if any one of the logs in the received batch hit an exception when we convert the log to Azure Monitor trace. This PR addresses this by handling the exception individually for each log rather than failing the entire batch.