diff --git a/tests/Integration/DatabaseMonitoringTest.php b/tests/Integration/DatabaseMonitoringTest.php index 6e36b3dd02..7bf3c60264 100644 --- a/tests/Integration/DatabaseMonitoringTest.php +++ b/tests/Integration/DatabaseMonitoringTest.php @@ -4,6 +4,7 @@ use DDTrace\HookData; use DDTrace\Integrations\DatabaseIntegrationHelper; +use DDTrace\Integrations\Integration; use DDTrace\Tests\Common\IntegrationTestCase; use DDTrace\Tests\Common\SpanAssertion; @@ -62,7 +63,7 @@ public function testInjectionServiceMappingOnce() try { $hook = \DDTrace\install_hook(self::class . "::instrumented", function (HookData $hook) { $span = $hook->span(); - $span->service = "pdo"; + Integration::handleInternalSpanServiceName($span, "pdo"); $span->name = "instrumented"; DatabaseIntegrationHelper::injectDatabaseIntegrationData($hook, 'mysql', 1); }); @@ -94,7 +95,7 @@ public function testInjectionServiceMappingTwice() try { $hook = \DDTrace\install_hook(self::class . "::instrumented", function (HookData $hook) { $span = $hook->span(); - $span->service = "pdo"; + Integration::handleInternalSpanServiceName($span, "pdo"); $span->name = "instrumented"; DatabaseIntegrationHelper::injectDatabaseIntegrationData($hook, 'mysql', 1); });