diff --git a/src/kafka_client.rs b/src/kafka_client.rs index c2c112b8..e8374435 100644 --- a/src/kafka_client.rs +++ b/src/kafka_client.rs @@ -68,6 +68,9 @@ pub struct ClientQueryResult { #[derive(Serialize)] pub struct IndexerAttempt { + pub ray_id: String, + pub api_key: String, + pub deployment: String, pub indexer: String, pub url: String, pub allocation: String, diff --git a/src/main.rs b/src/main.rs index 900fdcb1..195ac85e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -546,12 +546,16 @@ fn timestamp() -> u64 { fn notify_query_result(kafka_client: &KafkaClient, query: &Query, result: Result) { let ts = timestamp(); - kafka_client.send(&ClientQueryResult::new(&query, result.clone(), ts)); + let query_result = ClientQueryResult::new(&query, result.clone(), ts); + kafka_client.send(&query_result); let indexer_attempts = query .indexer_attempts .iter() .map(|attempt| IndexerAttempt { + api_key: query_result.api_key.clone(), + deployment: query_result.deployment.clone(), + ray_id: query_result.ray_id.clone(), indexer: attempt.indexer.to_string(), url: attempt.score.url.to_string(), allocation: attempt.allocation.to_string(),