Thread-safe cumulative telemetry for one database connection.
More...
#include <StormByte/database/telemetry.hxx>
Thread-safe cumulative telemetry for one database connection.
The owning Database exposes a StormByte::Shared handle. Callers may retain that handle after disconnect or Database destruction. Counters are snapshots and do not expose SQL text or bound values.
◆ ~Telemetry()
| virtual StormByte::Database::Telemetry::~Telemetry |
( |
| ) |
|
|
virtualnoexcept |
◆ Telemetry() [1/3]
| StormByte::Database::Telemetry::Telemetry |
( |
| ) |
|
|
noexcept |
Construct zeroed counters.
◆ Telemetry() [2/3]
| StormByte::Database::Telemetry::Telemetry |
( |
const Telemetry & |
| ) |
|
|
protecteddelete |
Copying counters is disabled.
◆ Telemetry() [3/3]
| StormByte::Database::Telemetry::Telemetry |
( |
Telemetry && |
| ) |
|
|
protecteddelete |
Moving counters is disabled.
◆ Events()
| std::uint64_t StormByte::Database::Telemetry::Events |
( |
BackendEvent |
event | ) |
const |
|
noexcept |
Number of backend events in a shared category.
- Parameters
-
| event | Backend event category. |
- Returns
- Cumulative event count.
◆ Metrics()
Obtain a thread-safe metrics snapshot for an operation.
- Parameters
-
| operation | Operation category. |
- Returns
- Attempts, outcomes, and latency aggregates.
◆ operator std::string()
Flatten counters into a caller-owned standard string.
- Returns
- Human-readable telemetry snapshot.
◆ operator StormByte::String::String()
◆ operator=() [1/2]
Copy assignment is disabled.
◆ operator=() [2/2]
Move assignment is disabled.
◆ RecordEvent()
| virtual void StormByte::Database::Telemetry::RecordEvent |
( |
BackendEvent |
event | ) |
|
|
protectedvirtualnoexcept |
@brief Record a categorized backend event.
- Parameters
-
◆ RecordEvents()
| void StormByte::Database::Telemetry::RecordEvents |
( |
BackendEvent |
event, |
|
|
std::uint64_t |
count |
|
) |
| |
|
protectednoexcept |
Add a known number of occurrences for one backend event.
- Parameters
-
| event | Event category. |
| count | Number of occurrences. |
◆ RowsReturned()
| std::uint64_t StormByte::Database::Telemetry::RowsReturned |
( |
| ) |
const |
|
noexcept |
Total rows successfully returned by Query and prepared statements.
- Returns
- Cumulative row count.
◆ Database
◆ OperationScope
◆ PreparedSTMT
The documentation for this class was generated from the following file: