Skip to content

Log KeyValue Kind: KindError #5909

Open
@Jesse0Michael

Description

Problem Statement

I am trying to write a custom Log Record Processor that will look at the record attributes for a KeyValue containing an error, and, if the record severity >= Error and it found an error Value that matches criteria included when configuring the processor, downgrade the severity to a Warn.

This is something I've done in other logging solutions with hooks or handlers. But I'm unable to write an otel Log Processor because there is no way to pull the error that was used as a log attribute, because the error value is converted to a string.
example: If the error is a context.Canceled, downgrade the severity of the log to a Warn

Proposed Solution

Would it be alright to add a new KindError to the log KeyValue Kinds

With supported func Error(key string, value error) KeyValue and func ErrorValue(v error) Value and func (v Value) AsError() error functions.

Metadata

Assignees

No one assigned

    Labels

    blocked:specificationWaiting on clarification of the OpenTelemetry specification before progress can be madeenhancementNew feature or requestresponse neededWaiting on user input before progress can be made

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions