| 1 | use serde::{Deserialize, Serialize}; |
| 2 | use serde_json::Value; |
| 3 | |
| 4 | /// Context about the end-client that we want to attach to telemetry events. |
| 5 | /// |
| 6 | /// This is an opaque blob that the client chooses because we want to respect |
| 7 | /// whatever context it wants to declare rather than a custom schema. |
| 8 | /// Since we use Rudderstack, it should still respect the named fields |
| 9 | /// here: https://www.rudderstack.com/docs/event-spec/standard-events/common-fields/#contextual-fields |
| 10 | #[derive(Clone, Debug, Serialize, Deserialize)] |
| 11 | pub struct TelemetryContext(pub Value); |