-
Notifications
You must be signed in to change notification settings - Fork 61
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
New relic TraceId Not getting poplulated in .net core middleware #2707
Comments
Thanks @cpr4377 for your bug report. I created a simple test app targeting .NET 8 (using the default Web API app from Visual Studio), added your middleware code and ran some tests. The NewRelic trace id was generated for each request: How are you adding the middleware to the asp.net core request pipeline? The .NET agent injects our middleware at the very beginning of the request pipeline, so if you're doing anything other than just calling I'm going to close this bug since I can't reproduce it, but if you have further information that would help reproduce it, feel free to re-open and provide a repro app. Here's my repro app (not including the bits generated by Visual Studio for the Web API sample app):
|
New relic TraceId Not getting poplulated in .net core middleware.
Description
I am trying to access the newrelic traceid in asp.net core middleware and pass it as a response header in the response.
Please see the implementation below :
But the trace id is always coming as empty . The agent is running and distributed tracing is enabled, still the issue persist. Has anyone encountered this issue ?
Expected Behavior
Traceid should not be coming empty
Using the latest agent and latest donet newrelic api
The text was updated successfully, but these errors were encountered: