(&mut self, actor: ActorEntityUuid, query: OpenApiQuery<'_>)
| 277 | |
| 278 | #[expect(clippy::missing_panics_doc)] |
| 279 | pub fn capture(&mut self, actor: ActorEntityUuid, query: OpenApiQuery<'_>) { |
| 280 | let mut record = serde_json::to_value(query) |
| 281 | .change_context(QueryLoggingError) |
| 282 | .expect("query should be serializable"); |
| 283 | record |
| 284 | .as_object_mut() |
| 285 | .map(|object| object.insert("actor".to_owned(), JsonValue::String(actor.to_string()))); |
| 286 | self.value = Some(record); |
| 287 | self.created_at = Instant::now(); |
| 288 | } |
| 289 | |
| 290 | /// Sends the captured query to the query logger. |
| 291 | /// |
no test coverage detected