Struct fiberplane_models::providers::OtelMetadata
source · #[non_exhaustive]pub struct OtelMetadata {
pub attributes: BTreeMap<String, Value>,
pub resource: BTreeMap<String, Value>,
pub trace_id: Option<OtelTraceId>,
pub span_id: Option<OtelSpanId>,
}Expand description
Metadata following the OpenTelemetry metadata spec.
See also: https://github.com/open-telemetry/opentelemetry-specification/
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.attributes: BTreeMap<String, Value>OpenTelemetry attributes.
See also: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/common/README.md
resource: BTreeMap<String, Value>Resource metadata.
See also: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/README.md
trace_id: Option<OtelTraceId>§span_id: Option<OtelSpanId>Implementations§
source§impl OtelMetadata
impl OtelMetadata
sourcepub fn builder() -> OtelMetadataBuilder<((), (), (), ())>
pub fn builder() -> OtelMetadataBuilder<((), (), (), ())>
Create a builder for building OtelMetadata.
On the builder, call .attributes(...), .resource(...), .trace_id(...)(optional), .span_id(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of OtelMetadata.
Trait Implementations§
source§impl Clone for OtelMetadata
impl Clone for OtelMetadata
source§fn clone(&self) -> OtelMetadata
fn clone(&self) -> OtelMetadata
Returns a copy of the value. Read more
1.0.0 · 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 OtelMetadata
impl Debug for OtelMetadata
source§impl Default for OtelMetadata
impl Default for OtelMetadata
source§fn default() -> OtelMetadata
fn default() -> OtelMetadata
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for OtelMetadata
impl<'de> Deserialize<'de> for OtelMetadata
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>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq for OtelMetadata
impl PartialEq for OtelMetadata
source§fn eq(&self, other: &OtelMetadata) -> bool
fn eq(&self, other: &OtelMetadata) -> bool
This method tests for
self and other values to be equal, and is used
by ==.source§impl Serialize for OtelMetadata
impl Serialize for OtelMetadata
impl Eq for OtelMetadata
impl StructuralPartialEq for OtelMetadata
Auto Trait Implementations§
impl Freeze for OtelMetadata
impl RefUnwindSafe for OtelMetadata
impl Send for OtelMetadata
impl Sync for OtelMetadata
impl Unpin for OtelMetadata
impl UnwindSafe for OtelMetadata
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