Skip to content

Add propagation to filtered out events from HttpClient#1707

Merged
cijothomas merged 4 commits intoopen-telemetry:masterfrom
utpilla:utpilla/HttpClient-Propagate-ParentContext
Jan 27, 2021
Merged

Add propagation to filtered out events from HttpClient#1707
cijothomas merged 4 commits intoopen-telemetry:masterfrom
utpilla:utpilla/HttpClient-Propagate-ParentContext

Conversation

@utpilla
Copy link
Contributor

@utpilla utpilla commented Jan 19, 2021

Fixes #1561 Item#2

Changes

  • Moved the filtering logic to HttpHandlerDiagnosticListener.cs OnStartActivity method from HttpClientInstrumentation.cs
  • Updated logic of OnStartActivity to inject propagation data into Headers for filtered out events as well

@utpilla utpilla requested a review from a team January 19, 2021 21:36
@codecov
Copy link

codecov bot commented Jan 19, 2021

Codecov Report

Merging #1707 (8ba3aa2) into master (9e9987a) will decrease coverage by 0.01%.
The diff coverage is 73.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1707      +/-   ##
==========================================
- Coverage   82.15%   82.13%   -0.02%     
==========================================
  Files         250      250              
  Lines        6763     6774      +11     
==========================================
+ Hits         5556     5564       +8     
- Misses       1207     1210       +3     
Impacted Files Coverage Δ
...tp/Implementation/HttpHandlerDiagnosticListener.cs 71.11% <66.66%> (-1.73%) ⬇️
....Instrumentation.Http/HttpClientInstrumentation.cs 100.00% <100.00%> (ø)
...p/Implementation/HttpInstrumentationEventSource.cs 64.00% <100.00%> (+3.13%) ⬆️
...Telemetry/Internal/SelfDiagnosticsEventListener.cs 94.28% <0.00%> (+1.42%) ⬆️

Copy link
Member

@CodeBlanch CodeBlanch left a comment

Choose a reason for hiding this comment

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

LGTM

@utpilla
Copy link
Contributor Author

utpilla commented Jan 24, 2021

Closing and re-opening this PR to trigger a Build Run.

@utpilla utpilla closed this Jan 24, 2021
@utpilla utpilla reopened this Jan 24, 2021
@cijothomas cijothomas merged commit 05bba18 into open-telemetry:master Jan 27, 2021
@utpilla utpilla deleted the utpilla/HttpClient-Propagate-ParentContext branch January 27, 2021 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HttpClient should propagate parent context even when Filter or Sampler is in play

3 participants