logo
pub struct Transaction<'a> {
    pub event_id: Uuid,
    pub name: Option<String>,
    pub release: Option<Cow<'a, str>>,
    pub environment: Option<Cow<'a, str>>,
    pub tags: BTreeMap<String, String>,
    pub extra: BTreeMap<String, Value>,
    pub sdk: Option<Cow<'a, ClientSdkInfo>>,
    pub platform: Cow<'a, str>,
    pub timestamp: Option<SystemTime>,
    pub start_timestamp: SystemTime,
    pub spans: Vec<Span, Global>,
    pub contexts: BTreeMap<String, Context>,
}
Expand description

Represents a tracing transaction.

Fields

event_id: Uuid

The ID of the event

name: Option<String>

The transaction name.

release: Option<Cow<'a, str>>

A release identifier.

environment: Option<Cow<'a, str>>

An optional environment identifier.

tags: BTreeMap<String, String>

Optional tags to be attached to the event.

extra: BTreeMap<String, Value>

Optional extra information to be sent with the event.

sdk: Option<Cow<'a, ClientSdkInfo>>

SDK metadata

platform: Cow<'a, str>

A platform identifier for this event.

timestamp: Option<SystemTime>

The end time of the transaction.

start_timestamp: SystemTime

The start time of the transaction.

spans: Vec<Span, Global>

The collection of finished spans part of this transaction.

contexts: BTreeMap<String, Context>

Optional contexts.

Implementations

Creates a new span transaction the current timestamp and random id.

Creates a fully owned version of the transaction.

Finalizes the transaction to be dispatched.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Formats the value using the given formatter. Read more

Performs the conversion.

Performs the conversion.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.