Skip to content

Reduce logging cardinality of OTLP logger output

Currently, we write the output of the opentelemetry-cpp logger to the message field in our logs. However, it turns out that these messages are extremely high in their cardinality (in includes e.g. the time of the message), which means that filtering on the message field is essentially impossible.

To mitigate this, I will replace the message field by our own custom message. The OTLP log output will be put in a separate log field otlpMessage. Additionally, I will look to see if it is possible to add the attributes as extra log parameters.