Skip to content

Commit 06caa7c

Browse files
committed
feat: more instrumentation
1 parent c66501e commit 06caa7c

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

crates/auth-domain/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ impl AuthDomainService {
5050
}
5151

5252
/// Sign up a [`User`].
53+
#[tracing::instrument(skip(self))]
5354
pub async fn user_signup(
5455
&self,
5556
name: HumanName,
@@ -129,6 +130,7 @@ impl AuthDomainService {
129130
}
130131

131132
/// Authenticate a [`User`].
133+
#[tracing::instrument(skip(self))]
132134
pub async fn user_authenticate(
133135
&self,
134136
email: EmailAddress,
@@ -181,6 +183,7 @@ impl AuthnBackend for AuthDomainService {
181183
type Error = errors::AuthenticationError;
182184
type User = AuthUser;
183185

186+
#[tracing::instrument(skip(self))]
184187
async fn authenticate(
185188
&self,
186189
creds: Self::Credentials,
@@ -191,6 +194,7 @@ impl AuthnBackend for AuthDomainService {
191194
.map(|u| u.map(Into::into))
192195
}
193196

197+
#[tracing::instrument(skip(self))]
194198
async fn get_user(
195199
&self,
196200
id: &<Self::User as AxumLoginAuthUser>::Id,

crates/domain/src/upload/execute.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ use models::{
88
model::Model,
99
};
1010
use serde::{Deserialize, Serialize};
11+
use tracing::{Instrument, info_span};
1112

1213
use super::plan::UploadPlan;
1314
use crate::DomainService;
@@ -52,6 +53,7 @@ impl DomainService {
5253
let big_terrible_buffer = plan
5354
.nar_contents
5455
.collect()
56+
.instrument(info_span!("collect_big_terrible_buffer"))
5557
.await
5658
.map_err(UploadExecutionError::InputDataError)?;
5759

crates/grid/src/endpoints/upload.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ pub async fn upload(
5050
body
5151
.into_data_stream()
5252
.map(|res| res.map_err(|e| io::Error::other(e.to_string()))),
53-
Some(belt::DEFAULT_CHUNK_SIZE),
53+
// Some(belt::DEFAULT_CHUNK_SIZE),
54+
None,
5455
);
5556

5657
let upload_req = UploadRequest {

0 commit comments

Comments
 (0)