{"id":53459,"date":"2016-12-02T19:56:06","date_gmt":"2016-12-02T19:56:06","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/wp-newrelic\/"},"modified":"2025-08-11T19:31:32","modified_gmt":"2025-08-11T19:31:32","slug":"wp-newrelic","status":"publish","type":"plugin","link":"https:\/\/kin.wordpress.org\/plugins\/wp-newrelic\/","author":8361946,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"1.3.3","stable_tag":"1.3.3","tested":"6.8.5","requires":"6.3","requires_php":"8.0","requires_plugins":null,"header_name":"New Relic Reporting for WordPress","header_author":"10up","header_description":"","assets_banners_color":"8558e6","last_updated":"2025-08-11 19:31:32","external_support_url":"","external_repository_url":"https:\/\/github.com\/10up\/wp-newrelic\/","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugins\/wp-newrelic","header_author_uri":"https:\/\/10up.com","rating":5,"author_block_rating":5,"active_installs":700,"downloads":127565,"num_ratings":4,"support_threads":0,"support_threads_resolved":0,"author_block_count":2,"sections":["description","installation","changelog"],"tags":{"1.0":{"tag":"1.0","author":"rittesh.patel","date":"2017-01-09 08:50:35"},"1.1":{"tag":"1.1","author":"collinsinternet","date":"2017-04-25 19:54:57"},"1.2":{"tag":"1.2","author":"vhauri","date":"2018-05-03 15:32:12"},"1.3":{"tag":"1.3","author":"collinsinternet","date":"2018-08-30 19:09:30"},"1.3.1":{"tag":"1.3.1","author":"10upbot","date":"2020-01-31 19:06:58"},"1.3.2":{"tag":"1.3.2","author":"10up","date":"2023-09-20 00:08:11"},"1.3.3":{"tag":"1.3.3","author":"10up","date":"2025-08-11 19:31:32"}},"upgrade_notice":{"1.3.3":"<p>This release bumps the PHP minimum from 7.3.11 to 8.0 and the WordPress minimum from 4.0 to 6.3.<\/p>"},"ratings":{"1":0,"2":0,"3":0,"4":0,"5":4},"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":2968950,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":2968950,"resolution":"256x256","location":"assets","locale":""},"icon.svg":{"filename":"icon.svg","revision":2968950,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":2968950,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":2968950,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0","1.1","1.2","1.3","1.3.1","1.3.2","1.3.3"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[130352,130349,130351,130350],"plugin_category":[],"plugin_contributors":[77761,183658,153830,78796,78260],"plugin_business_model":[216239],"class_list":["post-53459","plugin","type-plugin","status-publish","hentry","plugin_tags-apm-reporting","plugin_tags-new-relic","plugin_tags-new-relic-apm-reporting","plugin_tags-new-relic-reporting","plugin_contributors-10up","plugin_contributors-jeffpaul","plugin_contributors-oscarssanchez","plugin_contributors-ritteshpatel","plugin_contributors-tott","plugin_business_model-community","plugin_committers-10up","plugin_committers-10upbot","plugin_support_reps-ankit-k-gupta","plugin_support_reps-dharm1025","plugin_support_reps-dkotter","plugin_support_reps-faisal03","plugin_support_reps-jeffpaul","plugin_support_reps-nomnom99","plugin_support_reps-sumitbagthariya16","plugin_support_reps-tott"],"banners":{"banner":"https:\/\/ps.w.org\/wp-newrelic\/assets\/banner-772x250.png?rev=2968950","banner_2x":"https:\/\/ps.w.org\/wp-newrelic\/assets\/banner-1544x500.png?rev=2968950","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/wp-newrelic\/assets\/icon.svg?rev=2968950","icon":"https:\/\/ps.w.org\/wp-newrelic\/assets\/icon.svg?rev=2968950","icon_2x":false,"generated":false},"screenshots":[],"raw_content":"<!--section=description-->\n<p>WP New Relic (WPNR) is designed to use with <a href=\"https:\/\/newrelic.com\/application-monitoring\">New Relic APM<\/a> which uses <a href=\"https:\/\/docs.newrelic.com\/docs\/agents\/php-agent\/configuration\/php-agent-api\">New Relic PHP Agent API<\/a> to properly augment existing metrics with valuable WordPress details such as templates, users, request type, transaction names etc. This plugin is tested with PHP Agent 10.19.0.9.<\/p>\n\n<p>New Relic is a trademark of New Relic, Inc.<\/p>\n\n<h4>Admin Settings<\/h4>\n\n<p>After activating the plugin, You will see a new option named <strong>New Relic<\/strong> under the Tools menu in your WordPress Dashboard. If you are running WordPress in Network Mode, the settings page will be found in your Network Dashboard.<\/p>\n\n<p>Capture URL Parameters: If Capture URLs setting is enabled, it will capture URL parameters for displaying in transaction traces.<\/p>\n\n<h4>Basic Config<\/h4>\n\n<p>By default plugin will setup 3 configs.\n- newrelic.appname\n- newrelic.capture_params\n- newrelic.framework (value is wordpress)<\/p>\n\n<p>appname and capture_params config can be override using <strong>wp_nr_config filter<\/strong>. <strong>wp_nr_setup_config<\/strong> action hook can also be used to setup any extra config.<\/p>\n\n<h4>New Relic Custom Attributes<\/h4>\n\n<p>Certain useful custom attrribute (just like WordPress post meta) will be set for each event which can provide additional information using key-value pair. You can query events and filter them using these attributes in New Relic Insights. See <a href=\"https:\/\/docs.newrelic.com\/docs\/insights\/new-relic-insights\/using-new-relic-query-language\/nrql-reference\">NRQL reference<\/a> for more details on how to query events.<\/p>\n\n<ol>\n<li><p><strong>User<\/strong><\/p>\n\n<p>User attribute is getting set using <a href=\"https:\/\/docs.newrelic.com\/docs\/agents\/php-agent\/configuration\/php-agent-api#api-set-user-attributes\">newrelic_set_user_attributes<\/a>. If user is logged in, user ID will be set to user attribute and if not it will be set to <strong>not-logged-in<\/strong>.\nEx: In New Relic Insights you can query transactions for non-logged in users as\nSELECT * FROM Transaction WHERE appName = '{appName}' AND user = 'not-logged-in'<\/p><\/li>\n<li><p><strong>Post ID<\/strong><\/p>\n\n<p>For single post, post ID will be set via <strong>post_id<\/strong> custom parameter in transaction.<\/p>\n\n<p>Ex: Get all transactions for a post ID 190.<\/p>\n\n<p>SELECT * FROM Transaction WHERE appName = '{appName}' AND post_id = '190'<\/p>\n\n<p>One can also query for post view count for post 190.<\/p>\n\n<p>SELECT count(*) FROM Transaction WHERE appName = '{appName}' AND post_id = '190'<\/p><\/li>\n<li><p><strong>Template<\/strong><\/p>\n\n<p>For each request, template being used getting set as <strong>template<\/strong> custom parameter in transaction.<\/p>\n\n<p>Ex: You can query all transactions for a particular template as following.<\/p>\n\n<p>SELECT * FROM Transaction WHERE appName = '{appName}' AND template = '{Absolute Template Path}'<\/p><\/li>\n<li><p><strong>Theme<\/strong><\/p>\n\n<p>Current theme is getting set as <strong>theme<\/strong> custom parameter in transaction.<\/p>\n\n<p>Ex: Query all transactions for \"Twenty Fifteen\" theme.<\/p>\n\n<p>SELECT * FROM Transaction WHERE appName = '{appName}' AND theme = 'Twenty Fifteen'<\/p><\/li>\n<li><p><strong>Request type<\/strong><\/p>\n\n<p>There can be 3 type of requests namely web, ajax and cli. Current request type getting set as <strong>request_type<\/strong> custom parameter in transaction.\nRequest type can be override using wp_nr_request_type filter.<\/p>\n\n<p>Ex: Get all transaction for \"ajax\" request type<\/p>\n\n<p>SELECT * FROM Transaction WHERE appName = '{appName}' AND request_type = 'ajax'<\/p><\/li>\n<li><p><strong>Transaction Name<\/strong><\/p>\n\n<p>Transaction name is getting set as per the main WP_Query parameters using <a href=\"https:\/\/docs.newrelic.com\/docs\/agents\/php-agent\/configuration\/php-agent-api#api-name-wt\">newrelic_name_transaction<\/a>.\nPossible values are Default Home Page, Front Page, Blog Page, Network Dashboard, Dashboard, Single - {post_type}, Page - {pagename}, Date Archive, Search Page, Feed, Archive - {post_type}, Category - {cat_name}, Tag - {tag_name}, Tax - {taxonomy} - {term}<\/p><\/li>\n<li><p><strong>Custom Error Logging<\/strong><\/p>\n\n<p>Using <strong>wp_nr_log_errors<\/strong> function, any plugin\/theme can log errors\/notices to New Relic for current transaction.\nNote: This function can be used more than once but only last use will be considered to log the error to New Relic. It\u2019s limitation of <a href=\"https:\/\/docs.newrelic.com\/docs\/agents\/php-agent\/configuration\/php-agent-api#api-notice-error\">PHP Agent API<\/a>.<\/p>\n\n<p><strong>wp_nr_log_errors( 'Error message', Exception $exception );<\/strong><\/p><\/li>\n<li><p><strong>Runtime of async tasks<\/strong><\/p>\n\n<p>This plugin also tracks runtime of <a href=\"https:\/\/github.com\/10up\/WP-Gears\">gearman<\/a> async tasks. Gearman async task run for a particular hook and it\u2019s runtime can be track using \u201cwp_async_task-{hook}\u201d custom attribute in New Relic Insights.<\/p><\/li>\n<\/ol>\n\n<h4>Issues<\/h4>\n\n<ol>\n<li><p><strong>PHP version<\/strong>\nPHP version 7.3.3 is known to cause issues with this plugin, updating to 7.3.11 or greater appears to resolve these issues.  For more details, see <a href=\"https:\/\/github.com\/10up\/wp-newrelic\/issues\/39\">issue#39<\/a>.<\/p><\/li>\n<li><p><strong>Have an issue to report?<\/strong>\nIf you identify any errors or have an idea for improving the plugin, please open an <a href=\"https:\/\/github.com\/10up\/wp-newrelic\/issues?stage=open\">issue<\/a>. We're excited to see what the community thinks of this project, and we would love your input!<\/p><\/li>\n<\/ol>\n\n<!--section=installation-->\n<ol>\n<li>First, you will need to <a href=\"https:\/\/docs.newrelic.com\/docs\/agents\/php-agent\/getting-started\/new-relic-php\">install and configure<\/a> New Relic PHP agent on server.<\/li>\n<li>Activate the plugin in WordPress.<\/li>\n<li>Enjoy!<\/li>\n<\/ol>\n\n<!--section=changelog-->\n<h4>1.3.3 - 2024-06-26<\/h4>\n\n<p><strong>Note this release bumps the PHP minimum from 7.3.11 to 8.0 and the WordPress minimum from 4.0 to 6.3.<\/strong>\n* <strong>Added:<\/strong> Minimum PHP version check for 7.3.11 (props <a href=\"https:\/\/github.com\/bmarshall511\">@bmarshall511<\/a>, <a href=\"https:\/\/github.com\/Sidsector9\">@Sidsector9<\/a> via <a href=\"https:\/\/github.com\/10up\/wp-newrelic\/pull\/60\">#60<\/a>).\n* <strong>Changed:<\/strong> <a href=\"https:\/\/github.com\/10up\/wp-newrelic?tab=readme-ov-file#support-level\">Support Level<\/a> downgraded from <code>Active<\/code> to <code>Stable<\/code> (props <a href=\"https:\/\/github.com\/jeffpaul\">@jeffpaul<\/a>, <a href=\"https:\/\/github.com\/dkotter\">@dkotter<\/a>, <a href=\"https:\/\/github.com\/felipeelia\">@felipeelia<\/a>, <a href=\"https:\/\/github.com\/oscarssanchezz\">@oscarssanchezz<\/a> via <a href=\"https:\/\/github.com\/10up\/wp-newrelic\/pull\/65\">#65<\/a>).\n* <strong>Changed:<\/strong> Bump WordPress \"tested up to\" version 6.5 (props <a href=\"https:\/\/github.com\/zamanq\">@zamanq<\/a>, <a href=\"https:\/\/github.com\/jeffpaul\">@jeffpaul<\/a>, <a href=\"https:\/\/github.com\/oscarssanchezz\">@oscarssanchezz<\/a> via <a href=\"https:\/\/github.com\/10up\/wp-newrelic\/pull\/58\">#58<\/a>, <a href=\"https:\/\/github.com\/10up\/wp-newrelic\/pull\/66\">#66<\/a>).\n* <strong>Fixed:<\/strong> Improve compatibility with PHP 8.1 by replacing the deprecated <code>FILTER_SANITIZE_STRING<\/code> (props <a href=\"https:\/\/github.com\/burhandodhy\">@burhandodhy<\/a>, <a href=\"https:\/\/github.com\/jeffpaul\">@jeffpaul<\/a>, <a href=\"https:\/\/github.com\/felipeelia\">@felipeelia<\/a>, <a href=\"mailto:&#x76;e&#110;&#x6d;&#115;&#x40;&#103;&#x6d;&#097;&#x69;&#108;&#046;&#x63;&#111;&#x6d;\">Sven<\/a> via <a href=\"https:\/\/github.com\/10up\/wp-newrelic\/pull\/68\">#68<\/a>).<\/p>\n\n<h4>1.3.2 - 2022-06-28<\/h4>\n\n<ul>\n<li><strong>Changed:<\/strong> Bump WordPress version \"tested up to\" 6.0 (props <a href=\"https:\/\/github.com\/lukecav\">@lukecav<\/a>, <a href=\"https:\/\/github.com\/burhandodhy\">@burhandodhy<\/a>, <a href=\"https:\/\/github.com\/jeffpaul\">@jeffpaul<\/a> via <a href=\"https:\/\/github.com\/10up\/wp-newrelic\/pull\/45\">#45<\/a>, <a href=\"https:\/\/github.com\/10up\/wp-newrelic\/pull\/49\">#49<\/a>).<\/li>\n<\/ul>\n\n<p><a href=\"https:\/\/github.com\/10up\/wp-newrelic\/blob\/develop\/CHANGELOG.md\">View historical changelog details here<\/a>.<\/p>","raw_excerpt":"New Relic APM reports for WordPress.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/kin.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/53459","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kin.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/kin.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/kin.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=53459"}],"author":[{"embeddable":true,"href":"https:\/\/kin.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/10up"}],"wp:attachment":[{"href":"https:\/\/kin.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=53459"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/kin.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=53459"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/kin.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=53459"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/kin.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=53459"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/kin.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=53459"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/kin.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=53459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}