misc tracing span tweaks
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
5fc8e90e02
commit
aba88ccead
16 changed files with 96 additions and 24 deletions
|
@ -150,8 +150,8 @@ fn cors_layer(_server: &Server) -> CorsLayer {
|
|||
|
||||
fn body_limit_layer(server: &Server) -> DefaultBodyLimit { DefaultBodyLimit::max(server.config.max_request_size) }
|
||||
|
||||
#[tracing::instrument(name = "panic", level = "error", skip_all)]
|
||||
#[allow(clippy::needless_pass_by_value)]
|
||||
#[tracing::instrument(skip_all, name = "panic")]
|
||||
fn catch_panic(err: Box<dyn Any + Send + 'static>) -> http::Response<http_body_util::Full<bytes::Bytes>> {
|
||||
//TODO: XXX
|
||||
/*
|
||||
|
@ -197,7 +197,7 @@ fn tracing_span<T>(request: &http::Request<T>) -> tracing::Span {
|
|||
|
||||
let method = request.method();
|
||||
|
||||
tracing::info_span!("router:", %method, %path)
|
||||
tracing::debug_span!(parent: None, "router", %method, %path)
|
||||
}
|
||||
|
||||
fn truncated_matched_path(path: &MatchedPath) -> &str {
|
||||
|
|
|
@ -8,7 +8,11 @@ use conduit::{debug, debug_error, debug_warn, defer, err, error, trace, Result};
|
|||
use conduit_service::Services;
|
||||
use http::{Method, StatusCode, Uri};
|
||||
|
||||
#[tracing::instrument(skip_all, level = "debug")]
|
||||
#[tracing::instrument(
|
||||
parent = None,
|
||||
level = "trace",
|
||||
skip_all,
|
||||
)]
|
||||
pub(crate) async fn spawn(
|
||||
State(services): State<Arc<Services>>, req: http::Request<axum::body::Body>, next: axum::middleware::Next,
|
||||
) -> Result<Response, StatusCode> {
|
||||
|
@ -34,7 +38,7 @@ pub(crate) async fn spawn(
|
|||
task.await.map_err(|_| StatusCode::INTERNAL_SERVER_ERROR)
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip_all, name = "handle")]
|
||||
#[tracing::instrument(level = "debug", skip_all)]
|
||||
pub(crate) async fn handle(
|
||||
State(services): State<Arc<Services>>, req: http::Request<axum::body::Body>, next: axum::middleware::Next,
|
||||
) -> Result<Response, StatusCode> {
|
||||
|
|
|
@ -30,7 +30,7 @@ type MakeService = IntoMakeServiceWithConnectInfo<Router, net::SocketAddr>;
|
|||
const NULL_ADDR: net::SocketAddr = net::SocketAddr::new(IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)), 0);
|
||||
const FINI_POLL_INTERVAL: Duration = Duration::from_millis(750);
|
||||
|
||||
#[tracing::instrument(skip_all)]
|
||||
#[tracing::instrument(skip_all, level = "debug")]
|
||||
pub(super) async fn serve(server: &Arc<Server>, app: Router, mut shutdown: broadcast::Receiver<()>) -> Result<()> {
|
||||
let mut tasks = JoinSet::<()>::new();
|
||||
let executor = TokioExecutor::new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue