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
Opentelemetry sink incorrectly ignores request headers when the Logger is configured declaratively using JSON ConfigurationBuilder.
In contrast, request headers are sent correctly only when the Logger is configured programmatically.
Steps to reproduce
Configure a header section of Serilog.Sinks.OpenTelemetry sink in the JSON configuration file.
Network packet capture should show headers are included in requests to OpenTelemetry endpoint.
Actual Result.
Authentication fails.
Exception when using HttpProtobuf protocol: Exception while emitting periodic batch from Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink: System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 (Forbidden).
Exception when using Grpc protocol: Exception while emitting periodic batch from Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink: Grpc.Core.RpcException: Status(StatusCode="Unauthenticated",
Network packet capture (Wireshark) verifies headers are missing from requests to OpenTelemetry endpoint.
Summary
Opentelemetry sink incorrectly ignores request headers when the Logger is configured declaratively using JSON ConfigurationBuilder.
In contrast, request headers are sent correctly only when the Logger is configured programmatically.
Steps to reproduce
Log.Information()
Expected Result.
Actual Result.
Exception while emitting periodic batch from Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink: System.Net.Http.HttpRequestException: Response status code does not indicate success: 403 (Forbidden).
Exception while emitting periodic batch from Serilog.Sinks.PeriodicBatching.PeriodicBatchingSink: Grpc.Core.RpcException: Status(StatusCode="Unauthenticated",
Potentially Related
serilog-sinks-opentelemetry/src/Serilog.Sinks.OpenTelemetry/Sinks/OpenTelemetry/OpenTelemetrySinkOptions.cs
Line 63 in 3b04262
The text was updated successfully, but these errors were encountered: