fn add_event_with_timestamp(
        &mut self,
        name: String,
        timestamp: SystemTime,
        mut attributes: Vec<KeyValue>,
    ) {
        let event_attributes_limit = self.span_limits.max_attributes_per_event as usize;
        self.with_data(|data| {
            let dropped_attributes_count = attributes.len().saturating_sub(event_attributes_limit);
            attributes.truncate(event_attributes_limit);

            data.events.push_back(Event::new(
                name,
                timestamp,
                attributes,
                dropped_attributes_count as u32,
            ))
        });
    }
/// Records events at a specific time in the context of a given `Span`.
///
/// Note that the OpenTelemetry project documents certain ["standard event names and
/// keys"](https://github.com/open-telemetry/opentelemetry-specification/tree/v0.5.0/specification/trace/semantic_conventions/README.md)
/// which have prescribed semantic meanings.
Records events at a specific time in the context of a given `Span`.
Note that the OpenTelemetry project documents certain ["standard event names and
keys"]
which have prescribed semantic meanings.
Records events at a specific time in the context of a given ` Span ` . Note that the OpenTelemetry project documents certain [ " standard event names and keys " ] which have prescribed semantic meanings .
fn add_event_with_timestamp(
        &mut self,
        name: String,
        timestamp: SystemTime,
        mut attributes: Vec<KeyValue>,
    ) {
        let event_attributes_limit = self.span_limits.max_attributes_per_event as usize;
        self.with_data(|data| {
            let dropped_attributes_count = attributes.len().saturating_sub(event_attributes_limit);
            attributes.truncate(event_attributes_limit);
            data.events.push_back(Event::new(
                name,
                timestamp,
                attributes,
                dropped_attributes_count as u32,
            ))
        });
    }
fn add_event_with_timestamp ( & mut self , name : String , timestamp : SystemTime , mut attributes : Vec < KeyValue > , ) { let event_attributes_limit = self . span_limits . max_attributes_per_event as usize ; self . with_data ( | data | { let dropped_attributes_count = attributes . len ( ) . saturating_sub ( event_attributes_limit ) ; attributes . truncate ( event_attributes_limit ) ; data . events . push_back ( Event :: new ( name , timestamp , attributes , dropped_attributes_count as u32 , ) ) } ) ; }
Records events at a specific time in the context of a given `Span`.
Records events at a specific time in the context of a given ` Span ` .
&mut self
name
String
timestamp
SystemTime
attributes
Vec<KeyValue>
&mut self
name
String
timestamp
SystemTime
attributes
Vec<KeyValue>