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

Create spans for HTTP retries and redirects #3072

Conversation

denisivan0v
Copy link

@denisivan0v denisivan0v commented Mar 23, 2022

Summary

This PR brings an implementation for HTTP retries and redirects instrumentation defined in opentelemetry-specification #2078.
This is the second attempt to add the implementation (#2756 was the first one) with the reduced scope to reflect the current state of HTTP semantic conventions specification.

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.

Changes

  1. Now spans will be created for all retry and redirect attempts (previously a span was created for the first attempt only).
    1. A span will be created even though traceparent header is already present.
    2. traceparent header will be overwritten based on current ambient context (Activity.Current) values.
  2. We now follow the new spec for retries ad redirects (https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/trace/semantic_conventions/http.md#http-request-retries-and-redirects)

@@ -14,6 +14,10 @@
occurs.
([#3407](https://github.com/open-telemetry/opentelemetry-dotnet/issues/3407))

* Create spans for HTTP retries and redirects according to
Copy link
Member

Choose a reason for hiding this comment

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

could you describe the change here itself for users benefit?
Having to read spec and PR to understand what changed is too complicated for end users.

@@ -14,6 +14,10 @@
occurs.
([#3407](https://github.com/open-telemetry/opentelemetry-dotnet/issues/3407))

* Create spans for HTTP retries and redirects according to
Copy link
Member

Choose a reason for hiding this comment

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

could you describe the change here itself for users benefit?
Having to read spec and PR to understand what changed is too complicated for end users.

@@ -14,6 +14,10 @@
occurs.
([#3407](https://github.com/open-telemetry/opentelemetry-dotnet/issues/3407))

* Create spans for HTTP retries and redirects according to
[opentelemetry-specification #2078](https://github.com/open-telemetry/opentelemetry-specification/pull/2078).
([#3072](https://github.com/open-telemetry/opentelemetry-dotnet/pull/3072))
Copy link
Member

Choose a reason for hiding this comment

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

also be specific that this is only done to the HttpClient .NET Core one, and .NET Framework.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 6, 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 Aug 6, 2022
@github-actions
Copy link
Contributor

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

@github-actions github-actions bot closed this Aug 13, 2022
@vishweshbankwar
Copy link
Member

@cijothomas - Please reopen and merge this PR. I can address the comments in a separate PR. Thanks!
@denisivan0v FYI

@cijothomas cijothomas reopened this Sep 26, 2022
@vishweshbankwar
Copy link
Member

@cijothomas - Please reopen and merge this PR. I can address the comments in a separate PR. Thanks! @denisivan0v FYI

Looks like we have merge conflicts. @denisivan0v - I will create a separate PR using this one and tag you there.

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

github-actions bot commented Oct 5, 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 Oct 5, 2022
@mirekkukla
Copy link

We're very much looking to this being merged to finally resolve microsoft/ApplicationInsights-dotnet#2556

@cijothomas
Copy link
Member

We're very much looking to this being merged to finally resolve microsoft/ApplicationInsights-dotnet#2556

This will not fix anything in ApplicationInsights, unless you are using OpenTelemetry based application insights.

@vishweshbankwar this PR can be now closed as this functionality is already merged now?

@vishweshbankwar
Copy link
Member

We're very much looking to this being merged to finally resolve microsoft/ApplicationInsights-dotnet#2556

This will not fix anything in ApplicationInsights, unless you are using OpenTelemetry based application insights.

@vishweshbankwar this PR can be now closed as this functionality is already merged now?

Yes - This can be closed now.

@cijothomas
Copy link
Member

Closing as this is covered by alternative PR. Thanks @denisivan0v and @vishweshbankwar

@cijothomas cijothomas closed this Oct 10, 2022
@prateekprshr-nith
Copy link

prateekprshr-nith commented Jan 4, 2023

Closing as this is covered by alternative PR. Thanks @denisivan0v and @vishweshbankwar

@cijothomas, can you please provide a link to alternative PR / or clarify if this issue is fixed or not?

@alanwest
Copy link
Member

alanwest commented Jan 5, 2023

@prateekprshr-nith This was addressed in #3732

@prateekprshr-nith
Copy link

Thanks @cijothomas, I see that this was released in https://github.com/open-telemetry/opentelemetry-dotnet/releases/tag/core-1.4.0-beta.2.

Is this available in a stable release as well?

@Kielek
Copy link
Contributor

Kielek commented Jan 9, 2023

Not yet, the latest release is 1.4.0-rc.1 for core components/1.0.0-rc9.10 for non-core.
ETA for 1.4.0 is end of January.

@pvsraviteja
Copy link

@Kielek Is this SDK released and available to consume ?

@Kielek
Copy link
Contributor

Kielek commented Feb 6, 2023

There is some delay:
https://www.nuget.org/packages/OpenTelemetry/1.4.0-rc.3 was released Feb 2, 2023.
From SIG notes: "After it simmers for a bit, we’ll ship 1.4 stable in ~2 weeks."

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.

10 participants