[Feature] Wordpress integration should identify the active user
Is your feature request related to a problem? Please describe. I am evaluating Application Security Management on a few Wordpress websites. ASM keeps mentioning:
Know when authenticated users target your application
Instrument your services with the standardized user tags: see documentation.
Describe the solution you'd like Wordpress has a standard user authentication mechanism, so the Integration should be able to automatically provide the user details as part of the root span.
This would probably be done by hooking the action set_current_user or tracing the function wp_set_current_user.
Describe alternatives you've considered It's not hard to add the current user's details, but I'd expect Integrations that have standardised authentication to work automatically out of the box. There may be extra app specific metadata added as well, but the basics can "just work".
This may also be applicable in varying degrees for Laravel and other frameworks with built in auth as well. The more custom ones may just have the user id and nothing more by default.
We just recently added a first class \DDTrace\set_user() function in #1910. Our integrations shall make use of it :-)
Just attempted #1920 for Laravel now.
Brilliant. I'll keep my eyes peeled for this in future releases.