Skip to main content

saluki_components/sources/dogstatsd/replay/
mod.rs

1//! DogStatsD capture and replay support.
2//!
3//! This module contains the capture lifecycle, writer, capture file reader, and file header helpers used by the ADP
4//! DogStatsD capture and replay APIs.
5
6mod capture;
7mod capture_api;
8mod captured_tagger;
9mod file_header;
10mod reader;
11mod replay_api;
12mod replay_control;
13#[cfg(test)]
14pub(super) mod test_support;
15pub(super) mod writer;
16
17pub use self::capture::DogStatsDCaptureControl;
18pub(crate) use self::capture::TrafficCapture;
19pub use self::capture_api::{
20    CaptureTriggerBody, CaptureTriggerResponseBody, DogStatsDCaptureAPIHandler, CAPTURE_TRIGGER_ROUTE,
21};
22pub(crate) use self::captured_tagger::{CapturedTaggerHandle, CapturedTaggerStore};
23pub use self::reader::{TimestampResolution, TrafficCaptureReader};
24pub use self::replay_api::{DogStatsDReplayAPIHandler, ReplaySessionResponseBody, REPLAY_SESSION_ROUTE};
25pub use self::replay_control::{DogStatsDReplayControl, ReplayControlError, ReplaySession, DEFAULT_REPLAY_LOOPS};
26pub(crate) use self::writer::CaptureRecord;
27
28/// GID stamped onto replay-injected DogStatsD packets via `SCM_CREDENTIALS`.
29///
30/// The replay sender stamps this value as the `gid` field of the ancillary credentials block and packs the original
31/// captured PID into the `uid` field. The DogStatsD UDS listener uses this GID as the signal to recover the original
32/// PID from `uid` and route origin resolution against the captured tagger state instead of the live workload provider.
33pub const REPLAY_CREDENTIALS_GID: u32 = 999_888_777;