mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
refactor(coderd/telemetry): move CLI telemetry to cli/telemetry (#9517)
This change removes an indirect import of `coderd/database` from the slim binary. No size change (yet). Ref: #9380
This commit is contained in:
@@ -23,6 +23,7 @@ import (
|
||||
|
||||
"cdr.dev/slog"
|
||||
"github.com/coder/coder/v2/buildinfo"
|
||||
clitelemetry "github.com/coder/coder/v2/cli/telemetry"
|
||||
"github.com/coder/coder/v2/coderd/database"
|
||||
"github.com/coder/coder/v2/coderd/database/dbtime"
|
||||
)
|
||||
@@ -714,7 +715,7 @@ type Snapshot struct {
|
||||
WorkspaceResources []WorkspaceResource `json:"workspace_resources"`
|
||||
WorkspaceResourceMetadata []WorkspaceResourceMetadata `json:"workspace_resource_metadata"`
|
||||
WorkspaceProxies []WorkspaceProxy `json:"workspace_proxies"`
|
||||
CLIInvocations []CLIInvocation `json:"cli_invocations"`
|
||||
CLIInvocations []clitelemetry.Invocation `json:"cli_invocations"`
|
||||
}
|
||||
|
||||
// Deployment contains information about the host running Coder.
|
||||
@@ -890,18 +891,6 @@ 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 WorkspaceProxy struct {
|
||||
ID uuid.UUID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
|
||||
Reference in New Issue
Block a user