apm-agent-php icon indicating copy to clipboard operation
apm-agent-php copied to clipboard

Capture and log HTTP headers and payload

Open outfoxer opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. HTTP headers and payload is a must for understanding issues causes

Describe the solution you'd like Capture and log HTTP headers and payload under http section of the transaction metadata

outfoxer avatar Oct 17 '22 15:10 outfoxer

We have some internal APIs and use the User-Agent header to identify the source of the request. On our Nodejs APIs the headers are present on Observability, but not for PHP and it's important to identify the source of a request while investigating an issue. We can use the setLabel feature, but it would be better to have native support for headers.

ElasticApm::getCurrentTransaction()->context()->setLabel('user-agent', $userAgent);

Lansoweb avatar Apr 19 '23 11:04 Lansoweb