Use shared datadog-mock-intake crate and add standalone fake-intake binary - #1392
Draft
lucaspimentel wants to merge 2 commits into
Draft
lucaspimentel wants to merge 2 commits into
lucaspimentel wants to merge 2 commits into
Conversation
…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.
|
🔗 Commit SHA: 6826b1f | Docs | View more details | Give us feedback! |
This was referenced Sep 25, 2026
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.
datadog-mock-intake crate and add standalone fake-intake binary
Member
Author
|
Note to self: rename |
Member
Author
|
@DataDog review |
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/README.mdfor the workflow.mock-intakefeature so the binary stays checked. Test runs are unchanged: the integration tests run in every feature set.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 (or re-pin if its head moves).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): 693 tests passed, 0 failed, includingapm_integration_test(19) anddsm_integration_test(1), which previously ran only behind a feature flag and now run by default.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.