OpenTelemetry PHP

PsrSeverityMapperInterface

Table of Contents

Constants

RFC_CODE  = [ // Detailed debug information. \Psr\Log\LogLevel::DEBUG => 7, // Interesting events. Examples: User logs in, SQL logs. \Psr\Log\LogLevel::INFO => 6, // Normal but significant events. \Psr\Log\LogLevel::NOTICE => 5, // Exceptional occurrences that are not errors. Examples: Use of deprecated APIs, poor use of an API, // undesirable things that are not necessarily wrong. \Psr\Log\LogLevel::WARNING => 4, // Runtime errors that do not require immediate action but should typically be logged and monitored. \Psr\Log\LogLevel::ERROR => 3, // Critical conditions. Example: Application component unavailable, unexpected exception. \Psr\Log\LogLevel::CRITICAL => 2, // Action must be taken immediately. Example: Entire website down, database unavailable, etc. // This should trigger the alerts and wake you up. \Psr\Log\LogLevel::ALERT => 1, // Emergency: system is unusable. \Psr\Log\LogLevel::EMERGENCY => 0, ]
Severity code according to rfc5424 (Syslog Protocol)
SEVERITY_NUMBER  = [\Psr\Log\LogLevel::DEBUG => 5, \Psr\Log\LogLevel::INFO => 9, \Psr\Log\LogLevel::NOTICE => 10, \Psr\Log\LogLevel::WARNING => 13, \Psr\Log\LogLevel::ERROR => 17, \Psr\Log\LogLevel::CRITICAL => 18, \Psr\Log\LogLevel::ALERT => 21, \Psr\Log\LogLevel::EMERGENCY => 22]
Mappig of OpenTelemetry SeverityNumber to PsrLogLevel.

Constants

RFC_CODE

Severity code according to rfc5424 (Syslog Protocol)

public mixed RFC_CODE = [ // Detailed debug information. \Psr\Log\LogLevel::DEBUG => 7, // Interesting events. Examples: User logs in, SQL logs. \Psr\Log\LogLevel::INFO => 6, // Normal but significant events. \Psr\Log\LogLevel::NOTICE => 5, // Exceptional occurrences that are not errors. Examples: Use of deprecated APIs, poor use of an API, // undesirable things that are not necessarily wrong. \Psr\Log\LogLevel::WARNING => 4, // Runtime errors that do not require immediate action but should typically be logged and monitored. \Psr\Log\LogLevel::ERROR => 3, // Critical conditions. Example: Application component unavailable, unexpected exception. \Psr\Log\LogLevel::CRITICAL => 2, // Action must be taken immediately. Example: Entire website down, database unavailable, etc. // This should trigger the alerts and wake you up. \Psr\Log\LogLevel::ALERT => 1, // Emergency: system is unusable. \Psr\Log\LogLevel::EMERGENCY => 0, ]
Tags
see

: https://datatracker.ietf.org/doc/html/rfc5424#page-10

SEVERITY_NUMBER

Mappig of OpenTelemetry SeverityNumber to PsrLogLevel.

public mixed SEVERITY_NUMBER = [\Psr\Log\LogLevel::DEBUG => 5, \Psr\Log\LogLevel::INFO => 9, \Psr\Log\LogLevel::NOTICE => 10, \Psr\Log\LogLevel::WARNING => 13, \Psr\Log\LogLevel::ERROR => 17, \Psr\Log\LogLevel::CRITICAL => 18, \Psr\Log\LogLevel::ALERT => 21, \Psr\Log\LogLevel::EMERGENCY => 22]
Tags
see:

https://github.com/open-telemetry/opentelemetry-specification/blob/v1.7.0/specification/logs/data-model.md#field-severitynumber


        
On this page

Search results