Analytics singleton — thread-safe event logging.
More...
#include <analytics.hpp>
|
| void | add_destination (std::unique_ptr< AnalyticsDestination > dest) |
| | Add a destination.
|
| void | log_event (std::string_view name, const std::map< std::string, std::string > &properties={}) |
| | Log an event with properties.
|
| void | log (std::string_view name) |
| | Log a simple event (name only).
|
| void | flush () |
| | Flush all destinations.
|
| void | set_enabled (bool enabled) |
| | Enable/disable analytics.
|
| bool | is_enabled () const |
| uint64_t | event_count () const |
| | Number of events logged since creation.
|
Analytics singleton — thread-safe event logging.
◆ add_destination()
◆ event_count()
| uint64_t pulp::runtime::Analytics::event_count |
( |
| ) |
const |
|
inline |
Number of events logged since creation.
◆ flush()
| void pulp::runtime::Analytics::flush |
( |
| ) |
|
◆ instance()
| Analytics & pulp::runtime::Analytics::instance |
( |
| ) |
|
|
static |
◆ is_enabled()
| bool pulp::runtime::Analytics::is_enabled |
( |
| ) |
const |
|
inline |
◆ log()
| void pulp::runtime::Analytics::log |
( |
std::string_view | name | ) |
|
Log a simple event (name only).
◆ log_event()
| void pulp::runtime::Analytics::log_event |
( |
std::string_view | name, |
|
|
const std::map< std::string, std::string > & | properties = {} ) |
Log an event with properties.
◆ set_enabled()
| void pulp::runtime::Analytics::set_enabled |
( |
bool | enabled | ) |
|
|
inline |
Enable/disable analytics.
The documentation for this class was generated from the following file:
- /home/runner/work/pulp/pulp/core/runtime/include/pulp/runtime/analytics.hpp