APMSVLS-494: add a standalone fake intake for local APM debugging - #1385
Closed
lucaspimentel wants to merge 1 commit into
Closed
lucaspimentel wants to merge 1 commit into
lucaspimentel wants to merge 1 commit into
Conversation
Promote the test-only fake_intake fixture into the bottlecap library behind a new fake-intake feature, and add a thin fake-intake binary that runs it with request summaries, stats failure injection, and JSON dumps for local debugging against a live tracer or the test-mode trace processor. The APM and DSM integration tests now use the library module and are skipped by default-feature and FIPS builds.
|
🔗 Commit SHA: 6fb7938 | Docs | View more details | Give us feedback! |
Member
Author
|
Superseded by #1392, which consumes the intake as the shared |
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
Promotes the test-only fake-intake fixture into the bottlecap library behind a new
fake-intakefeature and adds a standalonefake-intakebinary for local APM debugging (APMSVLS-494 phase 2).The new binary accepts the same APM endpoints the extension flushes to (
/api/v0.2/statsmsgpack,/api/v0.2/tracesprotobuf,/api/v0.1/pipeline_statsDSM msgpack), decodes payloads on arrival, and reports them locally. It supports:FAKE_INTAKE_FAIL_STATS_FIRST_Nreturns HTTP 500 for the first N stats attempts (still decoded, summarized, and dumped, but not captured) so rejection/retry behavior can be exercised locally.FAKE_INTAKE_DUMP_DIRwrites one collision-proof envelope per decoded request, including rejected stats attempts.The
fake-intakefeature is never enabled indefaultorfips. The APM and DSM integration tests now use the library module and are gated on the feature viarequired-features, so default/FIPS test runs skip them cleanly. Existing test bodies are unchanged.fake_intake.rsis self-contained for later extraction intoapm-agent-parity-rs.Local workflow (feature-gated builds, env vars, smoke procedure against
bottlecap-test-mode) is documented inbottlecap/README.md.Testing
cargo nextest run --workspace --features fake-intake: 708/708 passed (includes the APM/DSM integration tests and new fake-intake unit tests for grouping, failure injection, concurrency, dumps, and config errors); default-feature run: 670 passed with the gated targets skipped.cargo clippy --workspace --all-targets -- -D warningspasses fordefault,default,test-mode,fake-intake, andfips.bottlecap-test-modebinary: trace POST accepted,/flush204, stats hits 2/1 forGET /a/GET /bverified in summaries and JSON dumps; withFAKE_INTAKE_FAIL_STATS_FIRST_N=1the stats request returned 500 then 202 on retry, both attempts dumped.cargo testjob and extended clippy line verified.