pub struct OpenTelemetryConfig {
pub endpoint: String,
pub service_name: String,
pub include_headers: bool,
pub include_bodies: bool,
pub max_body_size: usize,
pub span_annotations: HashMap<String, String>,
pub collector_headers: HashMap<String, String>,
pub resource_attributes: HashMap<String, String>,
}Expand description
Configuration for the OpenTelemetry integration.
Fields§
§endpoint: StringThe endpoint URL for the OpenTelemetry collector.
service_name: StringThe service name to use for traces.
include_headers: boolWhether to include request and response headers in spans.
include_bodies: boolWhether to include request and response bodies in spans.
max_body_size: usizeMaximum body size to include in spans (in bytes).
span_annotations: HashMap<String, String>Custom span annotations to add to all spans. These are key-value pairs that will be added as attributes to all spans.
collector_headers: HashMap<String, String>Custom headers to add to the OpenTelemetry collector requests. These are key-value pairs that will be added as headers to all collector requests.
resource_attributes: HashMap<String, String>Custom resource attributes to add to the OpenTelemetry resource. These are key-value pairs that will be added as resource attributes to all spans. Resource attributes are different from span annotations as they are applied at the tracer level and appear on all spans created by the tracer.
Trait Implementations§
Source§impl Clone for OpenTelemetryConfig
impl Clone for OpenTelemetryConfig
Source§fn clone(&self) -> OpenTelemetryConfig
fn clone(&self) -> OpenTelemetryConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more