Skip to content

Commit 3b74f22

Browse files
authored
Add http.route to wordpress (#2491)
Add http.route to wordpress
1 parent df13924 commit 3b74f22

File tree

39 files changed

+534
-28
lines changed

39 files changed

+534
-28
lines changed

src/Integrations/Integrations/WordPress/V1/WordPressIntegrationLoader.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,15 @@ public function load(WordPressIntegration $integration)
238238
$span->meta[Tag::COMPONENT] = WordPressIntegration::NAME;
239239
});
240240

241+
\DDTrace\hook_method('WP', 'main', null, function ($This, $scope, $args) use ($rootSpan) {
242+
if (\property_exists($This, 'did_permalink') && $This->did_permalink === true &&
243+
function_exists('is_404') && is_404() === false) {
244+
if (\property_exists($This, 'matched_rule')) {
245+
$rootSpan->meta[Tag::HTTP_ROUTE] = $This->matched_rule;
246+
}
247+
}
248+
});
249+
241250
return Integration::LOADED;
242251
}
243252
}

src/Integrations/Integrations/WordPress/V2/WordPressIntegrationLoader.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
use DDTrace\Util\Normalizer;
1212

1313
use function DDTrace\hook_function;
14+
use function DDTrace\hook_method;
1415
use function DDTrace\install_hook;
1516
use function DDTrace\remove_hook;
1617
use function DDTrace\set_user;
@@ -725,6 +726,16 @@ function (HookData $hook) use (
725726
}
726727
);
727728

729+
\DDTrace\hook_method('WP', 'main', null, function ($This, $scope, $args) {
730+
if (\property_exists($This, 'did_permalink') && $This->did_permalink === true &&
731+
function_exists('is_404') && is_404() === false) {
732+
$rootSpan = \DDTrace\root_span();
733+
if (\property_exists($This, 'matched_rule')) {
734+
$rootSpan->meta[Tag::HTTP_ROUTE] = $This->matched_rule;
735+
}
736+
}
737+
});
738+
728739
return Integration::LOADED;
729740
}
730741
}

tests/Frameworks/WordPress/Version_6_1/scripts/wp_initdb.sql

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/snapshots/tests.integrations.word_press.v4_8.common_scenarios_callbacks_test.test_scenario_get_return_string.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"_dd.p.dm": "-0",
1212
"component": "wordpress",
1313
"http.method": "GET",
14+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1415
"http.status_code": "200",
1516
"http.url": "http://localhost:9999/simple?key=value&<redacted>",
1617
"runtime-id": "ca4d22f2-9347-458f-be03-e9defbc1af52",

tests/snapshots/tests.integrations.word_press.v4_8.common_scenarios_callbacks_test.test_scenario_get_with_exception.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"error.stack": "#0 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-includes/class-wp-hook.php(298): datadog_parse_request()\n#1 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters()\n#2 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-includes/plugin.php(515): WP_Hook->do_action()\n#3 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-includes/class-wp.php(388): do_action_ref_array()\n#4 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-includes/class-wp.php(735): WP->parse_request()\n#5 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-includes/functions.php(955): WP->main()\n#6 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-blog-header.php(16): wp()\n#7 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/index.php(17): require()\n#8 {main}",
1616
"error.type": "Exception",
1717
"http.method": "GET",
18+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1819
"http.status_code": "200",
1920
"http.url": "http://localhost:9999/error?key=value&<redacted>",
2021
"runtime-id": "2ee1d558-5813-4a2b-a74e-1404119c4473",

tests/snapshots/tests.integrations.word_press.v4_8.common_scenarios_callbacks_test.test_scenario_get_with_view.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"_dd.p.dm": "-0",
1212
"component": "wordpress",
1313
"http.method": "GET",
14+
"http.route": "(.?.+?)(?:/([0-9]+))?/?$",
1415
"http.status_code": "200",
1516
"http.url": "http://localhost:9999/simple_view?key=value&<redacted>",
1617
"runtime-id": "6732cc6a-78ad-4ca4-b1ea-5eb516ff75f0",

tests/snapshots/tests.integrations.word_press.v4_8.common_scenarios_legacy_test.test_scenario_get_return_string.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"_dd.p.dm": "-0",
1212
"component": "wordpress",
1313
"http.method": "GET",
14+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1415
"http.status_code": "200",
1516
"http.url": "http://localhost:9999/simple?key=value&<redacted>",
1617
"runtime-id": "dccda1ae-615d-4300-bae1-1ba83e60ac15",

tests/snapshots/tests.integrations.word_press.v4_8.common_scenarios_legacy_test.test_scenario_get_with_exception.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"error.stack": "#0 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-includes/class-wp-hook.php(298): datadog_parse_request()\n#1 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters()\n#2 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-includes/plugin.php(515): WP_Hook->do_action()\n#3 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-includes/class-wp.php(388): do_action_ref_array()\n#4 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-includes/class-wp.php(735): WP->parse_request()\n#5 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-includes/functions.php(955): WP->main()\n#6 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-blog-header.php(16): wp()\n#7 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/index.php(17): require()\n#8 {main}",
1616
"error.type": "Exception",
1717
"http.method": "GET",
18+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1819
"http.status_code": "200",
1920
"http.url": "http://localhost:9999/error?key=value&<redacted>",
2021
"runtime-id": "dccda1ae-615d-4300-bae1-1ba83e60ac15",

tests/snapshots/tests.integrations.word_press.v4_8.common_scenarios_legacy_test.test_scenario_get_with_view.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"_dd.p.dm": "-0",
1212
"component": "wordpress",
1313
"http.method": "GET",
14+
"http.route": "(.?.+?)(?:/([0-9]+))?/?$",
1415
"http.status_code": "200",
1516
"http.url": "http://localhost:9999/simple_view?key=value&<redacted>",
1617
"runtime-id": "dccda1ae-615d-4300-bae1-1ba83e60ac15",

tests/snapshots/tests.integrations.word_press.v4_8.common_scenarios_test.test_scenario_get_return_string.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"_dd.p.dm": "-0",
1212
"component": "wordpress",
1313
"http.method": "GET",
14+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1415
"http.status_code": "200",
1516
"http.url": "http://localhost:9999/simple?key=value&<redacted>",
1617
"runtime-id": "a4fe8a3c-397d-4da6-afb8-53617be50dbe",

tests/snapshots/tests.integrations.word_press.v4_8.common_scenarios_test.test_scenario_get_with_exception.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"error.stack": "#0 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-includes/class-wp-hook.php(298): datadog_parse_request()\n#1 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-includes/class-wp-hook.php(323): WP_Hook->apply_filters()\n#2 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-includes/plugin.php(515): WP_Hook->do_action()\n#3 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-includes/class-wp.php(388): do_action_ref_array()\n#4 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-includes/class-wp.php(735): WP->parse_request()\n#5 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-includes/functions.php(955): WP->main()\n#6 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/wp-blog-header.php(16): wp()\n#7 /home/circleci/datadog/tests/Frameworks/WordPress/Version_4_8/index.php(17): require()\n#8 {main}",
1616
"error.type": "Exception",
1717
"http.method": "GET",
18+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1819
"http.status_code": "200",
1920
"http.url": "http://localhost:9999/error?key=value&<redacted>",
2021
"runtime-id": "06e879d2-e97d-4420-81ec-30074239cf68",

tests/snapshots/tests.integrations.word_press.v4_8.common_scenarios_test.test_scenario_get_with_view.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"_dd.p.dm": "-0",
1212
"component": "wordpress",
1313
"http.method": "GET",
14+
"http.route": "(.?.+?)(?:/([0-9]+))?/?$",
1415
"http.status_code": "200",
1516
"http.url": "http://localhost:9999/simple_view?key=value&<redacted>",
1617
"runtime-id": "06e879d2-e97d-4420-81ec-30074239cf68",

tests/snapshots/tests.integrations.word_press.v5_5.common_scenarios_callbacks_test.test_scenario_get_return_string.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"_dd.p.dm": "-0",
1212
"component": "wordpress",
1313
"http.method": "GET",
14+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1415
"http.status_code": "200",
1516
"http.url": "http://localhost:9999/simple?key=value&<redacted>",
1617
"runtime-id": "bb23676d-44d0-4bd7-8c2a-fc5a5c89985a",

tests/snapshots/tests.integrations.word_press.v5_5.common_scenarios_callbacks_test.test_scenario_get_with_exception.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"error.stack": "#0 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-includes/class-wp-hook.php(287): datadog_parse_request()\n#1 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters()\n#2 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-includes/plugin.php(544): WP_Hook->do_action()\n#3 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-includes/class-wp.php(388): do_action_ref_array()\n#4 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-includes/class-wp.php(745): WP->parse_request()\n#5 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-includes/functions.php(1285): WP->main()\n#6 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-blog-header.php(16): wp()\n#7 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/index.php(17): require()\n#8 {main}",
1616
"error.type": "Exception",
1717
"http.method": "GET",
18+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1819
"http.status_code": "200",
1920
"http.url": "http://localhost:9999/error?key=value&<redacted>",
2021
"runtime-id": "7b42d084-3a90-4688-9319-30e9724039bb",

tests/snapshots/tests.integrations.word_press.v5_5.common_scenarios_callbacks_test.test_scenario_get_with_view.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"_dd.p.dm": "-0",
1212
"component": "wordpress",
1313
"http.method": "GET",
14+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1415
"http.status_code": "200",
1516
"http.url": "http://localhost:9999/simple_view?key=value&<redacted>",
1617
"runtime-id": "7b42d084-3a90-4688-9319-30e9724039bb",

tests/snapshots/tests.integrations.word_press.v5_5.common_scenarios_legacy_test.test_scenario_get_return_string.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"_dd.p.dm": "-0",
1212
"component": "wordpress",
1313
"http.method": "GET",
14+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1415
"http.status_code": "200",
1516
"http.url": "http://localhost:9999/simple?key=value&<redacted>",
1617
"runtime-id": "0ff18d67-3374-49ef-aadd-4a242ab14a9d",

tests/snapshots/tests.integrations.word_press.v5_5.common_scenarios_legacy_test.test_scenario_get_with_exception.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"error.stack": "#0 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-includes/class-wp-hook.php(287): datadog_parse_request()\n#1 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters()\n#2 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-includes/plugin.php(544): WP_Hook->do_action()\n#3 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-includes/class-wp.php(388): do_action_ref_array()\n#4 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-includes/class-wp.php(745): WP->parse_request()\n#5 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-includes/functions.php(1285): WP->main()\n#6 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-blog-header.php(16): wp()\n#7 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/index.php(17): require()\n#8 {main}",
1616
"error.type": "Exception",
1717
"http.method": "GET",
18+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1819
"http.status_code": "200",
1920
"http.url": "http://localhost:9999/error?key=value&<redacted>",
2021
"runtime-id": "0ff18d67-3374-49ef-aadd-4a242ab14a9d",

tests/snapshots/tests.integrations.word_press.v5_5.common_scenarios_legacy_test.test_scenario_get_with_view.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"_dd.p.dm": "-0",
1212
"component": "wordpress",
1313
"http.method": "GET",
14+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1415
"http.status_code": "200",
1516
"http.url": "http://localhost:9999/simple_view?key=value&<redacted>",
1617
"runtime-id": "0ff18d67-3374-49ef-aadd-4a242ab14a9d",

tests/snapshots/tests.integrations.word_press.v5_5.common_scenarios_test.test_scenario_get_return_string.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"_dd.p.dm": "-0",
1212
"component": "wordpress",
1313
"http.method": "GET",
14+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1415
"http.status_code": "200",
1516
"http.url": "http://localhost:9999/simple?key=value&<redacted>",
1617
"runtime-id": "9244a46d-d13c-4bce-b787-87c52dd20f33",

tests/snapshots/tests.integrations.word_press.v5_5.common_scenarios_test.test_scenario_get_with_exception.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"error.stack": "#0 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-includes/class-wp-hook.php(287): datadog_parse_request()\n#1 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters()\n#2 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-includes/plugin.php(544): WP_Hook->do_action()\n#3 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-includes/class-wp.php(388): do_action_ref_array()\n#4 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-includes/class-wp.php(745): WP->parse_request()\n#5 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-includes/functions.php(1285): WP->main()\n#6 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/wp-blog-header.php(16): wp()\n#7 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_5/index.php(17): require()\n#8 {main}",
1616
"error.type": "Exception",
1717
"http.method": "GET",
18+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1819
"http.status_code": "200",
1920
"http.url": "http://localhost:9999/error?key=value&<redacted>",
2021
"runtime-id": "7a9eb703-4857-4061-adce-a45e58093b65",

tests/snapshots/tests.integrations.word_press.v5_5.common_scenarios_test.test_scenario_get_with_view.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"_dd.p.dm": "-0",
1212
"component": "wordpress",
1313
"http.method": "GET",
14+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1415
"http.status_code": "200",
1516
"http.url": "http://localhost:9999/simple_view?key=value&<redacted>",
1617
"runtime-id": "b5e7ee20-5ea1-486f-a770-c17a3b60636e",

tests/snapshots/tests.integrations.word_press.v5_9.common_scenarios_callbacks_test.test_scenario_get_return_string.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"_dd.p.dm": "-0",
1212
"component": "wordpress",
1313
"http.method": "GET",
14+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1415
"http.status_code": "200",
1516
"http.url": "http://localhost:9999/simple?key=value&<redacted>",
1617
"runtime-id": "95e244b4-fc3a-4566-8940-d2badc3e99b5",

tests/snapshots/tests.integrations.word_press.v5_9.common_scenarios_callbacks_test.test_scenario_get_with_exception.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"error.stack": "#0 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-includes/class-wp-hook.php(307): datadog_parse_request()\n#1 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()\n#2 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-includes/plugin.php(522): WP_Hook->do_action()\n#3 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-includes/class-wp.php(396): do_action_ref_array()\n#4 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-includes/class-wp.php(758): WP->parse_request()\n#5 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-includes/functions.php(1310): WP->main()\n#6 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-blog-header.php(16): wp()\n#7 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/index.php(17): require()\n#8 {main}",
1616
"error.type": "Exception",
1717
"http.method": "GET",
18+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1819
"http.status_code": "200",
1920
"http.url": "http://localhost:9999/error?key=value&<redacted>",
2021
"runtime-id": "eae4f3b0-bd58-46e8-ac81-96149959e17a",

tests/snapshots/tests.integrations.word_press.v5_9.common_scenarios_callbacks_test.test_scenario_get_with_view.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"_dd.p.dm": "-0",
1212
"component": "wordpress",
1313
"http.method": "GET",
14+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1415
"http.status_code": "200",
1516
"http.url": "http://localhost:9999/simple_view?key=value&<redacted>",
1617
"runtime-id": "95e244b4-fc3a-4566-8940-d2badc3e99b5",

tests/snapshots/tests.integrations.word_press.v5_9.common_scenarios_legacy_test.test_scenario_get_return_string.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"_dd.p.dm": "-0",
1212
"component": "wordpress",
1313
"http.method": "GET",
14+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1415
"http.status_code": "200",
1516
"http.url": "http://localhost:9999/simple?key=value&<redacted>",
1617
"runtime-id": "37ac3b3a-349e-47b8-91b6-924b1abbbd25",

tests/snapshots/tests.integrations.word_press.v5_9.common_scenarios_legacy_test.test_scenario_get_with_exception.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"error.stack": "#0 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-includes/class-wp-hook.php(307): datadog_parse_request()\n#1 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()\n#2 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-includes/plugin.php(522): WP_Hook->do_action()\n#3 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-includes/class-wp.php(396): do_action_ref_array()\n#4 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-includes/class-wp.php(758): WP->parse_request()\n#5 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-includes/functions.php(1310): WP->main()\n#6 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-blog-header.php(16): wp()\n#7 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/index.php(17): require()\n#8 {main}",
1616
"error.type": "Exception",
1717
"http.method": "GET",
18+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1819
"http.status_code": "200",
1920
"http.url": "http://localhost:9999/error?key=value&<redacted>",
2021
"runtime-id": "37ac3b3a-349e-47b8-91b6-924b1abbbd25",

tests/snapshots/tests.integrations.word_press.v5_9.common_scenarios_legacy_test.test_scenario_get_with_view.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"_dd.p.dm": "-0",
1212
"component": "wordpress",
1313
"http.method": "GET",
14+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1415
"http.status_code": "200",
1516
"http.url": "http://localhost:9999/simple_view?key=value&<redacted>",
1617
"runtime-id": "37ac3b3a-349e-47b8-91b6-924b1abbbd25",

tests/snapshots/tests.integrations.word_press.v5_9.common_scenarios_test.test_scenario_get_return_string.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"_dd.p.dm": "-0",
1212
"component": "wordpress",
1313
"http.method": "GET",
14+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1415
"http.status_code": "200",
1516
"http.url": "http://localhost:9999/simple?key=value&<redacted>",
1617
"runtime-id": "500b19ab-e36c-4cbc-a9dd-f15015a52ccf",

tests/snapshots/tests.integrations.word_press.v5_9.common_scenarios_test.test_scenario_get_with_exception.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"error.stack": "#0 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-includes/class-wp-hook.php(307): datadog_parse_request()\n#1 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters()\n#2 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-includes/plugin.php(522): WP_Hook->do_action()\n#3 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-includes/class-wp.php(396): do_action_ref_array()\n#4 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-includes/class-wp.php(758): WP->parse_request()\n#5 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-includes/functions.php(1310): WP->main()\n#6 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/wp-blog-header.php(16): wp()\n#7 /home/circleci/datadog/tests/Frameworks/WordPress/Version_5_9/index.php(17): require()\n#8 {main}",
1616
"error.type": "Exception",
1717
"http.method": "GET",
18+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1819
"http.status_code": "200",
1920
"http.url": "http://localhost:9999/error?key=value&<redacted>",
2021
"runtime-id": "500b19ab-e36c-4cbc-a9dd-f15015a52ccf",

tests/snapshots/tests.integrations.word_press.v5_9.common_scenarios_test.test_scenario_get_with_view.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"_dd.p.dm": "-0",
1212
"component": "wordpress",
1313
"http.method": "GET",
14+
"http.route": "([^/]+)(?:/([0-9]+))?/?$",
1415
"http.status_code": "200",
1516
"http.url": "http://localhost:9999/simple_view?key=value&<redacted>",
1617
"runtime-id": "c1971c1f-c171-4612-ba42-df98413a59df",

0 commit comments

Comments
 (0)