Skip to content

Make TelemetryConfiguration.EnableW3CCorrelation static #1198

@lmolkova

Description

@lmolkova

set
{
this.enableW3c = value;
ActivityExtensions.TryRun(() =>
{
if (this.enableW3c)
{
Activity.DefaultIdFormat = ActivityIdFormat.W3C;
Activity.ForceDefaultIdFormat = true;
}
else
{
Activity.DefaultIdFormat = ActivityIdFormat.Hierarchical;
Activity.ForceDefaultIdFormat = true;
}
});
}

The setter deals with static properties on Activity and having two different instances of configuration with different settings is not possible.

So logically it should be static.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions