Skip to content

Commit 6721173

Browse files
committed
Record InvokedAt
1 parent c6f7504 commit 6721173

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

cli/root.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,9 @@ func telemetryInvocation(i *clibase.Invocation) telemetry.CLIInvocation {
440440
})
441441
}
442442
return telemetry.CLIInvocation{
443-
Command: i.Command.FullName(),
444-
Options: topts,
443+
Command: i.Command.FullName(),
444+
Options: topts,
445+
InvokedAt: time.Now(),
445446
}
446447
}
447448

coderd/telemetry/telemetry.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -883,6 +883,8 @@ type CLIOption struct {
883883
type CLIInvocation struct {
884884
Command string `json:"command"`
885885
Options []CLIOption `json:"options"`
886+
// InvokedAt is provided for deduplication purposes.
887+
InvokedAt time.Time `json:"invoked_at"`
886888
}
887889

888890
type noopReporter struct{}

0 commit comments

Comments
 (0)