[.Net] Add header parameters to config file

Where and how can I add the user agent header to .Net Agent config file?

Hi CharanK!

Just to confirm, are you asking about Request headers, or the Browser header?

If you’re asking about Request headers, keep an eye on the .NET agent release page here, as it should be out by the end of the day with proper documentation: .NET agent release notes | New Relic Documentation

Yes…the question is how to add Request Headers so they are available in the Transaction queries. We are experiencing some 406 errors that we would like to be able to see the User agent associated with those errors.

Hi CharanK!

Here is the documentation and configuration on Request Headers: .NET agent configuration | New Relic Documentation

You should be able to accomplish that using the Request Headers by default:

Capture HTTP Request Headers

The allowAllHeaders element is a child of the configuration element. Set this to true to allow the .NET Agent to capture all HTTP request headers as request.headers.{http-header-name} attributes. Set this to false to only allow the .NET agent to collect the following HTTP request headers:

request.headers.referer
request.headers.accept
request.headers.content-length
request.headers.host
request.headers.user-agent