1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
use chrono::{DateTime, Duration, Utc}; use std::collections::HashMap; #[derive(Debug, Clone)] pub struct Span { pub id: u64, pub trace_id: u64, pub name: String, pub resource: String, pub parent_id: Option<u64>, pub start: DateTime<Utc>, pub duration: Duration, pub sql: Option<SqlInfo>, pub tags: HashMap<String, String>, } #[derive(Debug, Clone)] pub struct SqlInfo { pub query: String, pub rows: String, pub db: String, }