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

Can't set my own traceparent header in HttpClient #27846

Closed
nosalan opened this issue Nov 14, 2020 · 2 comments
Closed

Can't set my own traceparent header in HttpClient #27846

nosalan opened this issue Nov 14, 2020 · 2 comments
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware feature-diagnostics Diagnostic middleware and pages (except EF diagnostics) ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved

Comments

@nosalan
Copy link

nosalan commented Nov 14, 2020

Describe the bug

.NET core is prepending something unwanted to the traceparent header.
I'm sending HTTP request with traceparent header from .NET core app to another .NET core app. This is how I prepare request:

image

In the receiving app, the Activity.Current looks like this:

image

My problem is that something got prepended to the the Activity.Current.ParentID. I expected the ParentId to be exactly equal what_ever_1 and not 00-41ef1aa0b0bed74eb5675bed53f68b07-607cc5475c05974c-00,what_ever_1. This behaves correctly i.e. nothing gets prepended, when I make a request from app that is not written in .net, e.g. Postman

Further technical details

  • ASP.NET Core version
    netcoreapp3.1
  • Include the output of dotnet --info
    .NET Core SDK (reflecting any global.json):
    Version: 3.1.100
    Commit: cd82f021f4

Runtime Environment:
OS Name: Windows
OS Version: 10.0.18363
OS Platform: Windows
RID: win10-x64
Base Path: C:\Program Files\dotnet\sdk\3.1.100\

Host (useful for support):
Version: 3.1.1
Commit: a1388f194c

.NET Core SDKs installed:
2.2.207 [C:\Program Files\dotnet\sdk]
2.2.402 [C:\Program Files\dotnet\sdk]
3.0.100 [C:\Program Files\dotnet\sdk]
3.1.100 [C:\Program Files\dotnet\sdk]

.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.1 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

  • The IDE (VS / VS Code/ VS4Mac) Rider 2020.2.4
@mkArtakMSFT mkArtakMSFT added area-middleware feature-diagnostics Diagnostic middleware and pages (except EF diagnostics) labels Nov 15, 2020
@Trolldemorted
Copy link

Can we disable this header completely somehow?

@BrennanConroy
Copy link
Member

This looks like a dupe of dotnet/runtime#41072. Please follow up on that issue.

@BrennanConroy BrennanConroy added the ✔️ Resolution: Duplicate Resolved as a duplicate of another issue label Nov 18, 2020
@ghost ghost added the Status: Resolved label Nov 18, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 20, 2020
@amcasey amcasey added area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware and removed area-runtime labels Jun 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-middleware Includes: URL rewrite, redirect, response cache/compression, session, and other general middlesware feature-diagnostics Diagnostic middleware and pages (except EF diagnostics) ✔️ Resolution: Duplicate Resolved as a duplicate of another issue Status: Resolved
Projects
None yet
Development

No branches or pull requests

6 participants