diff --git a/ddtrace/contrib/asgi/middleware.py b/ddtrace/contrib/asgi/middleware.py index cf4e4aaab64..7800ef1a61f 100644 --- a/ddtrace/contrib/asgi/middleware.py +++ b/ddtrace/contrib/asgi/middleware.py @@ -85,6 +85,17 @@ def span_from_scope(scope: Mapping[str, Any]) -> Optional[Span]: return scope.get("datadog", {}).get("request_spans", [None])[0] +def _extract_full_path(raw_path, root_path, path): + if root_path and raw_path and raw_path.startswith(root_path.encode()): + raw = raw_path.split(b"?")[0] if b"?" in raw_path else raw_path + check_path = root_path + path + + if raw.decode() != check_path: + return path + + return root_path + path + + async def _blocked_asgi_app(scope, receive, send): await send({"type": "http.response.start", "status": 403, "headers": []}) await send({"type": "http.response.body", "body": b""}) @@ -184,7 +195,8 @@ async def __call__(self, scope, receive, send): server = scope.get("server") scheme = scope.get("scheme", "http") parsed_query = parse.parse_qs(bytes_to_str(scope.get("query_string", b""))) - full_path = scope.get("root_path", "") + scope.get("path", "") + + full_path = _extract_full_path(scope.get("raw_path", ""), scope.get("root_path", ""), scope.get("path", "")) if host_header: url = "{}://{}{}".format(scheme, host_header, full_path) elif server and len(server) == 2: diff --git a/riotfile.py b/riotfile.py index 07af20209e6..f1bcc7ff1f6 100644 --- a/riotfile.py +++ b/riotfile.py @@ -1243,7 +1243,7 @@ def select_pys(min_version=MIN_PYTHON_VERSION, max_version=MAX_PYTHON_VERSION): "aiosqlite": latest, "databases": latest, "pytest-randomly": latest, - "anyio": "<4.0" + "anyio": "<4.0", }, venvs=[ Venv( diff --git a/tests/snapshots/tests.contrib.starlette.test_starlette.test_background_task.json b/tests/snapshots/tests.contrib.starlette.test_starlette.test_background_task.json index 263263ec509..bab2a40175b 100644 --- a/tests/snapshots/tests.contrib.starlette.test_starlette.test_background_task.json +++ b/tests/snapshots/tests.contrib.starlette.test_starlette.test_background_task.json @@ -1,35 +1,9 @@ [[ - { - "name": "starlette.background_task", - "service": "", - "resource": "custom_task", - "trace_id": 0, - "span_id": 1, - "parent_id": 0, - "type": "", - "error": 0, - "meta": { - "_dd.p.dm": "-0", - "_dd.p.tid": "65e2773000000000", - "_dd.span_links": "[{\"trace_id\": \"65e2773000000000567ea5a2ce22c2ba\", \"span_id\": \"0f75c3443dc887d3\", \"tracestate\": \"dd=s:1;t.dm:-0\", \"flags\": 1}]", - "language": "python", - "runtime-id": "f39de43db9104cf6afe785ddd2664ac7" - }, - "metrics": { - "_dd.top_level": 1, - "_dd.tracer_kr": 1.0, - "_sampling_priority_v1": 1, - "process_id": 15044 - }, - "duration": 2001768000, - "start": 1709340464158836000 - }], -[ { "name": "starlette.request", "service": "starlette", "resource": "GET /backgroundtask", - "trace_id": 1, + "trace_id": 0, "span_id": 1, "parent_id": 0, "type": "web", @@ -37,7 +11,7 @@ "meta": { "_dd.base_service": "", "_dd.p.dm": "-0", - "_dd.p.tid": "65e2773000000000", + "_dd.p.tid": "65e2c4f100000000", "component": "starlette", "http.method": "GET", "http.route": "/backgroundtask", @@ -46,15 +20,15 @@ "http.useragent": "testclient", "http.version": "1.1", "language": "python", - "runtime-id": "f39de43db9104cf6afe785ddd2664ac7", + "runtime-id": "33c779b304044ecc8e830e7453f5536c", "span.kind": "server" }, "metrics": { "_dd.top_level": 1, "_dd.tracer_kr": 1.0, "_sampling_priority_v1": 1, - "process_id": 15044 + "process_id": 44358 }, - "duration": 414000, - "start": 1709340464158314000 + "duration": 337000, + "start": 1709360369263514000 }]] diff --git a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema0]_new.json b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema0]_new.json index a9694708f85..4414d43e60d 100644 --- a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema0]_new.json +++ b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema0]_new.json @@ -11,7 +11,7 @@ "meta": { "_dd.base_service": "", "_dd.p.dm": "-0", - "_dd.p.tid": "65e2775500000000", + "_dd.p.tid": "65e2c50600000000", "component": "starlette", "http.method": "GET", "http.route": "/sub-app/hello/{name}", @@ -20,17 +20,17 @@ "http.useragent": "testclient", "http.version": "1.1", "language": "python", - "runtime-id": "e41d791a495b45bc8fb6795d71b554f0", + "runtime-id": "b273c948f6414e7782d1ba93035ab5ba", "span.kind": "server" }, "metrics": { "_dd.top_level": 1, "_dd.tracer_kr": 1.0, "_sampling_priority_v1": 1, - "process_id": 15475 + "process_id": 44458 }, - "duration": 340000, - "start": 1709340501724456000 + "duration": 343000, + "start": 1709360390669427000 }, { "name": "starlette.request", @@ -51,6 +51,6 @@ "http.version": "1.1", "span.kind": "server" }, - "duration": 138000, - "start": 1709340501724671000 + "duration": 143000, + "start": 1709360390669641000 }]] diff --git a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema0]_old.json b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema0]_old.json index 73a96b3e084..6526e53d030 100644 --- a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema0]_old.json +++ b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema0]_old.json @@ -11,7 +11,7 @@ "meta": { "_dd.base_service": "", "_dd.p.dm": "-0", - "_dd.p.tid": "65e2772f00000000", + "_dd.p.tid": "65e2c4e800000000", "component": "requests", "http.method": "GET", "http.status_code": "200", @@ -19,7 +19,7 @@ "http.useragent": "testclient", "language": "python", "out.host": "testserver", - "runtime-id": "eea4a9669b3f49d296fdea727157cb02", + "runtime-id": "acccedc4c3694eb6ba36d7d69d240e13", "span.kind": "client" }, "metrics": { @@ -27,10 +27,10 @@ "_dd.top_level": 1, "_dd.tracer_kr": 1.0, "_sampling_priority_v1": 1, - "process_id": 15181 + "process_id": 44375 }, - "duration": 749000, - "start": 1709340463714758000 + "duration": 1332000, + "start": 1709360360113849000 }, { "name": "starlette.request", @@ -43,7 +43,7 @@ "error": 0, "meta": { "_dd.base_service": "", - "_dd.p.tid": "65e2772f00000000", + "_dd.p.tid": "65e2c4e800000000", "component": "starlette", "http.method": "GET", "http.route": "/sub-app/hello/{name}", @@ -56,8 +56,8 @@ "metrics": { "_dd.top_level": 1 }, - "duration": 270000, - "start": 1709340463715057000 + "duration": 262000, + "start": 1709360360114462000 }, { "name": "starlette.request", @@ -70,7 +70,7 @@ "error": 0, "meta": { "_dd.base_service": "", - "_dd.p.tid": "65e2772f00000000", + "_dd.p.tid": "65e2c4e800000000", "component": "starlette", "http.method": "GET", "http.status_code": "200", @@ -79,6 +79,6 @@ "http.version": "1.1", "span.kind": "server" }, - "duration": 133000, - "start": 1709340463715208000 + "duration": 126000, + "start": 1709360360114612000 }]] diff --git a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema1]_new.json b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema1]_new.json index b513f6db7c4..64720c41299 100644 --- a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema1]_new.json +++ b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema1]_new.json @@ -11,7 +11,7 @@ "meta": { "_dd.base_service": "", "_dd.p.dm": "-0", - "_dd.p.tid": "65e2774a00000000", + "_dd.p.tid": "65e2c50700000000", "component": "starlette", "http.method": "GET", "http.route": "/sub-app/hello/{name}", @@ -20,17 +20,17 @@ "http.useragent": "testclient", "http.version": "1.1", "language": "python", - "runtime-id": "69b7bac4ef5b45a29cd782e9374b2b7e", + "runtime-id": "fcb8f22a11534a66affd8c79469822d1", "span.kind": "server" }, "metrics": { "_dd.top_level": 1, "_dd.tracer_kr": 1.0, "_sampling_priority_v1": 1, - "process_id": 15445 + "process_id": 44472 }, - "duration": 354000, - "start": 1709340490559381000 + "duration": 381000, + "start": 1709360391705364000 }, { "name": "starlette.request", @@ -51,6 +51,6 @@ "http.version": "1.1", "span.kind": "server" }, - "duration": 139000, - "start": 1709340490559608000 + "duration": 153000, + "start": 1709360391705607000 }]] diff --git a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema1]_old.json b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema1]_old.json index c783e779235..ff1c1c0bd38 100644 --- a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema1]_old.json +++ b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema1]_old.json @@ -11,7 +11,7 @@ "meta": { "_dd.base_service": "", "_dd.p.dm": "-0", - "_dd.p.tid": "65e2772e00000000", + "_dd.p.tid": "65e2c4e700000000", "component": "requests", "http.method": "GET", "http.status_code": "200", @@ -19,7 +19,7 @@ "http.useragent": "testclient", "language": "python", "out.host": "testserver", - "runtime-id": "b69f241750a64400b3e354c08841d649", + "runtime-id": "022f892d422744568c349dad0ee6bc82", "span.kind": "client" }, "metrics": { @@ -27,10 +27,10 @@ "_dd.top_level": 1, "_dd.tracer_kr": 1.0, "_sampling_priority_v1": 1, - "process_id": 15176 + "process_id": 44361 }, - "duration": 730000, - "start": 1709340462577566000 + "duration": 1412000, + "start": 1709360359055274000 }, { "name": "starlette.request", @@ -43,7 +43,7 @@ "error": 0, "meta": { "_dd.base_service": "", - "_dd.p.tid": "65e2772e00000000", + "_dd.p.tid": "65e2c4e700000000", "component": "starlette", "http.method": "GET", "http.route": "/sub-app/hello/{name}", @@ -56,8 +56,8 @@ "metrics": { "_dd.top_level": 1 }, - "duration": 265000, - "start": 1709340462577855000 + "duration": 283000, + "start": 1709360359055950000 }, { "name": "starlette.request", @@ -70,7 +70,7 @@ "error": 0, "meta": { "_dd.base_service": "", - "_dd.p.tid": "65e2772e00000000", + "_dd.p.tid": "65e2c4e700000000", "component": "starlette", "http.method": "GET", "http.status_code": "200", @@ -80,5 +80,5 @@ "span.kind": "server" }, "duration": 131000, - "start": 1709340462578002000 + "start": 1709360359056117000 }]] diff --git a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema2]_new.json b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema2]_new.json index e7c2c1198ca..ed9a41ced1e 100644 --- a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema2]_new.json +++ b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema2]_new.json @@ -10,7 +10,7 @@ "error": 0, "meta": { "_dd.p.dm": "-0", - "_dd.p.tid": "65e2774b00000000", + "_dd.p.tid": "65e2c4fb00000000", "component": "starlette", "http.method": "GET", "http.route": "/sub-app/hello/{name}", @@ -19,17 +19,17 @@ "http.useragent": "testclient", "http.version": "1.1", "language": "python", - "runtime-id": "a08722f1fe0b4fb9bfc13b80b6b2064e", + "runtime-id": "a952f1cf0dda478f8166980176d40fac", "span.kind": "server" }, "metrics": { "_dd.top_level": 1, "_dd.tracer_kr": 1.0, "_sampling_priority_v1": 1, - "process_id": 15446 + "process_id": 44454 }, - "duration": 372000, - "start": 1709340491497636000 + "duration": 341000, + "start": 1709360379275407000 }, { "name": "http.server.request", @@ -49,6 +49,6 @@ "http.version": "1.1", "span.kind": "server" }, - "duration": 150000, - "start": 1709340491497870000 + "duration": 137000, + "start": 1709360379275625000 }]] diff --git a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema2]_old.json b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema2]_old.json index 89e196c6ec4..55c35d258d9 100644 --- a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema2]_old.json +++ b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema2]_old.json @@ -10,7 +10,7 @@ "error": 0, "meta": { "_dd.p.dm": "-0", - "_dd.p.tid": "65e2772500000000", + "_dd.p.tid": "65e2c4e500000000", "_dd.peer.service.source": "out.host", "component": "requests", "http.method": "GET", @@ -20,7 +20,7 @@ "language": "python", "out.host": "testserver", "peer.service": "testserver", - "runtime-id": "8628fd34b8d34b368382bef9a858b071", + "runtime-id": "626bab4d003f4532ad2af7aedf8e0007", "span.kind": "client" }, "metrics": { @@ -28,10 +28,10 @@ "_dd.top_level": 1, "_dd.tracer_kr": 1.0, "_sampling_priority_v1": 1, - "process_id": 15129 + "process_id": 44359 }, - "duration": 791000, - "start": 1709340453124162000 + "duration": 1382000, + "start": 1709360357022460000 }, { "name": "http.server.request", @@ -43,7 +43,7 @@ "type": "web", "error": 0, "meta": { - "_dd.p.tid": "65e2772500000000", + "_dd.p.tid": "65e2c4e500000000", "component": "starlette", "http.method": "GET", "http.route": "/sub-app/hello/{name}", @@ -53,8 +53,8 @@ "http.version": "1.1", "span.kind": "server" }, - "duration": 290000, - "start": 1709340453124468000 + "duration": 281000, + "start": 1709360357023104000 }, { "name": "http.server.request", @@ -66,7 +66,7 @@ "type": "web", "error": 0, "meta": { - "_dd.p.tid": "65e2772500000000", + "_dd.p.tid": "65e2c4e500000000", "component": "starlette", "http.method": "GET", "http.status_code": "200", @@ -75,6 +75,6 @@ "http.version": "1.1", "span.kind": "server" }, - "duration": 144000, - "start": 1709340453124628000 + "duration": 137000, + "start": 1709360357023262000 }]] diff --git a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema3]_new.json b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema3]_new.json index 1c6aaa939e4..3d2a9d90264 100644 --- a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema3]_new.json +++ b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema3]_new.json @@ -10,7 +10,7 @@ "error": 0, "meta": { "_dd.p.dm": "-0", - "_dd.p.tid": "65e2774e00000000", + "_dd.p.tid": "65e2c50500000000", "component": "starlette", "http.method": "GET", "http.route": "/sub-app/hello/{name}", @@ -19,17 +19,17 @@ "http.useragent": "testclient", "http.version": "1.1", "language": "python", - "runtime-id": "a943d195e6154353affa384d57325655", + "runtime-id": "c4a05ed07a53458086e67c1968e6b9c5", "span.kind": "server" }, "metrics": { "_dd.top_level": 1, "_dd.tracer_kr": 1.0, "_sampling_priority_v1": 1, - "process_id": 15459 + "process_id": 44456 }, - "duration": 343000, - "start": 1709340494752494000 + "duration": 325000, + "start": 1709360389571626000 }, { "name": "starlette.request", @@ -49,6 +49,6 @@ "http.version": "1.1", "span.kind": "server" }, - "duration": 135000, - "start": 1709340494752715000 + "duration": 136000, + "start": 1709360389571828000 }]] diff --git a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema3]_old.json b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema3]_old.json index 589a28719e1..7298157adb0 100644 --- a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema3]_old.json +++ b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema3]_old.json @@ -11,7 +11,7 @@ "meta": { "_dd.base_service": "mysvc", "_dd.p.dm": "-0", - "_dd.p.tid": "65e2772d00000000", + "_dd.p.tid": "65e2c4f000000000", "component": "requests", "http.method": "GET", "http.status_code": "200", @@ -19,7 +19,7 @@ "http.useragent": "testclient", "language": "python", "out.host": "testserver", - "runtime-id": "47b0b01b1e2a4867b2c17b31b743cc51", + "runtime-id": "72db97de5691486aadae1cd90b857f16", "span.kind": "client" }, "metrics": { @@ -27,10 +27,10 @@ "_dd.top_level": 1, "_dd.tracer_kr": 1.0, "_sampling_priority_v1": 1, - "process_id": 15171 + "process_id": 44404 }, - "duration": 765000, - "start": 1709340461523338000 + "duration": 1395000, + "start": 1709360368374775000 }, { "name": "starlette.request", @@ -42,7 +42,7 @@ "type": "web", "error": 0, "meta": { - "_dd.p.tid": "65e2772d00000000", + "_dd.p.tid": "65e2c4f000000000", "component": "starlette", "http.method": "GET", "http.route": "/sub-app/hello/{name}", @@ -55,8 +55,8 @@ "metrics": { "_dd.top_level": 1 }, - "duration": 277000, - "start": 1709340461523644000 + "duration": 263000, + "start": 1709360368375463000 }, { "name": "starlette.request", @@ -68,7 +68,7 @@ "type": "web", "error": 0, "meta": { - "_dd.p.tid": "65e2772d00000000", + "_dd.p.tid": "65e2c4f000000000", "component": "starlette", "http.method": "GET", "http.status_code": "200", @@ -77,6 +77,6 @@ "http.version": "1.1", "span.kind": "server" }, - "duration": 136000, - "start": 1709340461523800000 + "duration": 130000, + "start": 1709360368375610000 }]] diff --git a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema4]_new.json b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema4]_new.json index 567984d0721..99c339995a5 100644 --- a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema4]_new.json +++ b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema4]_new.json @@ -10,7 +10,7 @@ "error": 0, "meta": { "_dd.p.dm": "-0", - "_dd.p.tid": "65e2774800000000", + "_dd.p.tid": "65e2c50800000000", "component": "starlette", "http.method": "GET", "http.route": "/sub-app/hello/{name}", @@ -19,17 +19,17 @@ "http.useragent": "testclient", "http.version": "1.1", "language": "python", - "runtime-id": "68575cac3495473dbe32b296aaa27599", + "runtime-id": "e1f4bde6f4bd48c798b3e8ee1dd2b2dc", "span.kind": "server" }, "metrics": { "_dd.top_level": 1, "_dd.tracer_kr": 1.0, "_sampling_priority_v1": 1, - "process_id": 15431 + "process_id": 44473 }, - "duration": 358000, - "start": 1709340488513422000 + "duration": 342000, + "start": 1709360392679787000 }, { "name": "starlette.request", @@ -49,6 +49,6 @@ "http.version": "1.1", "span.kind": "server" }, - "duration": 146000, - "start": 1709340488513648000 + "duration": 135000, + "start": 1709360392680006000 }]] diff --git a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema4]_old.json b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema4]_old.json index dbeb8fc74cc..cb9d2d642a4 100644 --- a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema4]_old.json +++ b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema4]_old.json @@ -11,7 +11,7 @@ "meta": { "_dd.base_service": "mysvc", "_dd.p.dm": "-0", - "_dd.p.tid": "65e2772c00000000", + "_dd.p.tid": "65e2c4e600000000", "component": "requests", "http.method": "GET", "http.status_code": "200", @@ -19,7 +19,7 @@ "http.useragent": "testclient", "language": "python", "out.host": "testserver", - "runtime-id": "1be5ba4468d049f78cc0958a76da2050", + "runtime-id": "6defe05e80af4dbcb9c90cb62bf0cfa4", "span.kind": "client" }, "metrics": { @@ -27,10 +27,10 @@ "_dd.top_level": 1, "_dd.tracer_kr": 1.0, "_sampling_priority_v1": 1, - "process_id": 15153 + "process_id": 44360 }, - "duration": 782000, - "start": 1709340460331155000 + "duration": 1339000, + "start": 1709360358038246000 }, { "name": "starlette.request", @@ -42,7 +42,7 @@ "type": "web", "error": 0, "meta": { - "_dd.p.tid": "65e2772c00000000", + "_dd.p.tid": "65e2c4e600000000", "component": "starlette", "http.method": "GET", "http.route": "/sub-app/hello/{name}", @@ -55,8 +55,8 @@ "metrics": { "_dd.top_level": 1 }, - "duration": 253000, - "start": 1709340460331455000 + "duration": 252000, + "start": 1709360358038884000 }, { "name": "starlette.request", @@ -68,7 +68,7 @@ "type": "web", "error": 0, "meta": { - "_dd.p.tid": "65e2772c00000000", + "_dd.p.tid": "65e2c4e600000000", "component": "starlette", "http.method": "GET", "http.status_code": "200", @@ -77,6 +77,6 @@ "http.version": "1.1", "span.kind": "server" }, - "duration": 128000, - "start": 1709340460331594000 + "duration": 124000, + "start": 1709360358039026000 }]] diff --git a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema5]_new.json b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema5]_new.json index 20df9dcf53d..427f27dffa5 100644 --- a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema5]_new.json +++ b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema5]_new.json @@ -10,7 +10,7 @@ "error": 0, "meta": { "_dd.p.dm": "-0", - "_dd.p.tid": "65e2774900000000", + "_dd.p.tid": "65e2c4fe00000000", "component": "starlette", "http.method": "GET", "http.route": "/sub-app/hello/{name}", @@ -19,17 +19,17 @@ "http.useragent": "testclient", "http.version": "1.1", "language": "python", - "runtime-id": "accdd2cd2d04429881b0ebd252b45f14", + "runtime-id": "01f5c9be8e4d448595d4f7691d8bf38f", "span.kind": "server" }, "metrics": { "_dd.top_level": 1, "_dd.tracer_kr": 1.0, "_sampling_priority_v1": 1, - "process_id": 15440 + "process_id": 44455 }, - "duration": 366000, - "start": 1709340489553665000 + "duration": 349000, + "start": 1709360382504471000 }, { "name": "http.server.request", @@ -49,6 +49,6 @@ "http.version": "1.1", "span.kind": "server" }, - "duration": 144000, - "start": 1709340489553904000 + "duration": 146000, + "start": 1709360382504690000 }]] diff --git a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema5]_old.json b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema5]_old.json index a9e7b2e94d2..c3fd43ed284 100644 --- a/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema5]_old.json +++ b/tests/snapshots/tests.contrib.starlette.test_starlette.test_schematization[service_schema5]_old.json @@ -10,7 +10,7 @@ "error": 0, "meta": { "_dd.p.dm": "-0", - "_dd.p.tid": "65e2772400000000", + "_dd.p.tid": "65e2c4ef00000000", "_dd.peer.service.source": "out.host", "component": "requests", "http.method": "GET", @@ -20,7 +20,7 @@ "language": "python", "out.host": "testserver", "peer.service": "testserver", - "runtime-id": "9f13634fcb7748eeb4839b480d1e416d", + "runtime-id": "bf47dc2661394961953f323653b93338", "span.kind": "client" }, "metrics": { @@ -28,10 +28,10 @@ "_dd.top_level": 1, "_dd.tracer_kr": 1.0, "_sampling_priority_v1": 1, - "process_id": 15124 + "process_id": 44403 }, - "duration": 771000, - "start": 1709340452020212000 + "duration": 1384000, + "start": 1709360367270353000 }, { "name": "http.server.request", @@ -43,7 +43,7 @@ "type": "web", "error": 0, "meta": { - "_dd.p.tid": "65e2772400000000", + "_dd.p.tid": "65e2c4ef00000000", "component": "starlette", "http.method": "GET", "http.route": "/sub-app/hello/{name}", @@ -53,8 +53,8 @@ "http.version": "1.1", "span.kind": "server" }, - "duration": 284000, - "start": 1709340452020521000 + "duration": 255000, + "start": 1709360367270976000 }, { "name": "http.server.request", @@ -66,7 +66,7 @@ "type": "web", "error": 0, "meta": { - "_dd.p.tid": "65e2772400000000", + "_dd.p.tid": "65e2c4ef00000000", "component": "starlette", "http.method": "GET", "http.status_code": "200", @@ -75,6 +75,6 @@ "http.version": "1.1", "span.kind": "server" }, - "duration": 138000, - "start": 1709340452020680000 + "duration": 126000, + "start": 1709360367271119000 }]] diff --git a/tests/snapshots/tests.contrib.starlette.test_starlette.test_subapp_snapshot.json b/tests/snapshots/tests.contrib.starlette.test_starlette.test_subapp_snapshot.json index 68ee3a4c741..7b206e476f9 100644 --- a/tests/snapshots/tests.contrib.starlette.test_starlette.test_subapp_snapshot.json +++ b/tests/snapshots/tests.contrib.starlette.test_starlette.test_subapp_snapshot.json @@ -11,7 +11,7 @@ "meta": { "_dd.base_service": "", "_dd.p.dm": "-0", - "_dd.p.tid": "65e2772f00000000", + "_dd.p.tid": "65e2c4ef00000000", "component": "starlette", "http.method": "GET", "http.route": "/sub-app/hello/{name}", @@ -20,17 +20,17 @@ "http.useragent": "testclient", "http.version": "1.1", "language": "python", - "runtime-id": "f39de43db9104cf6afe785ddd2664ac7", + "runtime-id": "33c779b304044ecc8e830e7453f5536c", "span.kind": "server" }, "metrics": { "_dd.top_level": 1, "_dd.tracer_kr": 1.0, "_sampling_priority_v1": 1, - "process_id": 15044 + "process_id": 44358 }, - "duration": 421000, - "start": 1709340463106458000 + "duration": 787000, + "start": 1709360367699985000 }, { "name": "starlette.request", @@ -51,6 +51,6 @@ "http.version": "1.1", "span.kind": "server" }, - "duration": 196000, - "start": 1709340463106697000 + "duration": 264000, + "start": 1709360367700524000 }]] diff --git a/tests/snapshots/tests.contrib.starlette.test_starlette.test_table_query_snapshot.json b/tests/snapshots/tests.contrib.starlette.test_starlette.test_table_query_snapshot.json index eedd3d9890a..df610428375 100644 --- a/tests/snapshots/tests.contrib.starlette.test_starlette.test_table_query_snapshot.json +++ b/tests/snapshots/tests.contrib.starlette.test_starlette.test_table_query_snapshot.json @@ -11,7 +11,7 @@ "meta": { "_dd.base_service": "", "_dd.p.dm": "-0", - "_dd.p.tid": "65e2772d00000000", + "_dd.p.tid": "65e2c4f300000000", "component": "starlette", "http.method": "POST", "http.route": "/notes", @@ -20,17 +20,17 @@ "http.useragent": "testclient", "http.version": "1.1", "language": "python", - "runtime-id": "f39de43db9104cf6afe785ddd2664ac7", + "runtime-id": "33c779b304044ecc8e830e7453f5536c", "span.kind": "server" }, "metrics": { "_dd.top_level": 1, "_dd.tracer_kr": 1.0, "_sampling_priority_v1": 1, - "process_id": 15044 + "process_id": 44358 }, - "duration": 1662000, - "start": 1709340461961561000 + "duration": 2592000, + "start": 1709360371323320000 }, { "name": "sqlite.query", @@ -52,8 +52,8 @@ "_dd.top_level": 1, "db.row_count": 1 }, - "duration": 300000, - "start": 1709340461962389000 + "duration": 483000, + "start": 1709360371324661000 }], [ { @@ -68,7 +68,7 @@ "meta": { "_dd.base_service": "", "_dd.p.dm": "-0", - "_dd.p.tid": "65e2772d00000000", + "_dd.p.tid": "65e2c4f300000000", "component": "starlette", "http.method": "GET", "http.route": "/notes", @@ -77,17 +77,17 @@ "http.useragent": "testclient", "http.version": "1.1", "language": "python", - "runtime-id": "f39de43db9104cf6afe785ddd2664ac7", + "runtime-id": "33c779b304044ecc8e830e7453f5536c", "span.kind": "server" }, "metrics": { "_dd.top_level": 1, "_dd.tracer_kr": 1.0, "_sampling_priority_v1": 1, - "process_id": 15044 + "process_id": 44358 }, - "duration": 556000, - "start": 1709340461964439000 + "duration": 2106000, + "start": 1709360371328928000 }, { "name": "sqlite.query", @@ -108,6 +108,6 @@ "_dd.measured": 1, "_dd.top_level": 1 }, - "duration": 97000, - "start": 1709340461964708000 + "duration": 186000, + "start": 1709360371330495000 }]]