pub struct DatadogConfig { /* private fields */ }Expand description
Agent-facing config. hostname, api_key, dd_url, and the socket are
supplied by the environment; log_level and the DogStatsD options are
sampled per branch. The static flags are appended by Self::to_yaml, not
fields here.
Implementations§
Source§impl DatadogConfig
impl DatadogConfig
Sourcepub fn sample<R: Rng + ?Sized>(
rng: &mut R,
hostname: &str,
api_key: &str,
dd_url: &str,
dogstatsd_socket: &Path,
) -> Self
pub fn sample<R: Rng + ?Sized>( rng: &mut R, hostname: &str, api_key: &str, dd_url: &str, dogstatsd_socket: &Path, ) -> Self
Generate a config: the environmental fields come from the caller, the rest
are sampled from rng. With an Antithesis-backed rng, each call after the
snapshot yields an independent draw per replay branch.
Sourcepub fn to_yaml(&self) -> Result<String>
pub fn to_yaml(&self) -> Result<String>
Render self as a datadog.yaml string, followed by the static-tail
flags.
§Errors
Returns an error if serialization fails.
Sourcepub fn driver_config<R: Rng + ?Sized>(&self, rng: &mut R) -> DriverConfig
pub fn driver_config<R: Rng + ?Sized>(&self, rng: &mut R) -> DriverConfig
Derive the DriverConfig a load generator reads to match this timeline’s
SUT, sampling its knobs from rng so they land with the SUT config and the
two cannot disagree.
Trait Implementations§
Source§impl Debug for DatadogConfig
impl Debug for DatadogConfig
Auto Trait Implementations§
impl Freeze for DatadogConfig
impl RefUnwindSafe for DatadogConfig
impl Send for DatadogConfig
impl Sync for DatadogConfig
impl Unpin for DatadogConfig
impl UnwindSafe for DatadogConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more