Sitelet https://github.com/microsoft/ApplicationInsights-dotnet/issues/1198
Skip to content

Make TelemetryConfiguration.EnableW3CCorrelation static #1198

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions