-
Notifications
You must be signed in to change notification settings - Fork 726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confusing EnvFilter
behavior
#1388
Comments
I have similar issue, I cannot make a filter such |
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. 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 Edit: I've hit a case where I wanted this feature now, so I'm a bit more invested. |
Issue tokio-rs#1388 Allow dynamic filters to override statis cones, thus enabling the possibility to have env filters like warn,pageserver=info,[{tenant=98d670ab7bee6f0051494306a1ab888f}]=error,[{tenant=19cbf2bf51f42a5a5a90aa8954fb3e42}]=debug
Based on tokio-rs#2095 Issue tokio-rs#1388 Allow dynamic filters to override statis cones, thus enabling the possibility to have env filters like warn,pageserver=info,[{tenant=98d670ab7bee6f0051494306a1ab888f}]=error,[{tenant=19cbf2bf51f42a5a5a90aa8954fb3e42}]=debug
Hi all, In my use case I have a system where I have both logs and tracing with tracing-opentelemetry. I set up different |
Anyone found a solution to this? It seems like #583 should have resolved this problem, but I'm still seeing the same behaviour even on the latest versions of |
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?The text was updated successfully, but these errors were encountered: