StormByte-Database 2.0.0
C++26 database module of the StormByte suite
 
Loading...
Searching...
No Matches
telemetry.hxx
Go to the documentation of this file.
1/*
2 * Copyright (C) 2024-2026 David C. Manuelda (StormBytePP)
3 *
4 * This file is part of StormByte-Database.
5 *
6 * SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-StormByte-Commercial
7 */
8
9#pragma once
10
12
13#include <atomic>
14
19namespace StormByte {
24 namespace Database {
29 namespace MSSQL {
30 class MSSQL;
31 class PreparedSTMT;
32
38 public:
40 Telemetry() noexcept;
42 ~Telemetry() noexcept override;
44 std::uint64_t Errors() const noexcept;
46 operator StormByte::Safe::String() const override;
47 private:
48 friend class MSSQL;
49 friend class PreparedSTMT;
51 void RecordError() noexcept;
52 void RecordEvent(BackendEvent event) noexcept override;
53 std::atomic<std::uint64_t> m_errors{0};
54 };
55 }
56 }
57}
Microsoft SQL Server backend.
Definition mssql.hxx:43
A logical SQL statement executed through sp_executesql RPC.
Definition prepared_stmt.hxx:39
SQL Server-specific counters layered on common database telemetry.
Definition telemetry.hxx:37
Telemetry() noexcept
Construct zeroed SQL Server counters.
Thread-safe cumulative telemetry for one database connection.
Definition telemetry.hxx:98
BackendEvent
Shared error and warning categories for backend-specific telemetry.
Definition telemetry.hxx:56
Root namespace of the StormByte C++ suite.
STL namespace.
#define STORMBYTE_DATABASE_PUBLIC
Definition visibility.h:54