#include <userver/logging/telemetry_settings.hpp>
Settings for one logger. Default values impose no additional restrictions.
Definition at line 15 of file telemetry_settings.hpp.
Public Member Functions | |
| TelemetrySettings | Merge (const TelemetrySettings &other) const |
| void | Validate () const |
| bool | operator== (const TelemetrySettings &) const =default |
| Compares all settings. | |
Public Attributes | |
| Level | min_log_level {Level::kTrace} |
| Minimum severity, combined with the logger's level captured at registration. | |
| double | log_sample_rate {1.0} |
| Fraction of logs below warning to retain, in [0, 1]; excludes spans and force-enabled logs. | |
|
nodiscard |
Returns the higher minimum level and lower sampling rate without modifying either input. Both inputs must satisfy logging::TelemetrySettings::Validate.
| void logging::TelemetrySettings::Validate | ( | ) | const |
| std::runtime_error | if the sampling rate is non-finite or outside [0, 1]. |
| double logging::TelemetrySettings::log_sample_rate {1.0} |
Fraction of logs below warning to retain, in [0, 1]; excludes spans and force-enabled logs.
Definition at line 19 of file telemetry_settings.hpp.
| Level logging::TelemetrySettings::min_log_level {Level::kTrace} |
Minimum severity, combined with the logger's level captured at registration.
Definition at line 17 of file telemetry_settings.hpp.