dd-trace-php
dd-trace-php copied to clipboard
feat(profiling): add arg0 to WordPress's do_action frame
Description
Example: do_action(hook_name: 'rest_api_init').
When looking at WordPress profiles, it's helpful to know what action is attached to the frame. For example, if I browse to the profile from the Code Hotspot section from a span action with tag wp.hook of rest_api_init, it's nice to know which of the 4 possible do_action frames is the one for rest_api_init.
We may also be able to use this info in a smart way when building the breakdown as well.
Readiness checklist
- [ ] Changelog has been added to the release document.
- [ ] Tests added for this feature/bug.
Reviewer checklist
- [x] Appropriate labels assigned.
- [ ] Milestone is set.
Benchmarks
Benchmark execution time: 2023-07-30 22:04:30
Comparing candidate commit 4e5a57c8f7803fd3e2b05cfaa125c17901cbe08b in PR branch levi/wp-action-name with baseline commit 6949deb5039d1a5c8c45f3f342ea9237b8ef0c04 in branch master.
Found 0 performance improvements and 6 performance regressions! Performance is the same for 0 metrics, 0 unstable metrics.
scenario:walk_stack/1
- 🟥
wall_time[+4.195µs; +4.196µs] or [+56.079%; +56.097%]
scenario:walk_stack/50
- 🟥
wall_time[+7.635µs; +7.637µs] or [+90.969%; +90.999%]
scenario:walk_stack/99
- 🟥
wall_time[+7.790µs; +7.792µs] or [+92.867%; +92.886%]
scenario:walk_stack_instructions/1
- 🟥
instructions[+52.3K instructions; +52.3K instructions] or [+99.458%; +99.472%]
scenario:walk_stack_instructions/50
- 🟥
instructions[+53.7K instructions; +53.7K instructions] or [+101.864%; +101.897%]
scenario:walk_stack_instructions/99
- 🟥
instructions[+54.5K instructions; +54.5K instructions] or [+103.595%; +103.612%]