instrumentation telemetry: validate session id headers#6510
instrumentation telemetry: validate session id headers#6510
Conversation
|
As per https://dd.slack.com/archives/D032MDTSCR1/p1773765779731369 We need to assert:
|
Co-authored-by: Munir Abdinur <munir.abdinur@datadoghq.com>
|
Remaining gaps I believe are: Gap 1: The test should assert that for every event where DD-Session-ID != root_session_id (i.e. every child event), DD-Root-Session-ID must be present not just that at least one event has it globally. Gap 2 (exec vs fork): Same validation function for both test cases, exec propagation via env vars isn't distinctly tested. |
Both cases should be covered by the current test. We can discuss it in our next sync |
|
|
khanayan123
left a comment
There was a problem hiding this comment.
Thanks for addressing the comments, tests LGTM
|
✨ Fix all issues with BitsAI or with Cursor
|
Motivation
Enable telemetry session ID header tests (
DD-Session-ID,DD-Root-Session-ID,DD-Parent-Session-ID) across process forks per the Stable Service Instance Identifier RFC.Changes
sleep,crash,fork. Uses fork when supported, exec otherwise. Runtimes without fork (Java, Go, PHP, .NET) return 400 forfork=true.test_session_id_headers_across_forksandtest_session_id_headers_across_spawnedvalidate session ID headers in lifecycle telemetry. Usesget_lifecycle_events()to avoid lib-datadog metrics/log events. Asserts: DD-Session-ID = runtime_id, one root per app instance, at least two runtimes (parent + child).get_lifecycle_events()added to filter lifecycle events.docs/weblog/end-to-end_weblog.md.missing_featurefor other weblogs and non-fork runtimes.Workflow
🚀 Once your PR is reviewed and the CI is green, you can merge it!
🛟 #apm-shared-testing 🛟
Reviewer checklist
tests/ormanifests/is modified? I have the approval from R&P teambuild-XXX-imagelabel is present