Skip to content

Commit 7d60186

Browse files
authored
feat: add user_tailnet_connections to telemetry (coder#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
1 parent bf59c7c commit 7d60186

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

coderd/telemetry/telemetry.go

+11
Original file line numberDiff line numberDiff line change
@@ -1149,6 +1149,7 @@ type Snapshot struct {
11491149
NetworkEvents []NetworkEvent `json:"network_events"`
11501150
Organizations []Organization `json:"organizations"`
11511151
TelemetryItems []TelemetryItem `json:"telemetry_items"`
1152+
UserTailnetConnections []UserTailnetConnection `json:"user_tailnet_connections"`
11521153
}
11531154

11541155
// Deployment contains information about the host running Coder.
@@ -1711,6 +1712,16 @@ type TelemetryItem struct {
17111712
UpdatedAt time.Time `json:"updated_at"`
17121713
}
17131714

1715+
type UserTailnetConnection struct {
1716+
ConnectedAt time.Time `json:"connected_at"`
1717+
DisconnectedAt *time.Time `json:"disconnected_at"`
1718+
UserID string `json:"user_id"`
1719+
PeerID string `json:"peer_id"`
1720+
DeviceID *string `json:"device_id"`
1721+
DeviceOS *string `json:"device_os"`
1722+
CoderDesktopVersion *string `json:"coder_desktop_version"`
1723+
}
1724+
17141725
type noopReporter struct{}
17151726

17161727
func (*noopReporter) Report(_ *Snapshot) {}

0 commit comments

Comments
 (0)