apm-agent-dotnet
apm-agent-dotnet copied to clipboard
Additional headers
Hello,
i am using apmserver throught api gateway which requires apikey header to be sent.
is there a way to add additionnal headers to requests sent via payloadsender ?
regards
Hi @kodigo35,
we have an ApiKey config, which adds a header (code here).
But I'm not sure this config would help you. That setting is designed for another use case - at least that's my impression based on your issue description.
is there a way to add additionnal headers to requests sent via payloadsender ?
No, at this point we don't expose anything where you could do this - I think the only way to do this now is to fully replace the payloadsender, but that sounds like an overkill.
hi @gregkalapos
Thanks for your answser.
Your example with apikey is good, need the same thing except that the header name is not the same.
In production environment, apmserver is rarely directly reachable by backend applications.
For the moment, i'm dealing with a custom appsetting for adding extra headers.
May be some kind of preSend events to override or subscribe could do the trick