Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions twilight-http-ratelimiting/src/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ pub async fn runner(
{
match req.notifier.send(tx) {
Ok(()) => {
tracing::debug!(path = req.endpoint.path, "permitted");
tracing::debug!(
method = req.endpoint.method.name(),
path = req.endpoint.path,
"permitted",
);
if !req.endpoint.is_interaction() {
on_global!();
}
Expand Down Expand Up @@ -205,7 +209,7 @@ pub async fn runner(
}
}
Some(Ok((endpoint, headers))) = in_flight.join_next() => {
let _span = tracing::info_span!("resp", ?endpoint).entered();
let _span = tracing::info_span!("response", method = endpoint.method.name(), path = endpoint.path).entered();
if let Ok(Some(headers)) = headers {
tracing::trace!(?headers);

Expand Down Expand Up @@ -325,7 +329,11 @@ pub async fn runner(
} else {
let (tx, rx) = oneshot::channel();
if msg.notifier.send(tx).is_ok() {
tracing::debug!(path = msg.endpoint.path, "permitted");
tracing::debug!(
method = msg.endpoint.method.name(),
path = msg.endpoint.path,
"permitted",
);
if !msg.endpoint.is_interaction() {
on_global!();
}
Expand Down
2 changes: 1 addition & 1 deletion twilight-http/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2997,7 +2997,7 @@ impl Client {
self.http.clone(),
invalid_token,
http_request,
tracing::info_span!("req", method = method.name(), url = url),
tracing::info_span!("request", method = method.name(), path),
self.timeout,
self.ratelimiter.clone(),
Endpoint { method, path },
Expand Down