Skip to content

Commit

Permalink
info log
Browse files Browse the repository at this point in the history
  • Loading branch information
conradludgate committed Aug 10, 2023
1 parent 7013948 commit f4c797a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions proxy/src/console/provider/neon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use async_trait::async_trait;
use futures::TryFutureExt;
use tokio::time::Instant;
use tokio_postgres::config::SslMode;
use tracing::{error, info, info_span, trace, warn, Instrument};
use tracing::{error, info, info_span, warn, Instrument};

#[derive(Clone)]
pub struct Api {
Expand Down Expand Up @@ -48,7 +48,9 @@ impl Api {
.build()?;

info!(url = request.url().as_str(), "sending http request");
let start = Instant::now();
let response = self.endpoint.execute(request).await?;
info!(duration = ?start.elapsed(), "received http response");
let body = match parse_body::<GetRoleSecret>(response).await {
Ok(body) => body,
// Error 404 is special: it's ok not to have a secret.
Expand Down Expand Up @@ -91,7 +93,7 @@ impl Api {
info!(url = request.url().as_str(), "sending http request");
let start = Instant::now();
let response = self.endpoint.execute(request).await?;
trace!(duration = ?start.elapsed(), "received http response");
info!(duration = ?start.elapsed(), "received http response");
let body = parse_body::<WakeCompute>(response).await?;

// Unfortunately, ownership won't let us use `Option::ok_or` here.
Expand Down

0 comments on commit f4c797a

Please sign in to comment.