cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Custom request attributes using PHP

EduardoLourenco
Newcomer

 

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

3 REPLIES 3

Julius_Loman
DynaMight Legend
DynaMight Legend

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.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

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

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.

Certified Dynatrace Master | Alanata a.s., Slovakia, Dynatrace Master Partner

Featured Posts