feat(rust): axum weblog#7288
Conversation
fix: error at building weblog)
|
|
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dc1864abb4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Client-IP resolution (forwarded-header priority + public-IP filtering) and referer-hostname extraction are tracer/appsec responsibilities. The weblog hand-rolled them, so Test_StandardTagsClientIp and Test_StandardTagsReferrerHostname were validating the fixture rather than dd-trace-rs. Remove the logic and mark those tests missing_feature.
Query-string obfuscation of http.url is a tracer responsibility. The weblog's hand-rolled scrubber only served fixture-tested scrubbing cases (all already missing_feature for Rust), so drop it entirely and report the URL verbatim — the weblog now does near-zero tracer-side work. The outgoing-call span still rebuilds its URL from host_str(), so userinfo is dropped and Test_UrlField is unaffected.
Query string obfuscation is not implemented in dd-trace-rs; the Default::test_query_string_obfuscation_configured_server case was missing from the manifest alongside its already-disabled siblings.
Client IP resolution (and the /waf endpoint the with-attack variant needs) is not implemented in dd-trace-rs, matching the existing Test_StandardTagsClientIp disablement.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bf6c402cf8
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| @@ -0,0 +1,30 @@ | |||
| FROM rust:1.94.1-slim-bookworm AS builder | |||
There was a problem hiding this comment.
Document the new Axum weblog and its endpoints
This adds a new end-to-end weblog and multiple endpoints, but the commit does not update either docs/execute/build.md or the endpoint list in docs/understand/weblogs/README.md. .cursor/rules/end-to-end-testing.mdc explicitly requires every new weblog to be referenced in the build documentation and every new endpoint to be listed in the weblog specification, so users cannot discover the supported Rust build command or endpoint coverage from the authoritative docs.
Useful? React with 👍 / 👎.
Motivation
Rust is lacking a weblog to run end to end tests. The goal is to provide a canonical weblog based on axum and community otel integrations.
Changes
Introduces a new Axum-based Rust weblog and wires it into the end-to-end test suite:
utils/build/docker/rust/axum/): an Axum HTTP server instrumented withdd-trace-rs, exposing the core endpoints needed by end-to-end tests (/,/healthcheck,/headers,/status,/spans,/stats-unique,/params/{value},/sample_rate_route/{i},/flush,/createextraservice,/e2e_otel_span,/e2e_single_span,/returnheaders,/make_distant_call, and the OTel drop-in propagator endpoints).utils/build/docker/rust/axum.Dockerfile): a multi-stage build that compiles the weblog and installsdd-trace-rsviainstall_ddtrace.sh, and adds the corresponding mirror image entry.manifests/rust.yml): mark tests that exercise endpoints or features not yet implemented in the Axum weblog or indd-trace-rsasmissing_feature/incomplete_test_app/irrelevant, while removing entries that no longer apply now that this weblog exists.client_iptagging, referer-hostname extraction,and query-string obfuscation unimplemented in the weblog rather than
faking them, since those are tracer responsibilities.
datadog-opentelemetry,tracing-opentelemetry,opentelemetry-instrumentation-towerand theopentelemetry*crates must all resolve to the sameopentelemetryminor version, or Rust links two copies side by side and half the app silently gets a no-op tracer/propagator (no server spans, no context extraction).install_ddtrace.shcurrently enforces this at build time rather than via staticCargo.tomlpins: it installsdatadog-opentelemetry, inspectscargo metadatato find the OTel minor it resolved to, re-pins the other OTel/contrib crates to match, then fails the build ifcargo metadatastill shows more than oneopentelemetryversion (usually becauseopentelemetry-instrumentation-tower, which is git-pinned, has drifted).This self-adjusts as
dd-trace-rsmoves, but it's a lot of logic standing in for what should be static dependency info, and it only fails at build time, not at edit time. Not settled — open to alternatives (vendoring/forking the tower crate, manual re-pinning).Workflow
🚀 Once your PR is reviewed and the CI 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