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

TraceContext: TraceParent and TraceState properties are always empty. #410

Closed
rikbosch opened this issue Apr 22, 2021 · 5 comments
Closed
Labels
enhancement New feature or request logging
Milestone

Comments

@rikbosch
Copy link

I'm trying to setup distributed tracing in .NET 5 and as a minimum I would like to see the dependency calls of a .NET 5 worker function call in Application Insights.

I expected the worker to set System.Diagnostics.Activity.Current when processing a function invocation, but that is not the case.
So I wrote a middleware which extracts the TraceParent and TraceState properties into an ActivitySource:

image

but the TraceContext properties are always empty. I don't know if this is an issue in de worker code, or an issue in the functions host.

@fabiocav
Copy link
Member

fabiocav commented May 11, 2021

This is currently a gap that @brettsam has been tracking. We'll have an issue created to track the work, link to it and close this once that is in place.

We'll continue to use this issue to track the work.

Thank you!

@fabiocav fabiocav added this to the Triaged milestone May 11, 2021
@fabiocav fabiocav added enhancement New feature or request logging labels May 11, 2021
@murthys
Copy link

murthys commented Mar 22, 2022

I am waiting for the same, when will going to be supported?

@brettsam
Copy link
Member

Today you need to have Application Insights enabled for this to work.

The host will eventually move to using the newer OpenTelemetry instrumentation so these traces flow without App Insights, but for now, App Insights is required.

@brettsam
Copy link
Member

If you're trying to get this working with Application Insights, try the new preview packages: #944 (comment)

@brettsam
Copy link
Member

I've filed Azure/azure-functions-host#8846 to track removing the Application Insights requirement.

@brettsam brettsam closed this as not planned Won't fix, can't repro, duplicate, stale Oct 13, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Nov 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request logging
Projects
None yet
Development

No branches or pull requests

5 participants