From baef8a005ba55882ff7b8d2d9cb75bdb48ee60f1 Mon Sep 17 00:00:00 2001 From: Federico Mon Date: Thu, 23 Apr 2026 17:49:32 +0200 Subject: [PATCH 1/4] use dockerized selenium --- docker-compose.yml | 9 + tests/ci_visibility/suitespec.yml | 2 + .../contrib/selenium/test_selenium_chrome.py | 142 +++---- ...t_selenium_chrome_pytest_rum_disabled.json | 370 ++++++++--------- ...st_selenium_chrome_pytest_rum_enabled.json | 372 +++++++++--------- ...unpatch_does_not_record_selenium_tags.json | 360 ++++++++--------- 6 files changed, 632 insertions(+), 623 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 960e994e0d6..5665c98ae7a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -190,6 +190,15 @@ services: - "127.0.0.1:10002:10002" + selenium-chrome: + image: selenium/standalone-chrome:latest + platform: linux/amd64 + network_mode: host + environment: + - SE_NODE_MAX_SESSIONS=2 + - SE_VNC_NO_PASSWORD=1 + shm_size: 2g + testrunner: # DEV uncomment to test local changes to the Dockerfile # build: diff --git a/tests/ci_visibility/suitespec.yml b/tests/ci_visibility/suitespec.yml index a4194d3b0c7..04c6c4e9a1e 100644 --- a/tests/ci_visibility/suitespec.yml +++ b/tests/ci_visibility/suitespec.yml @@ -170,6 +170,8 @@ suites: - tests/contrib/selenium/* - tests/snapshots/test_selenium* snapshot: true + services: + - selenium-chrome unittest: parallelism: 2 paths: diff --git a/tests/contrib/selenium/test_selenium_chrome.py b/tests/contrib/selenium/test_selenium_chrome.py index 2816b3497b3..480ba39113c 100644 --- a/tests/contrib/selenium/test_selenium_chrome.py +++ b/tests/contrib/selenium/test_selenium_chrome.py @@ -1,8 +1,8 @@ """Tests for selenium + RUM integration -IMPORTANT NOTE: these tests only reliably work on Linux/x86_64 due to some annoyingly picky issues with installing -Selenium and a working browser/webdriver combination on non-x86_64 architectures (at time of writing, at least, -Selenium's webdriver-manager doesn't support Linux on non-x86_64). +Uses a Selenium Grid (selenium/standalone-chrome, linux/amd64) via webdriver.Remote so that +tests work on any host architecture including arm64. The grid is started as a Docker service +and listens on localhost:4444 (via network_mode: host). """ import http.server @@ -10,7 +10,6 @@ import multiprocessing import os from pathlib import Path -import platform import socketserver import subprocess import textwrap @@ -45,6 +44,23 @@ "start", ] +# Selenium Grid endpoint — standalone-chrome runs with network_mode: host so it binds on localhost +SELENIUM_GRID_URL = "http://localhost:4444" + +_SELENIUM_DRIVER_SETUP = f"""\ + from selenium import webdriver + from selenium.webdriver.common.by import By + from selenium.webdriver.chrome.options import Options + + SELENIUM_GRID_URL = "{SELENIUM_GRID_URL}" + + def _make_driver(): + options = Options() + options.add_argument("--headless") + options.add_argument("--no-sandbox") + return webdriver.Remote(command_executor=SELENIUM_GRID_URL, options=options) +""" + @pytest.fixture def _http_server(scope="function"): @@ -74,39 +90,29 @@ def _run_server(): @snapshot(ignores=SELENIUM_SNAPSHOT_IGNORES) -@pytest.mark.skipif(platform.machine() != "x86_64", reason="Selenium Chrome tests only run on x86_64") def test_selenium_chrome_pytest_rum_enabled(_http_server, testdir, git_repo): selenium_test_script = textwrap.dedent( - """ - from pathlib import Path + _SELENIUM_DRIVER_SETUP + + """ + def test_selenium_local_pass(): + with _make_driver() as driver: + url = "http://localhost:8079/rum_enabled/page_1.html" - from selenium import webdriver - from selenium.webdriver.common.by import By - from selenium.webdriver.chrome.options import Options + driver.get(url) - def test_selenium_local_pass(): - options = Options() - options.add_argument("--headless") - options.add_argument("--no-sandbox") + assert driver.title == "Page 1" - with webdriver.Chrome(options=options) as driver: - url = "http://localhost:8079/rum_enabled/page_1.html" + link_2 = driver.find_element(By.LINK_TEXT, "Page 2") - driver.get(url) + link_2.click() - assert driver.title == "Page 1" + assert driver.title == "Page 2" - link_2 = driver.find_element(By.LINK_TEXT, "Page 2") + link_1 = driver.find_element(By.LINK_TEXT, "Back to page 1.") + link_1.click() - link_2.click() - - assert driver.title == "Page 2" - - link_1 = driver.find_element(By.LINK_TEXT, "Back to page 1.") - link_1.click() - - assert driver.title == "Page 1" - """ + assert driver.title == "Page 1" + """ ) testdir.makepyfile(test_selenium=selenium_test_script) subprocess.run( @@ -127,39 +133,29 @@ def test_selenium_local_pass(): @snapshot(ignores=SELENIUM_SNAPSHOT_IGNORES) -@pytest.mark.skipif(platform.machine() != "x86_64", reason="Selenium Chrome tests only run on x86_64") def test_selenium_chrome_pytest_rum_disabled(_http_server, testdir, git_repo): selenium_test_script = textwrap.dedent( - """ - from pathlib import Path + _SELENIUM_DRIVER_SETUP + + """ + def test_selenium_local_pass(): + with _make_driver() as driver: + url = "http://localhost:8079/rum_disabled/page_1.html" - from selenium import webdriver - from selenium.webdriver.common.by import By - from selenium.webdriver.chrome.options import Options + driver.get(url) - def test_selenium_local_pass(): - options = Options() - options.add_argument("--headless") - options.add_argument("--no-sandbox") + assert driver.title == "Page 1" - with webdriver.Chrome(options=options) as driver: - url = "http://localhost:8079/rum_disabled/page_1.html" + link_2 = driver.find_element(By.LINK_TEXT, "Page 2") - driver.get(url) + link_2.click() - assert driver.title == "Page 1" + assert driver.title == "Page 2" - link_2 = driver.find_element(By.LINK_TEXT, "Page 2") + link_1 = driver.find_element(By.LINK_TEXT, "Back to page 1.") + link_1.click() - link_2.click() - - assert driver.title == "Page 2" - - link_1 = driver.find_element(By.LINK_TEXT, "Back to page 1.") - link_1.click() - - assert driver.title == "Page 1" - """ + assert driver.title == "Page 1" + """ ) testdir.makepyfile(test_selenium=selenium_test_script) subprocess.run( @@ -180,42 +176,32 @@ def test_selenium_local_pass(): @snapshot(ignores=SELENIUM_SNAPSHOT_IGNORES) -@pytest.mark.skipif(platform.machine() != "x86_64", reason="Selenium Chrome tests only run on x86_64") def test_selenium_chrome_pytest_unpatch_does_not_record_selenium_tags(_http_server, testdir, git_repo): selenium_test_script = textwrap.dedent( - """ - from pathlib import Path + _SELENIUM_DRIVER_SETUP + + """ + from ddtrace.contrib.internal.selenium.patch import unpatch - from selenium import webdriver - from selenium.webdriver.common.by import By - from selenium.webdriver.chrome.options import Options + def test_selenium_local_unpatch(): + unpatch() + with _make_driver() as driver: + url = "http://localhost:8079/rum_disabled/page_1.html" - from ddtrace.contrib.internal.selenium.patch import unpatch + driver.get(url) - def test_selenium_local_unpatch(): - unpatch() - options = Options() - options.add_argument("--headless") - options.add_argument("--no-sandbox") + assert driver.title == "Page 1" - with webdriver.Chrome(options=options) as driver: - url = "http://localhost:8079/rum_disabled/page_1.html" + link_2 = driver.find_element(By.LINK_TEXT, "Page 2") - driver.get(url) + link_2.click() - assert driver.title == "Page 1" + assert driver.title == "Page 2" - link_2 = driver.find_element(By.LINK_TEXT, "Page 2") + link_1 = driver.find_element(By.LINK_TEXT, "Back to page 1.") + link_1.click() - link_2.click() - - assert driver.title == "Page 2" - - link_1 = driver.find_element(By.LINK_TEXT, "Back to page 1.") - link_1.click() - - assert driver.title == "Page 1" - """ + assert driver.title == "Page 1" + """ ) testdir.makepyfile(test_selenium=selenium_test_script) subprocess.run( diff --git a/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_rum_disabled.json b/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_rum_disabled.json index ac5ff587137..6ec478cd4f0 100644 --- a/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_rum_disabled.json +++ b/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_rum_disabled.json @@ -1,186 +1,190 @@ -[[ - { - "name": "pytest.test_session", - "service": "pytest", - "resource": "pytest.test_session", - "trace_id": 0, - "span_id": 1, - "parent_id": 0, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f30a500000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime-id": "59d942ad4a7b4d07ba146936547f60c8", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.code_coverage.enabled": "false", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.itr.tests_skipping.enabled": "false", - "test.status": "pass", - "test_session_id": "13653929687187018380", - "type": "test_session_end" - }, - "metrics": { - "_dd.top_level": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1, - "process_id": 13623 - }, - "duration": 1151463759, - "start": 1733243045205773568 - }, - { - "name": "pytest.test_module", - "service": "pytest", - "resource": "pytest.test_module", - "trace_id": 0, - "span_id": 2, - "parent_id": 1, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f30a500000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.code_coverage.enabled": "false", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.itr.tests_skipping.enabled": "false", - "test.module": "", - "test.module_path": "", - "test.status": "pass", - "test_module_id": "6093764858853198442", - "test_session_id": "13653929687187018380", - "type": "test_module_end" - }, - "metrics": { - "_dd.py.partial_flush": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1 - }, - "duration": 1035492200, - "start": 1733243045320630899 - }, - { - "name": "pytest.test_suite", - "service": "pytest", - "resource": "pytest.test_suite", - "trace_id": 0, - "span_id": 3, - "parent_id": 2, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f30a500000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.module": "", - "test.module_path": "", - "test.status": "pass", - "test.suite": "test_selenium.py", - "test_module_id": "6093764858853198442", - "test_session_id": "13653929687187018380", - "test_suite_id": "1886109580838464934", - "type": "test_suite_end" - }, - "metrics": { - "_dd.py.partial_flush": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1 - }, - "duration": 1018521912, - "start": 1733243045320749085 - }], [ - { - "name": "pytest.test", - "service": "pytest", - "resource": "test_selenium.py::test_selenium_local_pass", - "trace_id": 1, - "span_id": 1, - "parent_id": 0, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f30a500000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime-id": "59d942ad4a7b4d07ba146936547f60c8", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.browser.driver": "selenium", - "test.browser.driver_version": "4.27.1", - "test.browser.name": "chrome", - "test.browser.version": "131.0.6778.85", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.final_status": "pass", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.is_browser": "true", - "test.module": "", - "test.module_path": "", - "test.name": "test_selenium_local_pass", - "test.source.file": "test_selenium.py", - "test.status": "pass", - "test.suite": "test_selenium.py", - "test.type": "test", - "test_module_id": "6093764858853198442", - "test_session_id": "13653929687187018380", - "test_suite_id": "1886109580838464934", - "type": "test" + [ + { + "name": "pytest.test_session", + "service": "pytest", + "resource": "pytest.test_session", + "trace_id": 0, + "span_id": 1, + "parent_id": 0, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f30a500000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime-id": "59d942ad4a7b4d07ba146936547f60c8", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.code_coverage.enabled": "false", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.itr.tests_skipping.enabled": "false", + "test.status": "pass", + "test_session_id": "13653929687187018380", + "type": "test_session_end" + }, + "metrics": { + "_dd.top_level": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1, + "process_id": 13623 + }, + "duration": 1151463759, + "start": 1733243045205773568 }, - "metrics": { - "_dd.top_level": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1, - "process_id": 13623, - "test.source.end": 29, - "test.source.start": 7 + { + "name": "pytest.test_module", + "service": "pytest", + "resource": "pytest.test_module", + "trace_id": 0, + "span_id": 2, + "parent_id": 1, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f30a500000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.code_coverage.enabled": "false", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.itr.tests_skipping.enabled": "false", + "test.module": "", + "test.module_path": "", + "test.status": "pass", + "test_module_id": "6093764858853198442", + "test_session_id": "13653929687187018380", + "type": "test_module_end" + }, + "metrics": { + "_dd.py.partial_flush": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1 + }, + "duration": 1035492200, + "start": 1733243045320630899 }, - "duration": 1035420043, - "start": 1733243045320806200 - }]] + { + "name": "pytest.test_suite", + "service": "pytest", + "resource": "pytest.test_suite", + "trace_id": 0, + "span_id": 3, + "parent_id": 2, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f30a500000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.module": "", + "test.module_path": "", + "test.status": "pass", + "test.suite": "test_selenium.py", + "test_module_id": "6093764858853198442", + "test_session_id": "13653929687187018380", + "test_suite_id": "1886109580838464934", + "type": "test_suite_end" + }, + "metrics": { + "_dd.py.partial_flush": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1 + }, + "duration": 1018521912, + "start": 1733243045320749085 + } + ], + [ + { + "name": "pytest.test", + "service": "pytest", + "resource": "test_selenium.py::test_selenium_local_pass", + "trace_id": 1, + "span_id": 1, + "parent_id": 0, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f30a500000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime-id": "59d942ad4a7b4d07ba146936547f60c8", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.browser.driver": "selenium", + "test.browser.driver_version": "4.27.1", + "test.browser.name": "chrome", + "test.browser.version": "131.0.6778.85", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.final_status": "pass", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.is_browser": "true", + "test.module": "", + "test.module_path": "", + "test.name": "test_selenium_local_pass", + "test.source.file": "test_selenium.py", + "test.status": "pass", + "test.suite": "test_selenium.py", + "test.type": "test", + "test_module_id": "6093764858853198442", + "test_session_id": "13653929687187018380", + "test_suite_id": "1886109580838464934", + "type": "test" + }, + "metrics": { + "_dd.top_level": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1, + "process_id": 13623, + "test.source.end": 31, + "test.source.start": 13 + }, + "duration": 1035420043, + "start": 1733243045320806200 + } + ] +] \ No newline at end of file diff --git a/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_rum_enabled.json b/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_rum_enabled.json index fe2f392d919..943419d29e2 100644 --- a/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_rum_enabled.json +++ b/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_rum_enabled.json @@ -1,187 +1,191 @@ -[[ - { - "name": "pytest.test_session", - "service": "pytest", - "resource": "pytest.test_session", - "trace_id": 0, - "span_id": 1, - "parent_id": 0, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f30a200000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime-id": "7302c641201a429b97db4b8c863fc1e9", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.code_coverage.enabled": "false", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.itr.tests_skipping.enabled": "false", - "test.status": "pass", - "test_session_id": "11779449984696132842", - "type": "test_session_end" - }, - "metrics": { - "_dd.top_level": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1, - "process_id": 13453 - }, - "duration": 1175555510, - "start": 1733243042959917377 - }, - { - "name": "pytest.test_module", - "service": "pytest", - "resource": "pytest.test_module", - "trace_id": 0, - "span_id": 2, - "parent_id": 1, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f30a200000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.code_coverage.enabled": "false", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.itr.tests_skipping.enabled": "false", - "test.module": "", - "test.module_path": "", - "test.status": "pass", - "test_module_id": "7190997582830612638", - "test_session_id": "11779449984696132842", - "type": "test_module_end" - }, - "metrics": { - "_dd.py.partial_flush": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1 - }, - "duration": 1056334178, - "start": 1733243043078015355 - }, - { - "name": "pytest.test_suite", - "service": "pytest", - "resource": "pytest.test_suite", - "trace_id": 0, - "span_id": 3, - "parent_id": 2, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f30a200000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.module": "", - "test.module_path": "", - "test.status": "pass", - "test.suite": "test_selenium.py", - "test_module_id": "7190997582830612638", - "test_session_id": "11779449984696132842", - "test_suite_id": "16799388353789766894", - "type": "test_suite_end" - }, - "metrics": { - "_dd.py.partial_flush": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1 - }, - "duration": 1039485691, - "start": 1733243043078144147 - }], [ - { - "name": "pytest.test", - "service": "pytest", - "resource": "test_selenium.py::test_selenium_local_pass", - "trace_id": 1, - "span_id": 1, - "parent_id": 0, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f30a300000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime-id": "7302c641201a429b97db4b8c863fc1e9", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.browser.driver": "selenium", - "test.browser.driver_version": "4.27.1", - "test.browser.name": "chrome", - "test.browser.version": "131.0.6778.85", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.final_status": "pass", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.is_browser": "true", - "test.is_rum_active": "true", - "test.module": "", - "test.module_path": "", - "test.name": "test_selenium_local_pass", - "test.source.file": "test_selenium.py", - "test.status": "pass", - "test.suite": "test_selenium.py", - "test.type": "test", - "test_module_id": "7190997582830612638", - "test_session_id": "11779449984696132842", - "test_suite_id": "16799388353789766894", - "type": "test" + [ + { + "name": "pytest.test_session", + "service": "pytest", + "resource": "pytest.test_session", + "trace_id": 0, + "span_id": 1, + "parent_id": 0, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f30a200000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime-id": "7302c641201a429b97db4b8c863fc1e9", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.code_coverage.enabled": "false", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.itr.tests_skipping.enabled": "false", + "test.status": "pass", + "test_session_id": "11779449984696132842", + "type": "test_session_end" + }, + "metrics": { + "_dd.top_level": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1, + "process_id": 13453 + }, + "duration": 1175555510, + "start": 1733243042959917377 }, - "metrics": { - "_dd.top_level": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1, - "process_id": 13453, - "test.source.end": 29, - "test.source.start": 7 + { + "name": "pytest.test_module", + "service": "pytest", + "resource": "pytest.test_module", + "trace_id": 0, + "span_id": 2, + "parent_id": 1, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f30a200000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.code_coverage.enabled": "false", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.itr.tests_skipping.enabled": "false", + "test.module": "", + "test.module_path": "", + "test.status": "pass", + "test_module_id": "7190997582830612638", + "test_session_id": "11779449984696132842", + "type": "test_module_end" + }, + "metrics": { + "_dd.py.partial_flush": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1 + }, + "duration": 1056334178, + "start": 1733243043078015355 }, - "duration": 1056245299, - "start": 1733243043078204615 - }]] + { + "name": "pytest.test_suite", + "service": "pytest", + "resource": "pytest.test_suite", + "trace_id": 0, + "span_id": 3, + "parent_id": 2, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f30a200000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.module": "", + "test.module_path": "", + "test.status": "pass", + "test.suite": "test_selenium.py", + "test_module_id": "7190997582830612638", + "test_session_id": "11779449984696132842", + "test_suite_id": "16799388353789766894", + "type": "test_suite_end" + }, + "metrics": { + "_dd.py.partial_flush": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1 + }, + "duration": 1039485691, + "start": 1733243043078144147 + } + ], + [ + { + "name": "pytest.test", + "service": "pytest", + "resource": "test_selenium.py::test_selenium_local_pass", + "trace_id": 1, + "span_id": 1, + "parent_id": 0, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f30a300000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime-id": "7302c641201a429b97db4b8c863fc1e9", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.browser.driver": "selenium", + "test.browser.driver_version": "4.27.1", + "test.browser.name": "chrome", + "test.browser.version": "131.0.6778.85", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.final_status": "pass", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.is_browser": "true", + "test.is_rum_active": "true", + "test.module": "", + "test.module_path": "", + "test.name": "test_selenium_local_pass", + "test.source.file": "test_selenium.py", + "test.status": "pass", + "test.suite": "test_selenium.py", + "test.type": "test", + "test_module_id": "7190997582830612638", + "test_session_id": "11779449984696132842", + "test_suite_id": "16799388353789766894", + "type": "test" + }, + "metrics": { + "_dd.top_level": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1, + "process_id": 13453, + "test.source.end": 31, + "test.source.start": 13 + }, + "duration": 1056245299, + "start": 1733243043078204615 + } + ] +] \ No newline at end of file diff --git a/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_unpatch_does_not_record_selenium_tags.json b/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_unpatch_does_not_record_selenium_tags.json index 3ce27b6bed5..5d8d1fd69b0 100644 --- a/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_unpatch_does_not_record_selenium_tags.json +++ b/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_unpatch_does_not_record_selenium_tags.json @@ -1,181 +1,185 @@ -[[ - { - "name": "pytest.test_session", - "service": "pytest", - "resource": "pytest.test_session", - "trace_id": 0, - "span_id": 1, - "parent_id": 0, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f2f1000000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime-id": "e66954df61ae4986bcb0c73415619b22", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.code_coverage.enabled": "false", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.itr.tests_skipping.enabled": "false", - "test.status": "pass", - "test_session_id": "8637723180980132607", - "type": "test_session_end" - }, - "metrics": { - "_dd.top_level": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1, - "process_id": 12386 - }, - "duration": 657416237, - "start": 1733242640628685892 - }, - { - "name": "pytest.test_module", - "service": "pytest", - "resource": "pytest.test_module", - "trace_id": 0, - "span_id": 2, - "parent_id": 1, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f2f1000000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.code_coverage.enabled": "false", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.itr.tests_skipping.enabled": "false", - "test.module": "", - "test.module_path": "", - "test.status": "pass", - "test_module_id": "13788837375514495677", - "test_session_id": "8637723180980132607", - "type": "test_module_end" - }, - "metrics": { - "_dd.py.partial_flush": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1 - }, - "duration": 534863711, - "start": 1733242640750128386 - }, - { - "name": "pytest.test_suite", - "service": "pytest", - "resource": "pytest.test_suite", - "trace_id": 0, - "span_id": 3, - "parent_id": 2, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f2f1000000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.module": "", - "test.module_path": "", - "test.status": "pass", - "test.suite": "test_selenium.py", - "test_module_id": "13788837375514495677", - "test_session_id": "8637723180980132607", - "test_suite_id": "16610807573449005295", - "type": "test_suite_end" - }, - "metrics": { - "_dd.py.partial_flush": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1 - }, - "duration": 518011312, - "start": 1733242640750250412 - }], [ - { - "name": "pytest.test", - "service": "pytest", - "resource": "test_selenium.py::test_selenium_local_unpatch", - "trace_id": 1, - "span_id": 1, - "parent_id": 0, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f2f1000000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime-id": "e66954df61ae4986bcb0c73415619b22", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.final_status": "pass", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.module": "", - "test.module_path": "", - "test.name": "test_selenium_local_unpatch", - "test.source.file": "test_selenium.py", - "test.status": "pass", - "test.suite": "test_selenium.py", - "test.type": "test", - "test_module_id": "13788837375514495677", - "test_session_id": "8637723180980132607", - "test_suite_id": "16610807573449005295", - "type": "test" + [ + { + "name": "pytest.test_session", + "service": "pytest", + "resource": "pytest.test_session", + "trace_id": 0, + "span_id": 1, + "parent_id": 0, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f2f1000000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime-id": "e66954df61ae4986bcb0c73415619b22", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.code_coverage.enabled": "false", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.itr.tests_skipping.enabled": "false", + "test.status": "pass", + "test_session_id": "8637723180980132607", + "type": "test_session_end" + }, + "metrics": { + "_dd.top_level": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1, + "process_id": 12386 + }, + "duration": 657416237, + "start": 1733242640628685892 }, - "metrics": { - "_dd.top_level": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1, - "process_id": 12386, - "test.source.end": 32, - "test.source.start": 9 + { + "name": "pytest.test_module", + "service": "pytest", + "resource": "pytest.test_module", + "trace_id": 0, + "span_id": 2, + "parent_id": 1, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f2f1000000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.code_coverage.enabled": "false", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.itr.tests_skipping.enabled": "false", + "test.module": "", + "test.module_path": "", + "test.status": "pass", + "test_module_id": "13788837375514495677", + "test_session_id": "8637723180980132607", + "type": "test_module_end" + }, + "metrics": { + "_dd.py.partial_flush": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1 + }, + "duration": 534863711, + "start": 1733242640750128386 }, - "duration": 534785315, - "start": 1733242640750308571 - }]] + { + "name": "pytest.test_suite", + "service": "pytest", + "resource": "pytest.test_suite", + "trace_id": 0, + "span_id": 3, + "parent_id": 2, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f2f1000000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.module": "", + "test.module_path": "", + "test.status": "pass", + "test.suite": "test_selenium.py", + "test_module_id": "13788837375514495677", + "test_session_id": "8637723180980132607", + "test_suite_id": "16610807573449005295", + "type": "test_suite_end" + }, + "metrics": { + "_dd.py.partial_flush": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1 + }, + "duration": 518011312, + "start": 1733242640750250412 + } + ], + [ + { + "name": "pytest.test", + "service": "pytest", + "resource": "test_selenium.py::test_selenium_local_unpatch", + "trace_id": 1, + "span_id": 1, + "parent_id": 0, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f2f1000000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime-id": "e66954df61ae4986bcb0c73415619b22", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.final_status": "pass", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.module": "", + "test.module_path": "", + "test.name": "test_selenium_local_unpatch", + "test.source.file": "test_selenium.py", + "test.status": "pass", + "test.suite": "test_selenium.py", + "test.type": "test", + "test_module_id": "13788837375514495677", + "test_session_id": "8637723180980132607", + "test_suite_id": "16610807573449005295", + "type": "test" + }, + "metrics": { + "_dd.top_level": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1, + "process_id": 12386, + "test.source.end": 34, + "test.source.start": 15 + }, + "duration": 534785315, + "start": 1733242640750308571 + } + ] +] \ No newline at end of file From e6b17998561883651cb55d7eeb77b0baf32932b3 Mon Sep 17 00:00:00 2001 From: Federico Mon Date: Thu, 23 Apr 2026 18:04:35 +0200 Subject: [PATCH 2/4] fix for gitlab --- .gitlab/services.yml | 3 +++ tests/ci_visibility/suitespec.yml | 2 ++ tests/contrib/selenium/test_selenium_chrome.py | 7 ++++--- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitlab/services.yml b/.gitlab/services.yml index 4f6a8971129..958dc0b17a9 100644 --- a/.gitlab/services.yml +++ b/.gitlab/services.yml @@ -160,3 +160,6 @@ azurite: name: registry.ddbuild.io/images/mirror/azure-storage/azurite:3.34.0 alias: azurite + selenium-chrome: + name: registry.ddbuild.io/images/mirror/selenium/standalone-chrome:4.34.2 + alias: selenium-chrome diff --git a/tests/ci_visibility/suitespec.yml b/tests/ci_visibility/suitespec.yml index 04c6c4e9a1e..884e6c5cbfd 100644 --- a/tests/ci_visibility/suitespec.yml +++ b/tests/ci_visibility/suitespec.yml @@ -157,6 +157,8 @@ suites: snapshot: true selenium: parallelism: 2 + env: + SELENIUM_GRID_URL: http://selenium-chrome:4444 paths: - '@bootstrap' - '@core' diff --git a/tests/contrib/selenium/test_selenium_chrome.py b/tests/contrib/selenium/test_selenium_chrome.py index 480ba39113c..eb8c1d23b6d 100644 --- a/tests/contrib/selenium/test_selenium_chrome.py +++ b/tests/contrib/selenium/test_selenium_chrome.py @@ -1,8 +1,9 @@ """Tests for selenium + RUM integration Uses a Selenium Grid (selenium/standalone-chrome, linux/amd64) via webdriver.Remote so that -tests work on any host architecture including arm64. The grid is started as a Docker service -and listens on localhost:4444 (via network_mode: host). +tests work on any host architecture including arm64. The grid URL is controlled by the +SELENIUM_GRID_URL environment variable (default: http://localhost:4444 for local runs via +docker-compose network_mode: host; set to http://selenium-chrome:4444 in CI). """ import http.server @@ -45,7 +46,7 @@ ] # Selenium Grid endpoint — standalone-chrome runs with network_mode: host so it binds on localhost -SELENIUM_GRID_URL = "http://localhost:4444" +SELENIUM_GRID_URL = os.environ.get("SELENIUM_GRID_URL", "http://localhost:4444") _SELENIUM_DRIVER_SETUP = f"""\ from selenium import webdriver From e88fd6be1741ad9e975d0fe05a0b85ecb8f17c71 Mon Sep 17 00:00:00 2001 From: Federico Mon Date: Thu, 23 Apr 2026 18:13:28 +0200 Subject: [PATCH 3/4] fmt snapshots --- ...t_selenium_chrome_pytest_rum_disabled.json | 370 +++++++++-------- ...st_selenium_chrome_pytest_rum_enabled.json | 372 +++++++++--------- ...unpatch_does_not_record_selenium_tags.json | 360 +++++++++-------- 3 files changed, 545 insertions(+), 557 deletions(-) diff --git a/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_rum_disabled.json b/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_rum_disabled.json index 6ec478cd4f0..efcb4d8ddc9 100644 --- a/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_rum_disabled.json +++ b/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_rum_disabled.json @@ -1,190 +1,186 @@ +[[ + { + "name": "pytest.test_session", + "service": "pytest", + "resource": "pytest.test_session", + "trace_id": 0, + "span_id": 1, + "parent_id": 0, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f30a500000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime-id": "59d942ad4a7b4d07ba146936547f60c8", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.code_coverage.enabled": "false", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.itr.tests_skipping.enabled": "false", + "test.status": "pass", + "test_session_id": "13653929687187018380", + "type": "test_session_end" + }, + "metrics": { + "_dd.top_level": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1, + "process_id": 13623 + }, + "duration": 1151463759, + "start": 1733243045205773568 + }, + { + "name": "pytest.test_module", + "service": "pytest", + "resource": "pytest.test_module", + "trace_id": 0, + "span_id": 2, + "parent_id": 1, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f30a500000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.code_coverage.enabled": "false", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.itr.tests_skipping.enabled": "false", + "test.module": "", + "test.module_path": "", + "test.status": "pass", + "test_module_id": "6093764858853198442", + "test_session_id": "13653929687187018380", + "type": "test_module_end" + }, + "metrics": { + "_dd.py.partial_flush": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1 + }, + "duration": 1035492200, + "start": 1733243045320630899 + }, + { + "name": "pytest.test_suite", + "service": "pytest", + "resource": "pytest.test_suite", + "trace_id": 0, + "span_id": 3, + "parent_id": 2, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f30a500000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.module": "", + "test.module_path": "", + "test.status": "pass", + "test.suite": "test_selenium.py", + "test_module_id": "6093764858853198442", + "test_session_id": "13653929687187018380", + "test_suite_id": "1886109580838464934", + "type": "test_suite_end" + }, + "metrics": { + "_dd.py.partial_flush": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1 + }, + "duration": 1018521912, + "start": 1733243045320749085 + }], [ - [ - { - "name": "pytest.test_session", - "service": "pytest", - "resource": "pytest.test_session", - "trace_id": 0, - "span_id": 1, - "parent_id": 0, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f30a500000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime-id": "59d942ad4a7b4d07ba146936547f60c8", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.code_coverage.enabled": "false", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.itr.tests_skipping.enabled": "false", - "test.status": "pass", - "test_session_id": "13653929687187018380", - "type": "test_session_end" - }, - "metrics": { - "_dd.top_level": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1, - "process_id": 13623 - }, - "duration": 1151463759, - "start": 1733243045205773568 + { + "name": "pytest.test", + "service": "pytest", + "resource": "test_selenium.py::test_selenium_local_pass", + "trace_id": 1, + "span_id": 1, + "parent_id": 0, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f30a500000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime-id": "59d942ad4a7b4d07ba146936547f60c8", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.browser.driver": "selenium", + "test.browser.driver_version": "4.27.1", + "test.browser.name": "chrome", + "test.browser.version": "131.0.6778.85", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.final_status": "pass", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.is_browser": "true", + "test.module": "", + "test.module_path": "", + "test.name": "test_selenium_local_pass", + "test.source.file": "test_selenium.py", + "test.status": "pass", + "test.suite": "test_selenium.py", + "test.type": "test", + "test_module_id": "6093764858853198442", + "test_session_id": "13653929687187018380", + "test_suite_id": "1886109580838464934", + "type": "test" }, - { - "name": "pytest.test_module", - "service": "pytest", - "resource": "pytest.test_module", - "trace_id": 0, - "span_id": 2, - "parent_id": 1, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f30a500000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.code_coverage.enabled": "false", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.itr.tests_skipping.enabled": "false", - "test.module": "", - "test.module_path": "", - "test.status": "pass", - "test_module_id": "6093764858853198442", - "test_session_id": "13653929687187018380", - "type": "test_module_end" - }, - "metrics": { - "_dd.py.partial_flush": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1 - }, - "duration": 1035492200, - "start": 1733243045320630899 + "metrics": { + "_dd.top_level": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1, + "process_id": 13623, + "test.source.end": 31, + "test.source.start": 13 }, - { - "name": "pytest.test_suite", - "service": "pytest", - "resource": "pytest.test_suite", - "trace_id": 0, - "span_id": 3, - "parent_id": 2, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f30a500000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.module": "", - "test.module_path": "", - "test.status": "pass", - "test.suite": "test_selenium.py", - "test_module_id": "6093764858853198442", - "test_session_id": "13653929687187018380", - "test_suite_id": "1886109580838464934", - "type": "test_suite_end" - }, - "metrics": { - "_dd.py.partial_flush": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1 - }, - "duration": 1018521912, - "start": 1733243045320749085 - } - ], - [ - { - "name": "pytest.test", - "service": "pytest", - "resource": "test_selenium.py::test_selenium_local_pass", - "trace_id": 1, - "span_id": 1, - "parent_id": 0, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f30a500000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime-id": "59d942ad4a7b4d07ba146936547f60c8", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.browser.driver": "selenium", - "test.browser.driver_version": "4.27.1", - "test.browser.name": "chrome", - "test.browser.version": "131.0.6778.85", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.final_status": "pass", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.is_browser": "true", - "test.module": "", - "test.module_path": "", - "test.name": "test_selenium_local_pass", - "test.source.file": "test_selenium.py", - "test.status": "pass", - "test.suite": "test_selenium.py", - "test.type": "test", - "test_module_id": "6093764858853198442", - "test_session_id": "13653929687187018380", - "test_suite_id": "1886109580838464934", - "type": "test" - }, - "metrics": { - "_dd.top_level": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1, - "process_id": 13623, - "test.source.end": 31, - "test.source.start": 13 - }, - "duration": 1035420043, - "start": 1733243045320806200 - } - ] -] \ No newline at end of file + "duration": 1035420043, + "start": 1733243045320806200 + }]] diff --git a/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_rum_enabled.json b/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_rum_enabled.json index 943419d29e2..271c70834db 100644 --- a/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_rum_enabled.json +++ b/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_rum_enabled.json @@ -1,191 +1,187 @@ +[[ + { + "name": "pytest.test_session", + "service": "pytest", + "resource": "pytest.test_session", + "trace_id": 0, + "span_id": 1, + "parent_id": 0, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f30a200000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime-id": "7302c641201a429b97db4b8c863fc1e9", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.code_coverage.enabled": "false", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.itr.tests_skipping.enabled": "false", + "test.status": "pass", + "test_session_id": "11779449984696132842", + "type": "test_session_end" + }, + "metrics": { + "_dd.top_level": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1, + "process_id": 13453 + }, + "duration": 1175555510, + "start": 1733243042959917377 + }, + { + "name": "pytest.test_module", + "service": "pytest", + "resource": "pytest.test_module", + "trace_id": 0, + "span_id": 2, + "parent_id": 1, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f30a200000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.code_coverage.enabled": "false", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.itr.tests_skipping.enabled": "false", + "test.module": "", + "test.module_path": "", + "test.status": "pass", + "test_module_id": "7190997582830612638", + "test_session_id": "11779449984696132842", + "type": "test_module_end" + }, + "metrics": { + "_dd.py.partial_flush": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1 + }, + "duration": 1056334178, + "start": 1733243043078015355 + }, + { + "name": "pytest.test_suite", + "service": "pytest", + "resource": "pytest.test_suite", + "trace_id": 0, + "span_id": 3, + "parent_id": 2, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f30a200000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.module": "", + "test.module_path": "", + "test.status": "pass", + "test.suite": "test_selenium.py", + "test_module_id": "7190997582830612638", + "test_session_id": "11779449984696132842", + "test_suite_id": "16799388353789766894", + "type": "test_suite_end" + }, + "metrics": { + "_dd.py.partial_flush": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1 + }, + "duration": 1039485691, + "start": 1733243043078144147 + }], [ - [ - { - "name": "pytest.test_session", - "service": "pytest", - "resource": "pytest.test_session", - "trace_id": 0, - "span_id": 1, - "parent_id": 0, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f30a200000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime-id": "7302c641201a429b97db4b8c863fc1e9", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.code_coverage.enabled": "false", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.itr.tests_skipping.enabled": "false", - "test.status": "pass", - "test_session_id": "11779449984696132842", - "type": "test_session_end" - }, - "metrics": { - "_dd.top_level": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1, - "process_id": 13453 - }, - "duration": 1175555510, - "start": 1733243042959917377 + { + "name": "pytest.test", + "service": "pytest", + "resource": "test_selenium.py::test_selenium_local_pass", + "trace_id": 1, + "span_id": 1, + "parent_id": 0, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f30a300000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime-id": "7302c641201a429b97db4b8c863fc1e9", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.browser.driver": "selenium", + "test.browser.driver_version": "4.27.1", + "test.browser.name": "chrome", + "test.browser.version": "131.0.6778.85", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.final_status": "pass", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.is_browser": "true", + "test.is_rum_active": "true", + "test.module": "", + "test.module_path": "", + "test.name": "test_selenium_local_pass", + "test.source.file": "test_selenium.py", + "test.status": "pass", + "test.suite": "test_selenium.py", + "test.type": "test", + "test_module_id": "7190997582830612638", + "test_session_id": "11779449984696132842", + "test_suite_id": "16799388353789766894", + "type": "test" }, - { - "name": "pytest.test_module", - "service": "pytest", - "resource": "pytest.test_module", - "trace_id": 0, - "span_id": 2, - "parent_id": 1, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f30a200000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.code_coverage.enabled": "false", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.itr.tests_skipping.enabled": "false", - "test.module": "", - "test.module_path": "", - "test.status": "pass", - "test_module_id": "7190997582830612638", - "test_session_id": "11779449984696132842", - "type": "test_module_end" - }, - "metrics": { - "_dd.py.partial_flush": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1 - }, - "duration": 1056334178, - "start": 1733243043078015355 + "metrics": { + "_dd.top_level": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1, + "process_id": 13453, + "test.source.end": 31, + "test.source.start": 13 }, - { - "name": "pytest.test_suite", - "service": "pytest", - "resource": "pytest.test_suite", - "trace_id": 0, - "span_id": 3, - "parent_id": 2, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f30a200000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.module": "", - "test.module_path": "", - "test.status": "pass", - "test.suite": "test_selenium.py", - "test_module_id": "7190997582830612638", - "test_session_id": "11779449984696132842", - "test_suite_id": "16799388353789766894", - "type": "test_suite_end" - }, - "metrics": { - "_dd.py.partial_flush": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1 - }, - "duration": 1039485691, - "start": 1733243043078144147 - } - ], - [ - { - "name": "pytest.test", - "service": "pytest", - "resource": "test_selenium.py::test_selenium_local_pass", - "trace_id": 1, - "span_id": 1, - "parent_id": 0, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f30a300000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime-id": "7302c641201a429b97db4b8c863fc1e9", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.browser.driver": "selenium", - "test.browser.driver_version": "4.27.1", - "test.browser.name": "chrome", - "test.browser.version": "131.0.6778.85", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.final_status": "pass", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.is_browser": "true", - "test.is_rum_active": "true", - "test.module": "", - "test.module_path": "", - "test.name": "test_selenium_local_pass", - "test.source.file": "test_selenium.py", - "test.status": "pass", - "test.suite": "test_selenium.py", - "test.type": "test", - "test_module_id": "7190997582830612638", - "test_session_id": "11779449984696132842", - "test_suite_id": "16799388353789766894", - "type": "test" - }, - "metrics": { - "_dd.top_level": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1, - "process_id": 13453, - "test.source.end": 31, - "test.source.start": 13 - }, - "duration": 1056245299, - "start": 1733243043078204615 - } - ] -] \ No newline at end of file + "duration": 1056245299, + "start": 1733243043078204615 + }]] diff --git a/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_unpatch_does_not_record_selenium_tags.json b/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_unpatch_does_not_record_selenium_tags.json index 5d8d1fd69b0..812051651d5 100644 --- a/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_unpatch_does_not_record_selenium_tags.json +++ b/tests/snapshots/test_selenium_chrome.test_selenium_chrome_pytest_unpatch_does_not_record_selenium_tags.json @@ -1,185 +1,181 @@ +[[ + { + "name": "pytest.test_session", + "service": "pytest", + "resource": "pytest.test_session", + "trace_id": 0, + "span_id": 1, + "parent_id": 0, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f2f1000000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime-id": "e66954df61ae4986bcb0c73415619b22", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.code_coverage.enabled": "false", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.itr.tests_skipping.enabled": "false", + "test.status": "pass", + "test_session_id": "8637723180980132607", + "type": "test_session_end" + }, + "metrics": { + "_dd.top_level": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1, + "process_id": 12386 + }, + "duration": 657416237, + "start": 1733242640628685892 + }, + { + "name": "pytest.test_module", + "service": "pytest", + "resource": "pytest.test_module", + "trace_id": 0, + "span_id": 2, + "parent_id": 1, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f2f1000000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.code_coverage.enabled": "false", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.itr.tests_skipping.enabled": "false", + "test.module": "", + "test.module_path": "", + "test.status": "pass", + "test_module_id": "13788837375514495677", + "test_session_id": "8637723180980132607", + "type": "test_module_end" + }, + "metrics": { + "_dd.py.partial_flush": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1 + }, + "duration": 534863711, + "start": 1733242640750128386 + }, + { + "name": "pytest.test_suite", + "service": "pytest", + "resource": "pytest.test_suite", + "trace_id": 0, + "span_id": 3, + "parent_id": 2, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f2f1000000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.module": "", + "test.module_path": "", + "test.status": "pass", + "test.suite": "test_selenium.py", + "test_module_id": "13788837375514495677", + "test_session_id": "8637723180980132607", + "test_suite_id": "16610807573449005295", + "type": "test_suite_end" + }, + "metrics": { + "_dd.py.partial_flush": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1 + }, + "duration": 518011312, + "start": 1733242640750250412 + }], [ - [ - { - "name": "pytest.test_session", - "service": "pytest", - "resource": "pytest.test_session", - "trace_id": 0, - "span_id": 1, - "parent_id": 0, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f2f1000000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime-id": "e66954df61ae4986bcb0c73415619b22", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.code_coverage.enabled": "false", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.itr.tests_skipping.enabled": "false", - "test.status": "pass", - "test_session_id": "8637723180980132607", - "type": "test_session_end" - }, - "metrics": { - "_dd.top_level": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1, - "process_id": 12386 - }, - "duration": 657416237, - "start": 1733242640628685892 + { + "name": "pytest.test", + "service": "pytest", + "resource": "test_selenium.py::test_selenium_local_unpatch", + "trace_id": 1, + "span_id": 1, + "parent_id": 0, + "type": "test", + "error": 0, + "meta": { + "_dd.base_service": "", + "_dd.origin": "ciapp-test", + "_dd.p.dm": "-0", + "_dd.p.tid": "674f2f1000000000", + "component": "pytest", + "language": "python", + "library_version": "2.18.0.dev95+g5f76e34a0", + "os.architecture": "x86_64", + "os.platform": "Linux", + "os.version": "5.15.0-1071-aws", + "runtime-id": "e66954df61ae4986bcb0c73415619b22", + "runtime.name": "CPython", + "runtime.version": "3.10.14", + "span.kind": "test", + "test.command": "pytest --ddtrace -s --ddtrace-patch-all", + "test.final_status": "pass", + "test.framework": "pytest", + "test.framework_version": "8.3.4", + "test.module": "", + "test.module_path": "", + "test.name": "test_selenium_local_unpatch", + "test.source.file": "test_selenium.py", + "test.status": "pass", + "test.suite": "test_selenium.py", + "test.type": "test", + "test_module_id": "13788837375514495677", + "test_session_id": "8637723180980132607", + "test_suite_id": "16610807573449005295", + "type": "test" }, - { - "name": "pytest.test_module", - "service": "pytest", - "resource": "pytest.test_module", - "trace_id": 0, - "span_id": 2, - "parent_id": 1, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f2f1000000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.code_coverage.enabled": "false", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.itr.tests_skipping.enabled": "false", - "test.module": "", - "test.module_path": "", - "test.status": "pass", - "test_module_id": "13788837375514495677", - "test_session_id": "8637723180980132607", - "type": "test_module_end" - }, - "metrics": { - "_dd.py.partial_flush": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1 - }, - "duration": 534863711, - "start": 1733242640750128386 + "metrics": { + "_dd.top_level": 1, + "_dd.tracer_kr": 1.0, + "_sampling_priority_v1": 1, + "process_id": 12386, + "test.source.end": 34, + "test.source.start": 15 }, - { - "name": "pytest.test_suite", - "service": "pytest", - "resource": "pytest.test_suite", - "trace_id": 0, - "span_id": 3, - "parent_id": 2, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f2f1000000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.module": "", - "test.module_path": "", - "test.status": "pass", - "test.suite": "test_selenium.py", - "test_module_id": "13788837375514495677", - "test_session_id": "8637723180980132607", - "test_suite_id": "16610807573449005295", - "type": "test_suite_end" - }, - "metrics": { - "_dd.py.partial_flush": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1 - }, - "duration": 518011312, - "start": 1733242640750250412 - } - ], - [ - { - "name": "pytest.test", - "service": "pytest", - "resource": "test_selenium.py::test_selenium_local_unpatch", - "trace_id": 1, - "span_id": 1, - "parent_id": 0, - "type": "test", - "error": 0, - "meta": { - "_dd.base_service": "", - "_dd.origin": "ciapp-test", - "_dd.p.dm": "-0", - "_dd.p.tid": "674f2f1000000000", - "component": "pytest", - "language": "python", - "library_version": "2.18.0.dev95+g5f76e34a0", - "os.architecture": "x86_64", - "os.platform": "Linux", - "os.version": "5.15.0-1071-aws", - "runtime-id": "e66954df61ae4986bcb0c73415619b22", - "runtime.name": "CPython", - "runtime.version": "3.10.14", - "span.kind": "test", - "test.command": "pytest --ddtrace -s --ddtrace-patch-all", - "test.final_status": "pass", - "test.framework": "pytest", - "test.framework_version": "8.3.4", - "test.module": "", - "test.module_path": "", - "test.name": "test_selenium_local_unpatch", - "test.source.file": "test_selenium.py", - "test.status": "pass", - "test.suite": "test_selenium.py", - "test.type": "test", - "test_module_id": "13788837375514495677", - "test_session_id": "8637723180980132607", - "test_suite_id": "16610807573449005295", - "type": "test" - }, - "metrics": { - "_dd.top_level": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1, - "process_id": 12386, - "test.source.end": 34, - "test.source.start": 15 - }, - "duration": 534785315, - "start": 1733242640750308571 - } - ] -] \ No newline at end of file + "duration": 534785315, + "start": 1733242640750308571 + }]] From 85a02150dec5d13081fb180b1ce59024728c79be Mon Sep 17 00:00:00 2001 From: Federico Mon Date: Fri, 24 Apr 2026 12:34:33 +0200 Subject: [PATCH 4/4] switch to latest --- .gitlab/services.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab/services.yml b/.gitlab/services.yml index 958dc0b17a9..445ced95bf9 100644 --- a/.gitlab/services.yml +++ b/.gitlab/services.yml @@ -161,5 +161,5 @@ name: registry.ddbuild.io/images/mirror/azure-storage/azurite:3.34.0 alias: azurite selenium-chrome: - name: registry.ddbuild.io/images/mirror/selenium/standalone-chrome:4.34.2 + name: registry.ddbuild.io/images/mirror/selenium/standalone-chrome:latest alias: selenium-chrome