Skip to content

structerr: Fix error metadata log field colliding with normal error

When the structerr.FieldsProducer is installed as a gRPC interceptor then we append error metadata part of the structerr error to the logrus fields. This is done by setting the "error.metadata" field, but this collides with the normal "error" field: if both are set they would override each other as we serialize logs into JSON.

Fix this by changing the metadata field to use "error_metadata" as key.

Changelog: fixed

Merge request reports