Database System 0.1.0
Advanced C++20 Database System with Multi-Backend Support
Loading...
Searching...
No Matches
monitoring_adapter.h File Reference

Database monitoring adapter with runtime backend selection. More...

#include "../core/configuration.h"
#include <chrono>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <string>
#include <unordered_map>
#include "../core/common_result.h"
#include "backends/monitoring_backend.h"
Include dependency graph for monitoring_adapter.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  database::integrated::adapters::database_metrics
 Database-specific metrics structure. More...
 
class  database::integrated::adapters::monitoring_adapter
 Monitoring adapter for database operations. More...
 

Namespaces

namespace  database
 
namespace  database::integrated
 
namespace  database::integrated::adapters
 
namespace  database::integrated::adapters::backends
 

Enumerations

enum class  database::integrated::adapters::monitoring_backend_type { database::integrated::adapters::auto_select , database::integrated::adapters::system , database::integrated::adapters::fallback , database::integrated::adapters::null }
 Monitoring backend type selection. More...
 

Detailed Description

Database monitoring adapter with runtime backend selection.

This adapter provides unified monitoring interface for database operations using the backend pattern for runtime polymorphism.

Available backends:

  • fallback_monitoring_backend: Uses internal metrics storage (default)
  • null_monitoring_backend: No-op backend for disabling monitoring

Features:

  • Connection pool metrics (active, idle, usage percentage)
  • Query performance tracking (latency, throughput, success rate)
  • Transaction monitoring (commits, rollbacks, active transactions)
  • Health checks and alerting
  • Prometheus-compatible metrics export
  • Runtime backend selection (no conditional compilation)

Definition in file monitoring_adapter.h.