Class LogMetricsProcessor
This OpenTelemetry processor maintains the labeled neonsdk_log_events_total metrics counter by incrementing the counter whenever events are logged, using the event's LogLevel as the counter label.
note
NeonService based applications configure this processor by default.
Namespace: Neon.Service
Assembly: Neon.Service.dll
Syntax
public class LogMetricsProcessor : BaseProcessor<LogRecord>
Remarks
This is useful for screening for services that may be logging too many warnings or errors, requiring further investigation.
This is very easy to use. Simply call AddLogMetricsProcessor(OpenTelemetryLoggerOptions).
Constructors
LogMetricsProcessor()
Constructs a processor that counts logged events by LogLevel.
Declaration
public LogMetricsProcessor()
Methods
OnEnd(LogRecord)
Handles the event counting.
Declaration
public override void OnEnd(LogRecord logRecord)
Parameters
Type | Name | Description |
---|---|---|
LogRecord | logRecord | The log record. |
Overrides
OpenTelemetry.BaseProcessor<OpenTelemetry.Logs.LogRecord>.OnEnd(OpenTelemetry.Logs.LogRecord)