Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WordPress AutoInstrument: Skip WP Core #1032

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

xyu
Copy link

@xyu xyu commented Jul 24, 2023

With the current WordPress auto-instrumentation implementation most of the spans in APM traces are filled with WP core functions.

For the most part this is not super useful for the majority of WordPress developers / users because there's not much they can do to change how core works. It's also relatively unlikely performance issues are caused by WP core functions as they are used by all WP users and have over the decades been optimized and looked at closely.

It's much more likely performance issues arise due to the themes or plugins that are installed on a site. So it would be more useful to only expose WordPress theme and plugin callbacks as span by default. These callbacks are how WP developers normally go about modifying and adding functionality. (No "core hacks" has been a core tenet of WP developers for quite a long time now.)

This PR makes it so that we default skip instrumentation of WP core callbacks unless a WP_DEBUG constant is set which is the WP convention for turning on more verbose logging: https://wordpress.org/documentation/article/debugging-in-wordpress/

With the current WordPress auto-instrumentation implementation most of the spans in APM traces are filled with WP core functions.

For the most part this is not super useful for the majority of WordPress developers / users because there's not much they can do to change how core works. It's also relatively unlikely performance issues are caused by WP core functions as they are used by all WP users and have over the decades been optimized and looked at closely.

It's much more likely performance issues arise due to the themes or plugins that are installed on a site. So it would be more useful to only expose WordPress theme and plugin callbacks as span by default. These callbacks are how WP developers normally go about modifying and adding functionality. (No "core hacks" has been a core tenet of WP developers for quite a long time now.)

This PR makes it so that we default skip instrumentation of WP core callbacks unless a `WP_DEBUG` constant is set which is the WP convention for turning on more verbose logging:
https://wordpress.org/documentation/article/debugging-in-wordpress/
@elastic-apm-tech elastic-apm-tech added this to In Progress in APM-Agents (OLD) Jul 24, 2023
@SergeyKleyman SergeyKleyman self-requested a review July 28, 2023 04:14
@v1v
Copy link
Member

v1v commented Feb 9, 2024

run docs-build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
APM-Agents (OLD)
  
In Progress
Development

Successfully merging this pull request may close these issues.

None yet

2 participants