From 6f0ced5eeb70c611d905e17d722344ccff213777 Mon Sep 17 00:00:00 2001 From: Yair <92672946+yair-starkware@users.noreply.github.com> Date: Thu, 11 Jul 2024 11:57:23 +0300 Subject: [PATCH] feat(gateway): instrument gateway entry points (#432) --- crates/gateway/src/gateway.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/gateway/src/gateway.rs b/crates/gateway/src/gateway.rs index 08c4d0693..25eefe936 100644 --- a/crates/gateway/src/gateway.rs +++ b/crates/gateway/src/gateway.rs @@ -11,7 +11,7 @@ use starknet_api::transaction::TransactionHash; use starknet_mempool_infra::component_runner::{ComponentRunner, ComponentStartError}; use starknet_mempool_types::communication::SharedMempoolClient; use starknet_mempool_types::mempool_types::{Account, MempoolInput}; -use tracing::info; +use tracing::{info, instrument}; use crate::compilation::compile_contract_class; use crate::config::{GatewayConfig, GatewayNetworkConfig, RpcStateReaderConfig}; @@ -78,10 +78,12 @@ impl Gateway { // Gateway handlers. +#[instrument] async fn is_alive() -> GatewayResult { unimplemented!("Future handling should be implemented here."); } +#[instrument(skip(app_state))] async fn add_tx( State(app_state): State, Json(tx): Json,