Struct wasmcloud_core::otel::OtelConfig
source · pub struct OtelConfig {Show 15 fields
pub enable_observability: bool,
pub enable_traces: Option<bool>,
pub enable_metrics: Option<bool>,
pub enable_logs: Option<bool>,
pub observability_endpoint: Option<String>,
pub traces_endpoint: Option<String>,
pub metrics_endpoint: Option<String>,
pub logs_endpoint: Option<String>,
pub protocol: OtelProtocol,
pub additional_ca_paths: Vec<PathBuf>,
pub trace_level: Level,
pub traces_sampler: Option<String>,
pub traces_sampler_arg: Option<String>,
pub max_batch_queue_size: Option<usize>,
pub concurrent_exports: Option<usize>,
}
Expand description
Configuration values for OpenTelemetry
Fields§
§enable_observability: bool
Determine whether observability should be enabled.
enable_traces: Option<bool>
Determine whether traces should be enabled.
enable_metrics: Option<bool>
Determine whether metrics should be enabled.
enable_logs: Option<bool>
Determine whether logs should be enabled.
observability_endpoint: Option<String>
Overrides the OpenTelemetry endpoint for all signals.
traces_endpoint: Option<String>
Overrides the OpenTelemetry endpoint for traces.
metrics_endpoint: Option<String>
Overrides the OpenTelemetry endpoint for metrics.
logs_endpoint: Option<String>
Overrides the OpenTelemetry endpoint for logs.
protocol: OtelProtocol
Determines whether http or grpc will be used for exporting the telemetry.
additional_ca_paths: Vec<PathBuf>
Additional CAs to include in the OpenTelemetry client configuration
trace_level: Level
The level of tracing to enable.
traces_sampler: Option<String>
Configures type of sampler to use for tracing. This will override any sampler set via the standard environment variables
traces_sampler_arg: Option<String>
An additional argument to pass to the sampler. Used for cases such as the trace_id_ratio_based sampler.
max_batch_queue_size: Option<usize>
The maximum number of tracing events that can be buffered in memory before being exported. If the queue is full, events will be dropped. If not set, the default for the underlying exporter will be used. This will override any value set via the standard environment variables.
concurrent_exports: Option<usize>
The maximum number of concurrent export threads that can be used to export tracing data to collectors. By default, this number is set to 1, which means that export batches will be exported synchronously. This setting has a direct impact on memory usage and performance. Setting to > 1 can improve the performance of the exporter, but it can also increase memory usage (and possibly CPU). This will override any value set via the standard environment variables.
Implementations§
source§impl OtelConfig
impl OtelConfig
pub fn logs_endpoint(&self) -> String
pub fn metrics_endpoint(&self) -> String
pub fn traces_endpoint(&self) -> String
pub fn logs_enabled(&self) -> bool
pub fn metrics_enabled(&self) -> bool
pub fn traces_enabled(&self) -> bool
Trait Implementations§
source§impl Clone for OtelConfig
impl Clone for OtelConfig
source§fn clone(&self) -> OtelConfig
fn clone(&self) -> OtelConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for OtelConfig
impl Debug for OtelConfig
source§impl Default for OtelConfig
impl Default for OtelConfig
source§fn default() -> OtelConfig
fn default() -> OtelConfig
source§impl<'de> Deserialize<'de> for OtelConfig
impl<'de> Deserialize<'de> for OtelConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for OtelConfig
impl RefUnwindSafe for OtelConfig
impl Send for OtelConfig
impl Sync for OtelConfig
impl Unpin for OtelConfig
impl UnwindSafe for OtelConfig
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)