Skip to content

Is writing trace id in the log message directly is good idea? #4

@BekAllaev

Description

@BekAllaev

Here I get trace id

var traceId = IsProductionServer() ? $"TraceId: {GetTraceId()}" : string.Empty;

and then later on I push it into the log here (and other places too), so I can see it in the Seq, when my app runs in the production:

Logger.LogInformation($"Fetching weather data in client component - Weather client. {traceId}");

But I think that it should be setted somehow in the Program.cs, no?!

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions