pub struct TelemetryPolicy {
pub enabled: bool,
pub span_name: Option<String>,
/* private fields */
}Expand description
Endpoint-level telemetry instructions consumed by tracing and metrics adapters.
Fields§
§enabled: boolWhether request tracing and metrics are enabled.
span_name: Option<String>Optional stable span name; endpoint identity is used when absent.
Implementations§
Source§impl TelemetryPolicy
impl TelemetryPolicy
Sourcepub const fn enabled() -> Self
pub const fn enabled() -> Self
Creates enabled telemetry without recording request or response data.
Sourcepub fn span_name(self, span_name: impl Into<String>) -> SoapResult<Self>
pub fn span_name(self, span_name: impl Into<String>) -> SoapResult<Self>
Sets a stable non-empty span name.
Sourcepub fn record_request_header(self, header: HeaderName) -> SoapResult<Self>
pub fn record_request_header(self, header: HeaderName) -> SoapResult<Self>
Allows one non-sensitive request header to be recorded.
Sourcepub fn record_response_header(self, header: HeaderName) -> SoapResult<Self>
pub fn record_response_header(self, header: HeaderName) -> SoapResult<Self>
Allows one non-sensitive response header to be recorded.
Sourcepub fn request_headers(&self) -> &[HeaderName]
pub fn request_headers(&self) -> &[HeaderName]
Returns the allowlist of request headers safe to record.
Sourcepub fn response_headers(&self) -> &[HeaderName]
pub fn response_headers(&self) -> &[HeaderName]
Returns the allowlist of response headers safe to record.
Sourcepub fn validate(&self) -> SoapResult<()>
pub fn validate(&self) -> SoapResult<()>
Validates public telemetry fields after direct mutation.
Trait Implementations§
Source§impl Clone for TelemetryPolicy
impl Clone for TelemetryPolicy
Source§fn clone(&self) -> TelemetryPolicy
fn clone(&self) -> TelemetryPolicy
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TelemetryPolicy
impl Debug for TelemetryPolicy
Source§impl Default for TelemetryPolicy
impl Default for TelemetryPolicy
impl Eq for TelemetryPolicy
Source§impl PartialEq for TelemetryPolicy
impl PartialEq for TelemetryPolicy
impl StructuralPartialEq for TelemetryPolicy
Auto Trait Implementations§
impl Freeze for TelemetryPolicy
impl RefUnwindSafe for TelemetryPolicy
impl Send for TelemetryPolicy
impl Sync for TelemetryPolicy
impl Unpin for TelemetryPolicy
impl UnsafeUnpin for TelemetryPolicy
impl UnwindSafe for TelemetryPolicy
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
Mutably borrows from an owned value. Read more