MCPcopy Index your code
hub / github.com/docker/docker-agent / TrackCommandError

Function TrackCommandError

pkg/telemetry/global.go:26–41  ·  view source on GitHub ↗

TrackCommandError records a command eventerror, send telemetry synchronously to ensure it is sent before the process exits after error do nothing if err == nil

(ctx context.Context, action string, args []string, err error)

Source from the content-addressed store, hash-verified

24// TrackCommandError records a command eventerror, send telemetry synchronously to ensure it is sent before the process exits after error
25// do nothing if err == nil
26func TrackCommandError(ctx context.Context, action string, args []string, err error) {
27 if err == nil {
28 return
29 }
30 EnsureGlobalTelemetryInitialized(ctx)
31
32 if globalToolTelemetryClient != nil {
33 commandEvent := CommandEvent{
34 Action: action,
35 Args: args,
36 Error: err.Error(),
37 Success: false,
38 }
39 globalToolTelemetryClient.TrackSynchronous(ctx, &commandEvent)
40 }
41}
42
43// Global variables for simple tool telemetry
44var (

Callers 15

runPushCommandFunction · 0.92
runAPICommandMethod · 0.92
runACPCommandMethod · 0.92
runNewCommandMethod · 0.92
newDebugAuthCmdFunction · 0.92
runDebugConfigCommandMethod · 0.92
runDebugSkillsCommandMethod · 0.92
runDebugTitleCommandMethod · 0.92
runModelsListCommandMethod · 0.92
runAliasAddCommandFunction · 0.92
runAliasListCommandFunction · 0.92

Calls 3

TrackSynchronousMethod · 0.80
ErrorMethod · 0.45

Tested by

no test coverage detected