Normalize "docker" host to "localhost" for differente execution envs#7089
Normalize "docker" host to "localhost" for differente execution envs#7089bwoebi wants to merge 1 commit into
Conversation
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4fbd448a27
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| stack = re.sub(r"\.php\(\d+\)", ".php(<scrubbed>)", stack) | ||
| span_meta[meta_key] = stack + "<scrubbed>" | ||
| elif meta_key == "http.url": | ||
| span_meta[meta_key] = meta_value.replace("http://docker", "http://localhost") |
There was a problem hiding this comment.
Normalize the host header alongside the URL
When the debugger exception replay scenario runs with SYSTEM_TESTS_WEBLOG_HOST=docker or DOCKER_HOST=tcp://docker:..., _Weblog sends requests to http://docker:7777, so tracers that capture the request host can emit http.request.headers.host: docker:7777. This scrub only rewrites http.url, but the .NET approvals still compare http.request.headers.host against localhost:7777 (for example tests/debugger/utils/approvals/dotnet/2.50.0/exception_replay_simple_spans_expected.json:28), so the same execution environment this change is meant to support will still fail for those active .NET tests.
Useful? React with 👍 / 👎.
Simple PR to make system-tests pass again in dd-trace-php.