Skip to content

Commit 590d7f6

Browse files
committed
feat(agent): update default for wp hooks options
By default the agent will only instrument hook callbacks from plugins/themes and will not instrument hook callbacks from wordpress core.
1 parent 539dd4f commit 590d7f6

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

agent/php_nrini.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1896,7 +1896,7 @@ static PHP_INI_MH(nr_custom_events_max_samples_stored_mh) {
18961896
return SUCCESS;
18971897
}
18981898

1899-
#define DEFAULT_WORDPRESS_HOOKS_OPTIONS "all_callbacks"
1899+
#define DEFAULT_WORDPRESS_HOOKS_OPTIONS "plugin_callbacks"
19001900
static PHP_INI_MH(nr_wordpress_hooks_options_mh) {
19011901
nrinistr_t* p;
19021902

agent/scripts/newrelic.ini.template

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,17 +1169,17 @@ newrelic.daemon.logfile = "/var/log/newrelic/newrelic-daemon.log"
11691169
; Setting: newrelic.framework.wordpress.hooks.options
11701170
; Type : string (all_callbacks, plugin_callbacks, threshold)
11711171
; Scope : per-directory
1172-
; Default: all_callbacks
1172+
; Default: plugin_callbacks
11731173
; Info : Sets the options how WordPress hooks are instrumented.
11741174
;
11751175
; New Relic agent can provide different levels of insights into WordPress hooks.
1176-
; By default, all hook callbacks functions are instrumented ("all_callbacks").
1177-
; To reduce agent's overhead it is possible to limit the instrumentation to only
1178-
; plugin/theme callbacks ("plugin_callbacks"). Third option is to monitor hooks
1179-
; without instrumenting callbacks ("threshold"). This option does not give insights
1180-
; about plugins/themes.
1176+
; By default, only plugin/theme callbacks are instrumented ("plugin_callbacks").
1177+
; At the cost of increased agent's overhead it is possible to extend the
1178+
; instrumentation to all hook callbacks functions ("all_callbacks")nly. Third option
1179+
; is to monitor hooks without instrumenting callbacks ("threshold"). This option
1180+
; does not give insights about plugins/themes.
11811181
;
1182-
;newrelic.framework.wordpress.hooks.options = "all_callbacks"
1182+
;newrelic.framework.wordpress.hooks.options = "plugin_callbacks"
11831183

11841184
; Setting: newrelic.framework.wordpress.hooks.threshold
11851185
; Type : time specification string ("500ms", "1s750ms" etc)

0 commit comments

Comments
 (0)