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::Constantsdebug
maps to "LOG_LEVEL_DEBUG" in OpenTelemetry::Constantsinfo
andnotice
map to "LOG_LEVEL_INFO" in OpenTelemetry::Constantswarning
maps to "LOG_LEVEL_WARN" in OpenTelemetry::Constantserror
maps to "LOG_LEVEL_ERROR" in OpenTelemetry::Constantscritical
,alert
, andemergency
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.