17 Nov 2023 08:02 PM - last edited on 21 Nov 2023 08:12 AM by MaciejNeumann
Hi,
We are using PHP with Dynatrace but when we searched for the SDK we did not find the "Add custom request attributes" section like in other languages (DotNet, Pyton, etc).
Will this functionality be added in the future?
We have many attributes to send through the code that cannot be sent via header or request parameters, what is the current best way to add new custom attributes by PHP at runtime?
Thanks in advance
Solved! Go to Solution.
17 Nov 2023 08:24 PM
You can add request attributes for PHP directly in Dynatrace if it is a method argument, see https://docs.dynatrace.com/docs/shortlink/request-attributes-method-arguments.
If you need to push information and context from the code, I'd suggest using OpenTelemetry instead. Then you can create your own spans and send span attributes, which can be used as the source for request attributes.
21 Nov 2023 03:08 PM
Thanks for the answer @Julius_Loman !
I'll read these documents, but do you know if there is any update plan for the OneAgent SDK for PHP?
Thanks in advance
21 Nov 2023 03:35 PM - edited 21 Nov 2023 08:09 PM
Unfortunately, I don't have such information, but I'd not expect to make any significant improvements in OneAgent SDK as the industry focus is on OpenTelemetry. Maybe @michael_kopp or @_Alexander_ can confirm that.