Open jshearer opened 3 years ago
I have similar issue, I cannot make a filter such info,[conn]=error
work, where conn
is the name of a span.
Maybe linked to #512 ?
Interesting discussion also #722, should this one be closed as duplicate ?
I thankfully don't need this, but I'm curious if this is fixable - it kinda seems like changing this block to return false if there's a matching directive with a lower level would solve the issue shown here. (the entire dynamics block is currently only run if the dynamics max level is high enough to enable something, that'd need to be changed as well)
I'm pretty sure that such a change would cause many issues though, I think defining which directive is the most specific one is harder than with static directives.
Also relevant to this issue: the Ord
impl of Directive
(here) is how "most specific directive" is defined.
Edit: I've hit a case where I wanted this feature now, so I'm a bit more invested. @hawkw: what's your gut feeling here, do you think it's possible to implement a "more specific dynamic filter is able to disable an event that would be enabled by a less specific static filter" feature? I've tried to start a naive implementation and see where it breaks, but I can't get it to work (PR)
Hi all,
In my use case I have a system where I have both logs and tracing with tracing-opentelemetry. I set up different EnvFilter
for the tracing and log layers. Every event/span related to specific user requests have a field myapp.request.id
attached, and while on tracing I want to have all the info
event/spans, on logging I want to be able to setup >= warn
level on user requests, as logs tends to be noisy there. So something like that [{myapp.request.id}]=warn,info
would do this trick.
Bug Report
Version
Platform
MacOS 11.2
Crates
Description
I'm encountering what I think is some weird behavior from
EnvFilter
.My goal is to disable all spans for the
/healthcheck
endpoint. By default, spans are captured for it:When I do the following filter using just the default level, plus a particular target, the results are as expected:
Now, reading the docs, I find that I should be able to specify particular fields in my span to match against. So I try, and get no apparent result:
I try various combinations, such as
info,[request{path=/healthcheck}]=warn
,info,[request{path=/healthcheck}]=off
,info,[{path=/healthcheck}]=off
,info,[{path=/healthcheck}]=warn
,info,[{path=\"/healthcheck\"}]=off
, and eveninfo,[{path}]=off
, with the same results.In order to check whether the filtering is working at all, I tried the inverse:
off,[{path=/healthcheck}]=info
, and indeed only got logs about the/healthcheck
endpoint:I suspect that somehow the
info
is taking priority over the second filter, and I can't figure out how to signify my intent of "ALL messages >=info
, EXCEPT those matching this filter". Any ideas?