#[non_exhaustive]pub struct SpansAttributes {Show 18 fields
pub attributes: Option<BTreeMap<String, Value>>,
pub custom: Option<BTreeMap<String, Value>>,
pub end_timestamp: Option<DateTime<Utc>>,
pub env: Option<String>,
pub host: Option<String>,
pub ingestion_reason: Option<String>,
pub parent_id: Option<String>,
pub resource_hash: Option<String>,
pub resource_name: Option<String>,
pub retained_by: Option<String>,
pub service: Option<String>,
pub single_span: Option<bool>,
pub span_id: Option<String>,
pub start_timestamp: Option<DateTime<Utc>>,
pub tags: Option<Vec<String>>,
pub trace_id: Option<String>,
pub type_: Option<String>,
pub additional_properties: BTreeMap<String, Value>,
/* private fields */
}
Expand description
JSON object containing all span attributes and their associated values.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.attributes: Option<BTreeMap<String, Value>>
JSON object of attributes from your span.
custom: Option<BTreeMap<String, Value>>
JSON object of custom spans data.
end_timestamp: Option<DateTime<Utc>>
End timestamp of your span.
env: Option<String>
Name of the environment from where the spans are being sent.
host: Option<String>
Name of the machine from where the spans are being sent.
ingestion_reason: Option<String>
The reason why the span was ingested.
parent_id: Option<String>
Id of the span that’s parent of this span.
resource_hash: Option<String>
Unique identifier of the resource.
resource_name: Option<String>
The name of the resource.
retained_by: Option<String>
The reason why the span was indexed.
service: Option<String>
The name of the application or service generating the span events. It is used to switch from APM to Logs, so make sure you define the same value when you use both products.
single_span: Option<bool>
Whether or not the span was collected as a stand-alone span. Always associated to “single_span” ingestion_reason if true.
span_id: Option<String>
Id of the span.
start_timestamp: Option<DateTime<Utc>>
Start timestamp of your span.
Array of tags associated with your span.
trace_id: Option<String>
Id of the trace to which the span belongs.
type_: Option<String>
The type of the span.
additional_properties: BTreeMap<String, Value>
Implementations§
Source§impl SpansAttributes
impl SpansAttributes
pub fn new() -> SpansAttributes
pub fn attributes(self, value: BTreeMap<String, Value>) -> Self
pub fn custom(self, value: BTreeMap<String, Value>) -> Self
pub fn end_timestamp(self, value: DateTime<Utc>) -> Self
pub fn env(self, value: String) -> Self
pub fn host(self, value: String) -> Self
pub fn ingestion_reason(self, value: String) -> Self
pub fn parent_id(self, value: String) -> Self
pub fn resource_hash(self, value: String) -> Self
pub fn resource_name(self, value: String) -> Self
pub fn retained_by(self, value: String) -> Self
pub fn service(self, value: String) -> Self
pub fn single_span(self, value: bool) -> Self
pub fn span_id(self, value: String) -> Self
pub fn start_timestamp(self, value: DateTime<Utc>) -> Self
pub fn trace_id(self, value: String) -> Self
pub fn type_(self, value: String) -> Self
pub fn additional_properties(self, value: BTreeMap<String, Value>) -> Self
Trait Implementations§
Source§impl Clone for SpansAttributes
impl Clone for SpansAttributes
Source§fn clone(&self) -> SpansAttributes
fn clone(&self) -> SpansAttributes
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more