feat(observability): add #[instrument] tracing to all gRPC service handlers
Add tracing::instrument(skip_all) to gRPC handlers across all services for distributed trace spans via OTLP. Pairs with Prometheus scrape annotations from previous commit. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,7 +6,7 @@ use std::sync::Arc;
|
||||
use tokio::sync::{broadcast, RwLock};
|
||||
use tokio_util::sync::CancellationToken;
|
||||
use tonic::{Request, Response, Status};
|
||||
use tracing::{debug, error, info};
|
||||
use tracing::{debug, error, info, instrument};
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::foxhunt::tli::{backtesting_service_server::BacktestingService, *};
|
||||
@@ -362,6 +362,7 @@ impl BacktestingService for BacktestingServiceImpl {
|
||||
>;
|
||||
|
||||
/// Start a new backtest
|
||||
#[instrument(skip_all)]
|
||||
async fn start_backtest(
|
||||
&self,
|
||||
request: Request<StartBacktestRequest>,
|
||||
@@ -444,6 +445,7 @@ impl BacktestingService for BacktestingServiceImpl {
|
||||
}
|
||||
|
||||
/// Get backtest status
|
||||
#[instrument(skip_all)]
|
||||
async fn get_backtest_status(
|
||||
&self,
|
||||
request: Request<GetBacktestStatusRequest>,
|
||||
@@ -469,6 +471,7 @@ impl BacktestingService for BacktestingServiceImpl {
|
||||
}
|
||||
|
||||
/// Get backtest results
|
||||
#[instrument(skip_all)]
|
||||
async fn get_backtest_results(
|
||||
&self,
|
||||
request: Request<GetBacktestResultsRequest>,
|
||||
@@ -547,6 +550,7 @@ impl BacktestingService for BacktestingServiceImpl {
|
||||
}
|
||||
|
||||
/// List historical backtests
|
||||
#[instrument(skip_all)]
|
||||
async fn list_backtests(
|
||||
&self,
|
||||
request: Request<ListBacktestsRequest>,
|
||||
@@ -573,6 +577,7 @@ impl BacktestingService for BacktestingServiceImpl {
|
||||
}
|
||||
|
||||
/// Subscribe to backtest progress
|
||||
#[instrument(skip_all)]
|
||||
async fn subscribe_backtest_progress(
|
||||
&self,
|
||||
request: Request<SubscribeBacktestProgressRequest>,
|
||||
@@ -610,6 +615,7 @@ impl BacktestingService for BacktestingServiceImpl {
|
||||
}
|
||||
|
||||
/// Stop a running backtest
|
||||
#[instrument(skip_all)]
|
||||
async fn stop_backtest(
|
||||
&self,
|
||||
request: Request<StopBacktestRequest>,
|
||||
|
||||
Reference in New Issue
Block a user