httpgenerator_cli/telemetry/
events.rs1use serde_json::{Map, Value};
2
3#[derive(Debug, Clone, PartialEq, Eq)]
4pub struct TelemetryContext {
5 pub support_key: String,
6 pub anonymous_identity: String,
7 pub command_line: String,
8}
9
10#[derive(Debug, Clone, PartialEq, Eq)]
11pub struct FeatureUsageEvent {
12 pub feature_name: String,
13 pub support_key: String,
14 pub anonymous_identity: String,
15}
16
17#[derive(Debug, Clone, PartialEq)]
18pub struct ErrorEvent {
19 pub error_type: String,
20 pub message: String,
21 pub support_key: String,
22 pub anonymous_identity: String,
23 pub command_line: String,
24 pub settings_json: String,
25 pub settings: Map<String, Value>,
26}
27
28#[derive(Debug, Clone, PartialEq)]
29pub enum TelemetryEvent {
30 FeatureUsage(FeatureUsageEvent),
31 Error(ErrorEvent),
32}