1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-26 10:44:51 +03:00

Better tracing spans

This commit is contained in:
Quentin Gliech
2023-01-04 16:02:42 +01:00
parent 09a567ab17
commit a7883618be
12 changed files with 101 additions and 24 deletions

View File

@@ -19,7 +19,7 @@ use mas_handlers::HttpClientFactory;
use mas_http::HttpServiceExt;
use tokio::io::AsyncWriteExt;
use tower::{Service, ServiceExt};
use tracing::info;
use tracing::{info, info_span};
use crate::util::policy_factory_from_config;
@@ -74,6 +74,7 @@ impl Options {
json: false,
url,
} => {
let _span = info_span!("cli.debug.http").entered();
let mut client = http_client_factory.client("cli-debug-http").await?;
let request = hyper::Request::builder()
.uri(url)
@@ -98,6 +99,7 @@ impl Options {
json: true,
url,
} => {
let _span = info_span!("cli.debug.http").entered();
let mut client = http_client_factory
.client("cli-debug-http")
.await?
@@ -122,6 +124,7 @@ impl Options {
}
SC::Policy => {
let _span = info_span!("cli.debug.policy").entered();
let config: PolicyConfig = root.load_config()?;
info!("Loading and compiling the policy module");
let policy_factory = policy_factory_from_config(&config).await?;