Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP retries and redirects instrumentation #2756

Conversation

denisivan0v
Copy link

Changes

This PR brings an implementation for HTTP retries and redirects proposed in opentelemetry-specification #2078.

It addresses a scenario which is in the scope for bringing the existing HTTP semantic conventions for tracing to an initial stable state, see related otep #174.

For significant contributions please make sure you have completed the following items:

  • Appropriate CHANGELOG.md updated for non-trivial changes
  • Design discussion issue #
  • Changes in public API reviewed

@denisivan0v denisivan0v requested a review from a team December 21, 2021 02:17
@denisivan0v denisivan0v changed the title HTPP retries and redirects instrumentation HTTP retries and redirects instrumentation Dec 21, 2021
@codecov
Copy link

codecov bot commented Dec 21, 2021

Codecov Report

Merging #2756 (1145ef7) into main (1150f4a) will increase coverage by 0.03%.
The diff coverage is 94.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2756      +/-   ##
==========================================
+ Coverage   83.75%   83.79%   +0.03%     
==========================================
  Files         251      251              
  Lines        8864     8879      +15     
==========================================
+ Hits         7424     7440      +16     
+ Misses       1440     1439       -1     
Impacted Files Coverage Δ
...tp/Implementation/HttpHandlerDiagnosticListener.cs 78.89% <93.75%> (+7.32%) ⬆️
...ation.Http/HttpRequestMessageContextPropagation.cs 100.00% <100.00%> (ø)
...emetry.Api/Internal/OpenTelemetryApiEventSource.cs 79.41% <0.00%> (-2.95%) ⬇️
...ter.ZPages/Implementation/ZPagesActivityTracker.cs 97.14% <0.00%> (-2.86%) ⬇️
...nTelemetry/Internal/OpenTelemetrySdkEventSource.cs 70.75% <0.00%> (-0.95%) ⬇️

…tivitySourceTests.netfx.cs

Co-authored-by: Michael Maxwell <mike.ian.maxwell@gmail.com>
retryCount = (int)previousRetryCount + 1;
}

// Suppressing activity started by HttpClient DiagnosticsHandler.
Copy link
Member

Choose a reason for hiding this comment

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

this section is a bit unclear without some examples and explanation.
some questions:

  1. Does httpClient diagnostichandler created a single Activity only, or does it create one for every retry?
  2. Which one are we stopping here.
  3. We are creating a new activity here - is it supposed to be the child of the original http client activity or is it expected to be its sibling (i.e same parent, likely that of the Asp.Net Core Request)
  4. Why do we explicitly set Activity.Current in line 108?

@github-actions
Copy link
Contributor

github-actions bot commented Feb 4, 2022

This PR was marked stale due to lack of activity and will be closed in 7 days. Commenting or Pushing will instruct the bot to automatically remove the label. This bot runs once per day.

@github-actions github-actions bot added the Stale Issues and pull requests which have been flagged for closing due to inactivity label Feb 4, 2022
@github-actions
Copy link
Contributor

Closed as inactive. Feel free to reopen if this PR is still being worked on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Issues and pull requests which have been flagged for closing due to inactivity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants