NAME

Log::Any::Adapter::OpenTelemetry - Send Log::Any logs to OpenTelemetry

SYNOPSIS

use Log::Any::Adapter 'OpenTelemetry';

DESCRIPTION

This Log::Any plugin configures your logger to generate OpenTelemetry log data using the configured OpenTelemetry::Logs::LoggerProvider.

Log::Any log levels are mapped to OpenTelemetry log levels as follows:

trace maps to "LOG_LEVEL_TRACE" in OpenTelemetry::Constants
debug maps to "LOG_LEVEL_DEBUG" in OpenTelemetry::Constants
info and notice map to "LOG_LEVEL_INFO" in OpenTelemetry::Constants
warning maps to "LOG_LEVEL_WARN" in OpenTelemetry::Constants
error maps to "LOG_LEVEL_ERROR" in OpenTelemetry::Constants
critical, alert, and emergency map to "LOG_LEVEL_FATAL" in OpenTelemetry::Constants

When determining whether a log level is enabled or not, the value of OTEL_LOG_LEVEL will be read from the environment, or that of PERL_OTEL_LOG_LEVEL if the former is not set. If neither is set, or if that variable is set to an unknown value, the default value will be "info".

ACKNOWLEDGEMENTS

Special thanks to CV-Library Ltd. for their support in the development of this library.

COPYRIGHT AND LICENSE

This software is copyright (c) 2023 by José Joaquín Atria.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.