-
Notifications
You must be signed in to change notification settings - Fork 67
Move W3C classes to base SDK so everyone can use them #1138
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls. take a look at the comment before merge.
Src/Common/StringUtilities.cs
Outdated
@@ -47,19 +42,21 @@ public static string EnforceMaxLength(string input, int maxLength) | |||
/// https://github.com/w3c/distributed-tracing/blob/master/trace_context/HTTP_HEADER_FORMAT.md#trace-id | |||
/// </summary> | |||
/// <returns>Random 16 bytes array encoded as hex string</returns> | |||
[Obsolete("Use Microsoft.ApplicationInsights.Extensibility.W3C.W3CUtilities.GenerateTraceId instead.", true)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it break compilation? It can be fine if we didn't have this feature in any stable (I remember we didn't), so migrating between stables won't suddenly stop compiling, right?
/// <summary> | ||
/// Generate new W3C context. | ||
/// </summary> | ||
/// <param name="activity">Activity to generate W3C context on.</param> | ||
/// <returns>The same Activity for chaining.</returns> | ||
[Obsolete("Not ready for public consumption.")] | ||
[Obsolete("Microsoft.ApplicationInsights.Extensibility.W3C.W3CActivityExtensions.GenerateW3CContext instead.", true)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may need to add "Use" here and in the other cases below.
Src/Common/StringUtilities.cs
Outdated
@@ -47,19 +42,21 @@ public static string EnforceMaxLength(string input, int maxLength) | |||
/// https://github.com/w3c/distributed-tracing/blob/master/trace_context/HTTP_HEADER_FORMAT.md#trace-id | |||
/// </summary> | |||
/// <returns>Random 16 bytes array encoded as hex string</returns> | |||
[Obsolete("Use Microsoft.ApplicationInsights.Extensibility.W3C.W3CUtilities.GenerateTraceId instead.", true)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd also mention the name of the nuget package as well - Microsoft.ApplicationInsights
W3C implementation is used by Web and AspNetCore SDKs.
We are going to enable W3C for some 1DS users that do not necessarily use Web SDK (and reference DependencyCollector that declares W3C implementation).
Without this change, we would require everyone to install base + dependency collector just to onboard W3C. With this change, it is still an explicit choice to enable it.
W3C is moved to base, Implementation in dependency collector is deprecated with error.