agent_data_plane_config/domains/remote_configuration.rs
1//! Controls which trace settings ADP receives from the core Agent through Remote Configuration.
2
3use serde::Serialize;
4
5/// Switches for remote trace sampling settings and OTLP trace attribute mappings.
6///
7/// ADP subscribes only in connected mode with a local trace pipeline. Each product switch also requires
8/// [`enabled`](Self::enabled) to be `true`.
9#[derive(Clone, Debug, PartialEq, Eq, Serialize)]
10pub struct Domain {
11 /// Controls Remote Configuration (`remote_configuration.enabled`).
12 ///
13 /// Defaults to `true`.
14 pub enabled: bool,
15
16 /// Controls remote trace sampling updates (`remote_configuration.apm_sampling.enabled`).
17 ///
18 /// Defaults to `true`. Has no effect when [`enabled`](Self::enabled) is `false`.
19 pub apm_sampling_enabled: bool,
20
21 /// Controls remote OTLP trace attribute mappings (`remote_configuration.apm_semantics.enabled`).
22 ///
23 /// Defaults to `false`. Has no effect when [`enabled`](Self::enabled) is `false`.
24 pub apm_semantics_enabled: bool,
25}
26
27impl Default for Domain {
28 fn default() -> Self {
29 Self {
30 enabled: true,
31 apm_sampling_enabled: true,
32 apm_semantics_enabled: false,
33 }
34 }
35}