feat: add user_tailnet_connections to telemetry (#17018)

## Summary
- Add UserTailnetConnection struct to track desktop client connections
- Add new field to Snapshot struct for telemetry
- Data collection to be implemented in a future PR

relates to coder/nexus#197
This commit is contained in:
Spike Curtis
2025-03-20 17:04:43 +04:00
committed by GitHub
parent bf59c7ca0f
commit 7d60186b7e

View File

@ -1149,6 +1149,7 @@ type Snapshot struct {
NetworkEvents []NetworkEvent `json:"network_events"`
Organizations []Organization `json:"organizations"`
TelemetryItems []TelemetryItem `json:"telemetry_items"`
UserTailnetConnections []UserTailnetConnection `json:"user_tailnet_connections"`
}
// Deployment contains information about the host running Coder.
@ -1711,6 +1712,16 @@ type TelemetryItem struct {
UpdatedAt time.Time `json:"updated_at"`
}
type UserTailnetConnection struct {
ConnectedAt time.Time `json:"connected_at"`
DisconnectedAt *time.Time `json:"disconnected_at"`
UserID string `json:"user_id"`
PeerID string `json:"peer_id"`
DeviceID *string `json:"device_id"`
DeviceOS *string `json:"device_os"`
CoderDesktopVersion *string `json:"coder_desktop_version"`
}
type noopReporter struct{}
func (*noopReporter) Report(_ *Snapshot) {}