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

refactor: limit wordpress instrumentation #786

Conversation

lavarou
Copy link
Member

@lavarou lavarou commented Nov 27, 2023

Improve agent's performance when WordPress hook tracking is disabled with newrelic.framework.wordpress.hooks set to false. There's no need to wrap WordPress 'hook' functions when WordPress hooks are to not be instrumented. In such case, instrumentation is limited to transaction naming only.

@lavarou lavarou self-assigned this Nov 27, 2023
@lavarou lavarou force-pushed the refactor/limit-wordpress-instrumentation branch from a93622f to e31f538 Compare November 27, 2023 20:21
@codecov-commenter
Copy link

codecov-commenter commented Nov 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (54ad95d) 78.27% compared to head (1fbb0d1) 78.27%.
Report is 1 commits behind head on wp-performance-improvements.

Additional details and impacted files
@@                     Coverage Diff                      @@
##           wp-performance-improvements     #786   +/-   ##
============================================================
  Coverage                        78.27%   78.27%           
============================================================
  Files                              188      188           
  Lines                            26269    26270    +1     
============================================================
+ Hits                             20563    20564    +1     
  Misses                            5706     5706           
Flag Coverage Δ
agent-for-php-7.0 77.02% <100.00%> (+<0.01%) ⬆️
agent-for-php-7.1 76.75% <100.00%> (+<0.01%) ⬆️
agent-for-php-7.2 77.31% <100.00%> (+<0.01%) ⬆️
agent-for-php-7.3 77.33% <100.00%> (+<0.01%) ⬆️
agent-for-php-7.4 77.11% <100.00%> (+<0.01%) ⬆️
agent-for-php-8.0 77.21% <100.00%> (+<0.01%) ⬆️
agent-for-php-8.1 77.17% <100.00%> (+<0.01%) ⬆️
agent-for-php-8.2 76.95% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@lavarou lavarou force-pushed the refactor/limit-wordpress-instrumentation branch from 0186678 to 13c9297 Compare November 30, 2023 00:49
@lavarou lavarou added this to the Performance Spike milestone Nov 30, 2023
@lavarou lavarou marked this pull request as ready for review November 30, 2023 00:51
@lavarou lavarou force-pushed the refactor/limit-wordpress-instrumentation branch from 13c9297 to 959ae2d Compare November 30, 2023 18:54
@lavarou lavarou changed the base branch from ads/wp_add_filter to wp-performance-improvements November 30, 2023 18:55
bduranleau-nr added a commit that referenced this pull request Dec 1, 2023
There's no need to wrap WordPress 'hook' functions when WordPress hooks
are to not be instrumented. In such case instrumentation is limited to
transaction naming only.
@lavarou lavarou force-pushed the refactor/limit-wordpress-instrumentation branch from 959ae2d to 1fbb0d1 Compare December 4, 2023 21:53
@lavarou lavarou added the ready-for-merge PR ready for merge to upstream label Dec 4, 2023
@lavarou lavarou requested review from ZNeumann and removed request for zsistla December 5, 2023 17:18
@lavarou lavarou merged commit 41ae1e3 into wp-performance-improvements Dec 6, 2023
49 checks passed
@lavarou lavarou deleted the refactor/limit-wordpress-instrumentation branch December 6, 2023 04:26
@lavarou lavarou removed the ready-for-merge PR ready for merge to upstream label Dec 6, 2023
bduranleau-nr pushed a commit that referenced this pull request Dec 6, 2023
Improve agent's performance when WordPress hook tracking is disabled with
`newrelic.framework.wordpress.hooks` set to `false`. There's no need to wrap
WordPress 'hook' functions when WordPress hooks are not to be instrumented.
In such case, instrumentation is limited to transaction naming only.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants