[−][src]Struct spirit_dipstick::Config
The Fragment
to configure dipstick
s backends.
This contains the configuration options to configure where the metrics go.
If you want to be able to turn the metrics off completely, use Option<Config>
.
Some of the fields are publicly available and accessible, as they might be useful for other purposes ‒ like generating some metrics at the same frequency as they are being sent.
Examples
use serde::Deserialize; use spirit_dipstick::Config; #[derive(Default, Deserialize)] struct Cfg { metrics: Config, }
Fields
prefix: String
The prefix ‒ first level of the metrics tree, under which all the metrics are stored.
If not specifie, it defaults to the application name (gotten from the CARGO_PKG_NAME
environment variable).
flush_period: Duration
An interval at which the metrics are sent in aggregated form.
The metrics are not sent right away, they are buffered and collated for this period of time, then they are sent in a batch.
Trait Implementations
impl PartialEq<Config> for Config
[src]
impl Default for Config
[src]
impl Clone for Config
[src]
fn clone(&self) -> Config
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Eq for Config
[src]
impl Debug for Config
[src]
impl Serialize for Config
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de> Deserialize<'de> for Config
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Fragment for Config
[src]
type Driver = CacheEq<Config>
The default driver to be used by the fragment. Read more
type Installer = ()
The default installer to be used unless a transformation or the user doesn't provide one. Read more
type Seed = ()
The intermediate product if the fragment supports two-stage creation of [Resource
][Fragment::Resource]s. If not, it can be set to ()
. Read more
type Resource = Backends
The actual product this [Fragment
] creates.
fn make_seed(&self, _name: &str) -> Result<(), Error>
[src]
fn make_resource(&self, _seed: &mut (), name: &str) -> Result<Backends, Error>
[src]
const RUN_BEFORE_CONFIG: bool
[src]
Configuration if the pipeline should be run once even before the config is loaded. Read more
fn create(&self, name: &'static str) -> Result<Self::Resource, Error>
[src]
Runs both stages of creation at once. Read more
fn init<B>(builder: B, &'static str) -> Result<B, Error> where
B: Extensible<Ok = B>,
<B as Extensible>::Config: DeserializeOwned,
<B as Extensible>::Config: Send,
<B as Extensible>::Config: Sync,
<B as Extensible>::Config: 'static,
<B as Extensible>::Opts: StructOpt,
<B as Extensible>::Opts: Send,
<B as Extensible>::Opts: Sync,
<B as Extensible>::Opts: 'static,
[src]
B: Extensible<Ok = B>,
<B as Extensible>::Config: DeserializeOwned,
<B as Extensible>::Config: Send,
<B as Extensible>::Config: Sync,
<B as Extensible>::Config: 'static,
<B as Extensible>::Opts: StructOpt,
<B as Extensible>::Opts: Send,
<B as Extensible>::Opts: Sync,
<B as Extensible>::Opts: 'static,
An initialization routine. Read more
impl Optional for Config
[src]
impl StructDoc for Config
[src]
fn document() -> Documentation
[src]
Auto Trait Implementations
Blanket Implementations
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
impl<T> From for T
[src]
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,
impl<T> IntoResult for T
[src]
fn into_result(self) -> Result<T, Error>
[src]
impl<F> Optional for F where
F: Stackable,
[src]
F: Stackable,