userver: otlp::LoggerComponent Class Reference
Loading...
Searching...
No Matches
otlp::LoggerComponent Class Referencefinal

#include <userver/otlp/logs/component.hpp>

Detailed Description

Component to configure logging via OTLP collector.

Static options:

Name Description Default value
endpoint URI of otel collector (e.g. 127.0.0.1:4317) -
max-queue-size Maximum async queue size 65535
max-batch-delay Maximum batch delay 100ms
service-name Service name unknown_service
attributes Extra attributes for OTLP, object of key/value strings -
sinks List of sinks -

sinks.logs | sink for logs (default|otlp|both) | otlp sinks.tracing | sink for tracing (default|otlp|both) | otlp

Possible sink values:

  • otlp: OTLP exporter
  • default: default logger from the logging component
  • both: default logger and OTLP exporter

Definition at line 44 of file component.hpp.

+ Inheritance diagram for otlp::LoggerComponent:

Public Member Functions

 LoggerComponent (const components::ComponentConfig &, const components::ComponentContext &)
 
virtual ComponentHealth GetComponentHealth () const
 
virtual void OnLoadingCancelled ()
 
virtual void OnAllComponentsLoaded ()
 
virtual void OnAllComponentsAreStopping ()
 

Static Public Member Functions

static yaml_config::Schema GetStaticConfigSchema ()
 

Static Public Attributes

static constexpr std::string_view kName = "otlp-logger"
 

Member Function Documentation

◆ GetComponentHealth()

virtual ComponentHealth components::RawComponentBase::GetComponentHealth ( ) const
inlinevirtualinherited

Reimplemented in components::ComponentBase, and server::handlers::Restart.

Definition at line 49 of file raw_component_base.hpp.

◆ OnAllComponentsAreStopping()

virtual void components::RawComponentBase::OnAllComponentsAreStopping ( )
inlinevirtualinherited

◆ OnAllComponentsLoaded()

virtual void components::RawComponentBase::OnAllComponentsLoaded ( )
inlinevirtualinherited

◆ OnLoadingCancelled()

virtual void components::RawComponentBase::OnLoadingCancelled ( )
inlinevirtualinherited

Reimplemented in components::ComponentBase.

Definition at line 51 of file raw_component_base.hpp.

Member Data Documentation

◆ kName

constexpr std::string_view otlp::LoggerComponent::kName = "otlp-logger"
staticconstexpr

Definition at line 46 of file component.hpp.


The documentation for this class was generated from the following file: