pub struct ResourceAttrs {
pub service_name: String,
pub service_version: String,
pub service_namespace: String,
pub service_instance_id: String,
pub deployment_environment: String,
pub host_name: String,
pub host_arch: String,
pub extra: BTreeMap<String, String>,
}Expand description
Resource attribute set carrying the OTel semantic-convention keys
every sink projects onto its outbound batch (resource.attributes
for OTLP, partition columns for Parquet, etc.).
Fields§
§service_name: Stringservice.name — typically OTEL_SERVICE_NAME or the observer’s
configured service identity.
service_version: Stringservice.version.
service_namespace: Stringservice.namespace — logical service grouping (e.g. payments).
service_instance_id: Stringservice.instance.id — unique per process / replica.
deployment_environment: Stringdeployment.environment — production, staging, dev, …
host_name: Stringhost.name.
host_arch: Stringhost.arch — amd64, arm64, …
extra: BTreeMap<String, String>Any additional OTEL_RESOURCE_ATTRIBUTES pairs that did not
land in a first-class slot.
Implementations§
Source§impl ResourceAttrs
impl ResourceAttrs
Sourcepub fn to_semconv_map(&self) -> BTreeMap<String, String>
pub fn to_semconv_map(&self) -> BTreeMap<String, String>
Render the populated semconv keys as a flat BTreeMap. Useful
for sinks that project the attributes into a wire-format
KeyValueList.
Trait Implementations§
Source§impl Clone for ResourceAttrs
impl Clone for ResourceAttrs
Source§fn clone(&self) -> ResourceAttrs
fn clone(&self) -> ResourceAttrs
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 ResourceAttrs
impl Debug for ResourceAttrs
Source§impl Default for ResourceAttrs
impl Default for ResourceAttrs
Source§fn default() -> ResourceAttrs
fn default() -> ResourceAttrs
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ResourceAttrs
impl RefUnwindSafe for ResourceAttrs
impl Send for ResourceAttrs
impl Sync for ResourceAttrs
impl Unpin for ResourceAttrs
impl UnsafeUnpin for ResourceAttrs
impl UnwindSafe for ResourceAttrs
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