|
PACS System 0.1.0
PACS DICOM system library
|
Represents a unit of work in distributed tracing. More...
#include <monitoring_adapter.h>

Classes | |
| class | impl |
Public Member Functions | |
| span (std::string_view operation_name) | |
| Construct a new span. | |
| ~span () | |
| Destructor - automatically finishes the span. | |
| span (const span &)=delete | |
| span & | operator= (const span &)=delete |
| span (span &&other) noexcept | |
| span & | operator= (span &&other) noexcept |
| void | set_tag (std::string_view key, std::string_view value) |
| Set a tag on the span. | |
| void | add_event (std::string_view name) |
| Add an event to the span. | |
| void | set_error (const std::exception &e) |
| Mark the span as an error. | |
| auto | trace_id () const -> std::string |
| Get the trace ID. | |
| auto | span_id () const -> std::string |
| Get the span ID. | |
| auto | is_valid () const noexcept -> bool |
| Check if span is valid (properly initialized) | |
Private Attributes | |
| std::unique_ptr< impl > | impl_ |
Represents a unit of work in distributed tracing.
A span tracks the execution of a single operation, recording timing, tags, and events. Spans are automatically finished when they go out of scope (RAII pattern).
Definition at line 274 of file monitoring_adapter.h.
|
explicit |
Construct a new span.
| operation_name | Name of the operation being traced |
Definition at line 117 of file monitoring_adapter.cpp.
|
default |
Destructor - automatically finishes the span.
|
delete |
|
defaultnoexcept |
| void kcenon::pacs::integration::monitoring_adapter::span::add_event | ( | std::string_view | name | ) |
Add an event to the span.
| name | Event name |
Definition at line 132 of file monitoring_adapter.cpp.
References name.
|
nodiscardnoexcept |
Check if span is valid (properly initialized)
Definition at line 158 of file monitoring_adapter.cpp.
References is_valid().
Referenced by is_valid().


|
defaultnoexcept |
| void kcenon::pacs::integration::monitoring_adapter::span::set_error | ( | const std::exception & | e | ) |
Mark the span as an error.
| e | The exception that occurred |
Definition at line 138 of file monitoring_adapter.cpp.
| void kcenon::pacs::integration::monitoring_adapter::span::set_tag | ( | std::string_view | key, |
| std::string_view | value ) |
Set a tag on the span.
| key | Tag name |
| value | Tag value |
Definition at line 126 of file monitoring_adapter.cpp.
|
nodiscard |
Get the span ID.
Definition at line 151 of file monitoring_adapter.cpp.
|
nodiscard |
Get the trace ID.
Definition at line 144 of file monitoring_adapter.cpp.
|
private |
Definition at line 334 of file monitoring_adapter.h.