1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
use crate::{api, sdk};
use std::sync::Arc;
#[derive(Debug)]
pub struct Config {
pub default_sampler: Box<dyn api::Sampler>,
pub id_generator: Box<dyn api::IdGenerator>,
pub max_events_per_span: u32,
pub max_attributes_per_span: u32,
pub max_links_per_span: u32,
pub resource: Arc<sdk::Resource>,
}
impl Default for Config {
fn default() -> Self {
Config {
default_sampler: Box::new(sdk::Sampler::Always),
id_generator: Box::new(sdk::IdGenerator::default()),
max_events_per_span: 128,
max_attributes_per_span: 32,
max_links_per_span: 32,
resource: Arc::new(sdk::Resource::default()),
}
}
}