-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Labels
Description
I am using v4.0.3 of this sink with below setup:
Log.Logger = new LoggerConfiguration()
.Destructure.UsingAttributes()
.Enrich.FromLogContext()
.Enrich.WithExceptionDetails()
.Enrich.WithCorrelationId(StaticConfig.CorrelationIdHeader, addValueIfHeaderAbsence: true)
.WriteTo.Conditional(
_ => !builder.Environment.IsDevelopment(),
wt => wt.EventCollector(
splunkConfig.BaseUri,
splunkConfig.Token,
"services/collector/event",
splunkConfig.AppSource ?? Assembly.GetEntryAssembly()?.GetName().Name ?? string.Empty,
sourceType: "",
splunkConfig.AppHost ?? Environment.GetEnvironmentVariable("WEBSITE_SITE_NAME", EnvironmentVariableTarget.Process) ?? Environment.MachineName,
splunkConfig.Index
)
)
.WriteTo.Conditional(
_ => builder.Environment.IsDevelopment(),
wt => wt.Console(
outputTemplate:
"[{Timestamp:yyyy.MM.dd HH:mm:ss} {TraceId} {SpanId} {CorrelationId} {Level:u3}] {Message:lj} {Properties:j} {NewLine}{Exception}"
)
)
.ReadFrom.Configuration(builder.Configuration)
.CreateLogger();
builder.Host.UseSerilog();I get the TraceId and SpanId in console logs, but they are missing from the logs

Am I doing something wrong?