-
Since EnvFilter is broken, I chose to use DynFilterFn to be able to direct events to different log files based on span values. Unfortunately I cannot find a way to read the field values of a span: DynFilterFn::new(|metadata, context| {
// metadata.fields(): only field names, no values.
// context.current_span(): only field names, no values.
// context.lookup_current(): seems to contain the data, but how to read a field?
}) |
Beta Was this translation helpful? Give feedback.
Answered by
mladedav
Jul 5, 2025
Replies: 1 comment
-
You can't do that, even the looked up context will not contain the data (unless a layer saved it inside an extension). If you want to filter based on values, you'll need to implement a custom |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
adiba
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can't do that, even the looked up context will not contain the data (unless a layer saved it inside an extension).
If you want to filter based on values, you'll need to implement a custom
Layer
.