mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
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:
@ -1149,6 +1149,7 @@ type Snapshot struct {
|
|||||||
NetworkEvents []NetworkEvent `json:"network_events"`
|
NetworkEvents []NetworkEvent `json:"network_events"`
|
||||||
Organizations []Organization `json:"organizations"`
|
Organizations []Organization `json:"organizations"`
|
||||||
TelemetryItems []TelemetryItem `json:"telemetry_items"`
|
TelemetryItems []TelemetryItem `json:"telemetry_items"`
|
||||||
|
UserTailnetConnections []UserTailnetConnection `json:"user_tailnet_connections"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deployment contains information about the host running Coder.
|
// Deployment contains information about the host running Coder.
|
||||||
@ -1711,6 +1712,16 @@ type TelemetryItem struct {
|
|||||||
UpdatedAt time.Time `json:"updated_at"`
|
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{}
|
type noopReporter struct{}
|
||||||
|
|
||||||
func (*noopReporter) Report(_ *Snapshot) {}
|
func (*noopReporter) Report(_ *Snapshot) {}
|
||||||
|
Reference in New Issue
Block a user