Skip to content
This repository was 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
cijothomas merged 34 commits intodevelopfrom
cithomas/w3c
Aug 27, 2019
Merged

Make W3C Correlation default and leverage native W3C support from new System.Diagnostics.DiagnosticSource Activity#958
cijothomas merged 34 commits intodevelopfrom
cithomas/w3c

Conversation

@cijothomas
Copy link
Copy Markdown
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
Copy Markdown

@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
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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