mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: add CLI invokation telemetry (#7589)
This commit is contained in:
@@ -701,6 +701,7 @@ type Snapshot struct {
|
||||
WorkspaceBuilds []WorkspaceBuild `json:"workspace_build"`
|
||||
WorkspaceResources []WorkspaceResource `json:"workspace_resources"`
|
||||
WorkspaceResourceMetadata []WorkspaceResourceMetadata `json:"workspace_resource_metadata"`
|
||||
CLIInvocations []CLIInvocation `json:"cli_invocations"`
|
||||
}
|
||||
|
||||
// Deployment contains information about the host running Coder.
|
||||
@@ -876,6 +877,18 @@ type License struct {
|
||||
UUID uuid.UUID `json:"uuid"`
|
||||
}
|
||||
|
||||
type CLIOption struct {
|
||||
Name string `json:"name"`
|
||||
ValueSource string `json:"value_source"`
|
||||
}
|
||||
|
||||
type CLIInvocation struct {
|
||||
Command string `json:"command"`
|
||||
Options []CLIOption `json:"options"`
|
||||
// InvokedAt is provided for deduplication purposes.
|
||||
InvokedAt time.Time `json:"invoked_at"`
|
||||
}
|
||||
|
||||
type noopReporter struct{}
|
||||
|
||||
func (*noopReporter) Report(_ *Snapshot) {}
|
||||
|
||||
Reference in New Issue
Block a user