userver: userver/tracing/tracer.hpp File Reference
Loading...
Searching...
No Matches
tracer.hpp File Reference

Detailed Description

Tracing configuration for span logging suppression.

Definition in file tracer.hpp.

Go to the source code of this file.

#include <optional>
#include <string>
#include <string_view>
#include <dynamic_config/variables/USERVER_NO_LOG_SPANS.hpp>
#include <userver/logging/level.hpp>
This graph shows which files directly or indirectly include this file:

Classes

class  tracing::TracingStateGuard

Namespaces

namespace  tracing
 Distributed tracing helpers and identifiers.

Typedefs

using tracing::NoLogSpans = ::dynamic_config::userver_no_log_spans::VariableType

Functions

void tracing::SetNoLogSpans (NoLogSpans &&spans)
 Sets the global configuration for disabling logging some of the tracing::Span.
bool tracing::IsNoLogSpan (const std::string &name)
 Returns true iff the tracing::Span with name is not logged.
void tracing::SetSpanLogLevel (std::optional< logging::Level > log_level) noexcept
std::optional< logging::Level > tracing::GetSpanLogLevel () noexcept
void tracing::SetTraceSamplingProbability (std::optional< double > probability) noexcept
 Sets the probability with which traces are sampled. Intended for service degradation under high load. Passing std::nullopt disables the sampling (all traces are sampled), values are clamped to [0.0, 1.0] and rounded down to a multiple of 2^-64. NaN disables sampling.
std::optional< double > tracing::GetTraceSamplingProbability () noexcept
 Returns the current trace sampling probability, std::nullopt means the sampling is disabled.