Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

Make W3C Correlation default and leverage native W3C support from new System.Diagnostics.DiagnosticSource Activity #958

Merged
merged 34 commits into from
Aug 27, 2019

Conversation

cijothomas
Copy link
Contributor

@cijothomas cijothomas commented Aug 23, 2019

AspNetCore RequestCollection specific changes, followup for the base SDK changes introduced in the PR:
microsoft/ApplicationInsights-dotnet#1193

Also Fixes:
#956
#900

To do:
3.XX support (separate PR)

Copy link
Member

@lmolkova lmolkova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a couple of comments, the only major one is correlation-context on 2.x case with W3C headers.

@cijothomas cijothomas changed the title WIP- Make W3C Correlation default and leverage native W3C support from new System.Diagnostics.DiagnosticSource Activity Make W3C Correlation default and leverage native W3C support from new System.Diagnostics.DiagnosticSource Activity Aug 27, 2019
private static void ReadCorrelationContext(IHeaderDictionary requestHeaders, Activity activity)
{
string[] baggage = requestHeaders.GetCommaSeparatedValues(RequestResponseHeaders.CorrelationContextHeader);
if (baggage != StringValues.Empty && !activity.Baggage.Any())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you want to avoid adding baggage to Activity that already had some baggage (why?) check for baggage presence before you read headers and return.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it.. will address it next PR (for 3.0 support)

20,
Message = "Message: '{0}'.",
Level = EventLevel.Verbose)]
public void HostingListenerVerboe(string message, string appDomainName = "Incorrect")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
public void HostingListenerVerboe(string message, string appDomainName = "Incorrect")
public void HostingListenerVerbose(string message, string appDomainName = "Incorrect")

Also, do we really need both: Informational and verbose?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will address it next PR (for 3.0 support)

@cijothomas cijothomas merged commit b0ae600 into develop Aug 27, 2019
cijothomas added a commit that referenced this pull request Aug 27, 2019
…from new System.Diagnostics.DiagnosticSource Activity (#958)"

This reverts commit b0ae600.
cijothomas added a commit that referenced this pull request Aug 27, 2019
…from new System.Diagnostics.DiagnosticSource Activity (#958)" (#962)

This reverts commit b0ae600.
cijothomas added a commit that referenced this pull request Aug 27, 2019
…support from new System.Diagnostics.DiagnosticSource Activity (#958)" (#962)"

This reverts commit c2929a9.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants