|
Logger System 0.1.3
High-performance C++20 thread-safe logging system with asynchronous capabilities
|
Configuration for OTLP writer. More...
#include <otlp_writer.h>

Public Attributes | |
| std::string | endpoint = "http://localhost:4318/v1/logs" |
| OTLP endpoint URL. | |
| protocol_type | protocol = protocol_type::http |
| Transport protocol (HTTP or gRPC) | |
| std::chrono::milliseconds | timeout {5000} |
| Connection timeout. | |
| bool | use_tls = false |
| Use TLS for connection. | |
| std::string | service_name |
| Service name (required for resource attributes) | |
| std::string | service_version |
| Service version. | |
| std::string | service_namespace |
| Service namespace. | |
| std::string | service_instance_id |
| Service instance ID. | |
| std::unordered_map< std::string, std::string > | resource_attributes |
| Custom resource attributes. | |
| std::size_t | max_batch_size = 512 |
| Maximum batch size before forced flush. | |
| std::chrono::milliseconds | flush_interval {5000} |
| Maximum time to wait before flushing batch. | |
| std::size_t | max_queue_size = 10000 |
| Maximum queue size (logs dropped if exceeded) | |
| std::size_t | max_retries = 3 |
| Number of retry attempts on failure. | |
| std::chrono::milliseconds | retry_delay {100} |
| Initial retry delay (doubled on each retry) | |
| std::unordered_map< std::string, std::string > | headers |
| HTTP headers for authentication. | |
Configuration for OTLP writer.
Definition at line 89 of file otlp_writer.h.
| std::string kcenon::logger::otlp_writer::config::endpoint = "http://localhost:4318/v1/logs" |
OTLP endpoint URL.
For HTTP: http://host:4318/v1/logs For gRPC: host:4317
Definition at line 96 of file otlp_writer.h.
| std::chrono::milliseconds kcenon::logger::otlp_writer::config::flush_interval {5000} |
Maximum time to wait before flushing batch.
Definition at line 146 of file otlp_writer.h.
Referenced by kcenon::logger::otlp_writer::export_thread_func().
| std::unordered_map<std::string, std::string> kcenon::logger::otlp_writer::config::headers |
HTTP headers for authentication.
Definition at line 166 of file otlp_writer.h.
| std::size_t kcenon::logger::otlp_writer::config::max_batch_size = 512 |
Maximum batch size before forced flush.
Definition at line 141 of file otlp_writer.h.
Referenced by kcenon::logger::otlp_writer::export_thread_func(), and kcenon::logger::otlp_writer::write().
| std::size_t kcenon::logger::otlp_writer::config::max_queue_size = 10000 |
Maximum queue size (logs dropped if exceeded)
Definition at line 151 of file otlp_writer.h.
Referenced by kcenon::logger::otlp_writer::write().
| std::size_t kcenon::logger::otlp_writer::config::max_retries = 3 |
Number of retry attempts on failure.
Definition at line 156 of file otlp_writer.h.
Referenced by kcenon::logger::otlp_writer::export_batch().
| protocol_type kcenon::logger::otlp_writer::config::protocol = protocol_type::http |
Transport protocol (HTTP or gRPC)
Definition at line 101 of file otlp_writer.h.
| std::unordered_map<std::string, std::string> kcenon::logger::otlp_writer::config::resource_attributes |
Custom resource attributes.
Definition at line 136 of file otlp_writer.h.
| std::chrono::milliseconds kcenon::logger::otlp_writer::config::retry_delay {100} |
Initial retry delay (doubled on each retry)
Definition at line 161 of file otlp_writer.h.
Referenced by kcenon::logger::otlp_writer::export_batch().
| std::string kcenon::logger::otlp_writer::config::service_instance_id |
Service instance ID.
Definition at line 131 of file otlp_writer.h.
| std::string kcenon::logger::otlp_writer::config::service_name |
Service name (required for resource attributes)
Definition at line 116 of file otlp_writer.h.
Referenced by kcenon::logger::otlp_writer::export_with_http().
| std::string kcenon::logger::otlp_writer::config::service_namespace |
Service namespace.
Definition at line 126 of file otlp_writer.h.
| std::string kcenon::logger::otlp_writer::config::service_version |
Service version.
Definition at line 121 of file otlp_writer.h.
| std::chrono::milliseconds kcenon::logger::otlp_writer::config::timeout {5000} |
| bool kcenon::logger::otlp_writer::config::use_tls = false |
Use TLS for connection.
Definition at line 111 of file otlp_writer.h.