Skip to content

Commit

Permalink
fix: metrics for api
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronGoldman committed Jan 10, 2024
1 parent 8bbbb0c commit ab2ead2
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions api/src/metrics/api.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
use async_trait::async_trait;
use ceramic_api_server::{
models, Api, EventsPostResponse, LivenessGetResponse, SubscribeSortKeySortValueGetResponse,
VersionPostResponse,
models, Api, EventsPostResponse, LivenessGetResponse, ReconPostResponse,
SubscribeSortKeySortValueGetResponse, VersionPostResponse,
};
use ceramic_metrics::Recorder;
use futures::Future;
use swagger::ApiError;
use swagger::{ApiError, ByteArray};
use tokio::time::Instant;

use crate::{metrics::Event, Metrics};
Expand Down Expand Up @@ -82,4 +82,14 @@ where
self.record("/version", self.api.version_post(context))
.await
}

async fn recon_post(
&self,
ring: models::Ring,
body: ByteArray,
context: &C,
) -> std::result::Result<ReconPostResponse, ApiError> {
self.record("/recon", self.api.recon_post(ring, body, context))
.await
}
}

0 comments on commit ab2ead2

Please sign in to comment.