Repository navigation
Use shared datadog-mock-intake crate and add standalone mock-intake binary - #1392
Draft
lucaspimentel wants to merge 10 commits into
Draft
lucaspimentel wants to merge 10 commits into
lucaspimentel wants to merge 10 commits into
Conversation
❌ ErrorsYour PR has failed checks. Please review the issues below and take necessary action before merging. 🚦 1 Pipeline job failed
Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: eba0bba | Docs | View more details | Give us feedback! |
This was referenced Sep 25, 2026
datadog-mock-intake crate and add standalone fake-intake binary
Member
Author
|
Note to self: rename |
Member
Author
|
@DataDog review |
datadog-mock-intake crate and add standalone fake-intake binarydatadog-mock-intake crate and add standalone mock-intake binary
…inary Replace the test-local APM intake fixture with the datadog-mock-intake crate from serverless-components (pinned to its first published revision). The APM and DSM integration tests use it as an ungated dev-dependency and run in every test build; the previous fixture is deleted. Add a standalone fake-intake binary behind a new fake-intake feature for local APM debugging: it runs the shared crate with request summaries, stats failure injection (FAKE_INTAKE_FAIL_STATS_FIRST_N), and JSON dumps (FAKE_INTAKE_DUMP_DIR). CI clippy now compiles the feature so the binary stays checked.
The standalone binary is now mock-intake, gated by the mock-intake feature, configured with MOCK_INTAKE_PORT, MOCK_INTAKE_FAIL_STATS_FIRST_N, and MOCK_INTAKE_DUMP_DIR. This aligns the binary with the datadog-mock-intake crate it wraps, whose summaries already used the mock-intake prefix. The mock-intake crate is now a git dependency, so LICENSE-3rdparty.csv gains its first-party record.
Dedupe the duplicated env-var parsing in the mock-intake binary into a generic parse_env_or helper with identical error messages, and drop the rmp-serde/flate2 dev-dependencies left over from when the harness decoded stats payloads itself; the shared datadog-mock-intake crate handles that now.
lucaspimentel
force-pushed
the
lpimentel/mock-intake-consume
branch
from
October 19, 2026 22:42
603b72a to
b186890
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Consumes the new
datadog-mock-intakecrate fromDataDog/serverless-components(#174, pinned to rev37f5b32a853f82a00523051827af074662f3e8fa):tests/common/fake_intake.rs) is deleted.mock-intakebinary behind a newmock-intakefeature for local APM debugging: it runs the shared crate with request summaries, stats failure injection (MOCK_INTAKE_FAIL_STATS_FIRST_N), and JSON dumps (MOCK_INTAKE_DUMP_DIR). Seebottlecap/src/bin/mock-intake/README.mdfor the workflow. The smoke procedure uses thebottlecap-test-modebinary from [APMSVLS-501] feat(bottlecap): addbottlecap-test-modebinary #1216 (not yet merged).mock-intakefeature so the binary stays checked, and GitLab clippy now lints all targets (matching GitHub CI). Test runs are unchanged: the integration tests run in every feature set, as before.Stacked on serverless-components#174: this PR's dependency pins rev
37f5b32a853f82a00523051827af074662f3e8fa, the head of that PR's branch (re-pinned to its current head after the mock-intake rename commit). Merge #174 first, then re-pin to the merged commit onmain.Supersedes #1385, which introduced the intake as a bottlecap library module; that implementation now lives in the shared crate.
Testing
cargo test -p bottlecap(default): suite passes, includingapm_integration_testanddsm_integration_test.cargo build -p bottlecap --features mock-intake: clean.cargo clippy --workspace --all-targetsacross default / fips / mock-intake feature sets: no lint warnings.dd-rust-license-tool check: passes (no new third-party dependencies; the crate is first-party).mock-intakebinary with failure injection and a dump directory, POSTed a gzip msgpackStatsPayloadto/api/v0.2/stats: 202 Accepted,mock-intake:summary line with grouped hits and normalized aggregation key, and a JSON dump containing the decoded payload; SIGINT shutdown clean.