#include <userver/otlp/logs/component.hpp>
Component to configure logging via OTLP collector.
| Name | Description | Default value |
|---|---|---|
| endpoint | URI of otel collector (e.g. 127.0.0.1:4317). This endpoint is used both for logs and traces. If you want separate endpoints, then use below options. | - |
| logs-endpoint | URI of otel collector (gRPC). This endpoint is used only for logs. | - |
| tracing-endpoint | URI of otel collector (gRPC). This endpoint is used only for traces. | - |
| client-factory-name | Name of the grpc client factory | - |
| 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 exporterdefault: default logger from the logging componentboth: default logger and OTLP exporter Definition at line 47 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" |
| The default name of otlp::LoggerComponent. | |
|
inlinevirtualinherited |
Reimplemented in components::ComponentBase, and server::handlers::Restart.
Definition at line 49 of file raw_component_base.hpp.
|
inlinevirtualinherited |
Reimplemented in components::ComponentBase, components::Server, and urabbitmq::ConsumerComponentBase.
Definition at line 55 of file raw_component_base.hpp.
|
inlinevirtualinherited |
Reimplemented in components::ComponentBase, components::Server, server::handlers::Ping, and urabbitmq::ConsumerComponentBase.
Definition at line 53 of file raw_component_base.hpp.
|
inlinevirtualinherited |
Reimplemented in components::ComponentBase.
Definition at line 51 of file raw_component_base.hpp.