Skip to content

.NET Framework HttpClient Instrumentation: Fix missing events on instances created before TracerProvider#2364

Merged
cijothomas merged 2 commits intoopen-telemetry:mainfrom
CodeBlanch:httpclient-attach-existing
Sep 17, 2021
Merged

.NET Framework HttpClient Instrumentation: Fix missing events on instances created before TracerProvider#2364
cijothomas merged 2 commits intoopen-telemetry:mainfrom
CodeBlanch:httpclient-attach-existing

Conversation

@CodeBlanch
Copy link
Member

Fixes #2324

Changes

Hook existing ServicePoints when setting up HttpWebRequest reflection hooks on .NET Framework.

TODOs

  • CHANGELOG update
  • Unit tests

Copy link
Member

@reyang reyang left a comment

Choose a reason for hiding this comment

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

LGTM with a changelog.

@codecov
Copy link

codecov bot commented Sep 17, 2021

Codecov Report

Merging #2364 (88abc89) into main (da54f8c) will increase coverage by 0.04%.
The diff coverage is n/a.

❗ Current head 88abc89 differs from pull request most recent head 2132844. Consider uploading reports for the commit 2132844 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2364      +/-   ##
==========================================
+ Coverage   80.93%   80.97%   +0.04%     
==========================================
  Files         229      229              
  Lines        7323     7318       -5     
==========================================
- Hits         5927     5926       -1     
+ Misses       1396     1392       -4     
Impacted Files Coverage Δ
...OpenTelemetry/Metrics/BaseExportingMetricReader.cs 71.42% <0.00%> (-1.91%) ⬇️
...Telemetry/Internal/SelfDiagnosticsEventListener.cs 96.85% <0.00%> (-0.79%) ⬇️
src/OpenTelemetry/Metrics/MetricReader.cs 72.41% <0.00%> (ø)
...Telemetry/Metrics/PeriodicExportingMetricReader.cs 0.00% <0.00%> (ø)
...lemetry/Metrics/AggregationTemporalityAttribute.cs 0.00% <0.00%> (ø)
...ter.ZPages/Implementation/ZPagesActivityTracker.cs 100.00% <0.00%> (+2.85%) ⬆️
...ZPages/Implementation/ZPagesExporterEventSource.cs 62.50% <0.00%> (+6.25%) ⬆️

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 instrumentation does not work if a HttpClient call is made before configuring OpenTelemetry

3 participants