Skip to content
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

Rejection tracing not implemented for axum_extra::extract::Query #2526

Closed
goshleg opened this issue Jan 18, 2024 · 0 comments · Fixed by #2584
Closed

Rejection tracing not implemented for axum_extra::extract::Query #2526

goshleg opened this issue Jan 18, 2024 · 0 comments · Fixed by #2584

Comments

@goshleg
Copy link

goshleg commented Jan 18, 2024

Description:
Currently, the rejection tracing feature in axum (version 0.7.4) works well for all axum::extract::* types when using the env_filter feature. However, it seems that rejection tracing is not implemented for axum_extra::extract::Query.

Steps to Reproduce:

  1. Setup tracing_subscriber to enable rejection tracing:
   let subscriber = tracing_subscriber::fmt()
       .with_env_filter(
           tracing_subscriber::EnvFilter::from_default_env()
               .add_directive("axum::rejection=trace".parse().unwrap()),
       )
       .finish();

   tracing::subscriber::set_global_default(subscriber)
       .expect("Failed to set up tracing");
  1. Use axum_extra::extract::Query in your handler.
  2. Observe that rejections from axum_extra::extract::Query are not traced to the terminal.

Expected Behavior:
Rejections from axum_extra::extract::Query should be traced to the terminal when using the rejection tracing feature in axum.

Thank you for your attention to this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant