userver: tracing::SpanEvent Struct Reference
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
tracing::SpanEvent Struct Referencefinal

Your opinion will help to improve our service

Leave a feedback >

#include <userver/tracing/span_event.hpp>

Detailed Description

Public Types

using Timestamp = std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds>
 
using KeyValue = std::unordered_map<std::string, AnyValue>
 

Public Member Functions

 SpanEvent (std::string_view name)
 Constructor. Creates span event with name and timestamp.
 
 SpanEvent (std::string_view name, KeyValue attributes)
 Constructor. Creates span event with name, timestamp and attributes.
 

Public Attributes

std::string name
 Event name.
 
Timestamp timestamp {}
 Event timestamp.
 
KeyValue attributes
 Attributes.
 

Member Typedef Documentation

◆ KeyValue

using tracing::SpanEvent::KeyValue = std::unordered_map<std::string, AnyValue>

Definition at line 23 of file span_event.hpp.

◆ Timestamp

using tracing::SpanEvent::Timestamp = std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds>

Definition at line 22 of file span_event.hpp.

Constructor & Destructor Documentation

◆ SpanEvent() [1/2]

tracing::SpanEvent::SpanEvent ( std::string_view name)
explicit

Constructor. Creates span event with name and timestamp.

Parameters
nameEvent name.

◆ SpanEvent() [2/2]

tracing::SpanEvent::SpanEvent ( std::string_view name,
KeyValue attributes )

Constructor. Creates span event with name, timestamp and attributes.

Parameters
nameEvent name.
attributesKey-value attributes.

Member Data Documentation

◆ attributes

◆ name

std::string tracing::SpanEvent::name

Event name.

Definition at line 35 of file span_event.hpp.

◆ timestamp

Timestamp tracing::SpanEvent::timestamp {}

Event timestamp.

Definition at line 38 of file span_event.hpp.


The documentation for this struct was generated from the following file: