Closed
Description
Versions
- Go: 1.23.5
- Refinery: 2.9.1
Steps to reproduce
- Run the refinery docker image
- Apply configuration using the DeterministicSampler with one or more Rules
- Send traces to the refinery instance
- Observe info level logs showing a logrus error "can not add field "reason""
Additional context
The logging library in use uses a map[string]interface{}
to build the fields for logging. The library performs a check on the data provided that it is not a function or a pointer to a function when calling the WithFields
method. In the snippet linked below, "reason"
is being set to the function td.KeptReason
whereas I believe the intention is to set to the return of the function, td.KeptReason()
.
Line 1017 in aa8e92a
The sirupsen/logrus
code performing the check can be found here.
https://github.com/sirupsen/logrus/blob/d1e6332644483cfee14de11099f03645561d55f8/entry.go#L125