sologger_log_transport

Crates.iosologger_log_transport
lib.rssologger_log_transport
version0.2.0
sourcesrc
created_at2023-10-11 14:13:53.058466
updated_at2024-10-13 17:51:41.402672
descriptionProvides support for both LogStash and OpenTelemetry exports for logs.
homepage
repositoryhttps://github.com/brytelands/sologger
max_upload_size
id1000339
size15,159
Will Kennedy (wkennedy)

documentation

README

sologger-log-transport

Overview

This is a library that provides support for both LogStash and OpenTelemetry exports for logs.

Usage

The two features available in this crate are logstash and otel. Both are possible to use at the same time, but it is not recommended. Specifying either logstash or otel is suggested, depending on your needs.

LogStash

init_logstash_logger(&"./tests/configs/logstash_config.json".to_string());

Logstash support is provided by logstash-rs and log4rs-logstash. The logstash appender utilizes log4rs which also provides the ability to log to files and stdout, which provider further flexibility. More information on log4rs configuration can be found here: https://docs.rs/log4rs/latest/src/log4rs/config/raw.rs.html

OpenTelemetry

init_logs_opentelemetry_with_config_path(&"./tests/configs/opentelemetry-config.json".to_string());

OpenTelemetry support is provided by OpenTelemetry. Currently, tracer and metrics functionality are not supported. Using the OpenTelemetry exporter will result in logs being sent to the configured endpoint, such as Signoz or Vector For a list of all available configuration options, see the OpenTelemetry Semantic Conventions

Commit count: 44

cargo fmt