Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
pulp::runtime::Analytics Class Reference

Analytics singleton — thread-safe event logging. More...

#include <analytics.hpp>

Public Member Functions

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.

Static Public Member Functions

static Analytics & instance ()

Detailed Description

Analytics singleton — thread-safe event logging.

Member Function Documentation

◆ add_destination()

void pulp::runtime::Analytics::add_destination ( std::unique_ptr< AnalyticsDestination > dest)

Add a destination.

◆ event_count()

uint64_t pulp::runtime::Analytics::event_count ( ) const
inline

Number of events logged since creation.

◆ flush()

void pulp::runtime::Analytics::flush ( )

Flush all destinations.

◆ 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