dd-trace-php icon indicating copy to clipboard operation
dd-trace-php copied to clipboard

Add WordPress widget name as the resource

Open morrisonlevi opened this issue 3 years ago • 0 comments

Description

Reworks the widgets section of the WordPress integration:

  • Drops WP_Widget::display_callback and instead trace overrides of the WP_Widget::widget method, and use the WP_Widget::$name as the resource.
  • Drops WP_Widget_Factory::_register_widgets for its parent call wp_widgets_init. This is a minor change.

Here's what it looked like before:

Old WordPress widgets integration with display_callback

And after: New WordPress widgets integration with names

It's much easier to see the widget responsible for the queries now.

Readiness checklist

  • [ ] Changelog has been added to the release document.
  • [ ] Tests added for this feature/bug.

Reviewer checklist

  • [x] Appropriate labels assigned.
  • [x] Milestone is set.

morrisonlevi avatar Aug 24 '22 19:08 morrisonlevi