Documentation
¶
Overview ¶
Package telltale makes a clicky process observable: it embeds the telltale agent with probes for clicky exec, entity operations and tasks, commons logs and HTTP traffic through http.DefaultTransport, and a gops agent so the gops CLI and `telltale gops` keep working against the same process.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Agent ¶
type Agent struct {
// contains filtered or unexported fields
}
Agent is a running telltale agent and, unless disabled, a gops agent.
type EntityRecord ¶
type EntityRecord struct {
Entity string `json:"entity"`
Verb string `json:"verb"`
Surface string `json:"surface,omitempty"`
TargetID string `json:"targetId,omitempty"`
Admin bool `json:"admin,omitempty"`
ReadOnly *bool `json:"readOnly,omitempty"`
Parameters map[string]string `json:"parameters,omitempty"`
Args []string `json:"args,omitempty"`
StartedAt time.Time `json:"startedAt"`
DurationMs float64 `json:"durationMs"`
Error string `json:"error,omitempty"`
}
EntityRecord is one completed clicky entity operation. Parameter values are masked, and the operation's result is never captured.
type ExecRecord ¶
type ExecRecord struct {
Phase exec.ExecPhase `json:"phase"`
Name string `json:"name"`
Command string `json:"command,omitempty"`
Args []string `json:"args,omitempty"`
Dir string `json:"dir,omitempty"`
EnvKeys []string `json:"envKeys,omitempty"`
PID int `json:"pid"`
PPID int `json:"ppid"`
PGID int `json:"pgid,omitempty"`
ProcessKey string `json:"processKey,omitempty"`
CreatedAt *time.Time `json:"createdAt,omitempty"`
StartedAt time.Time `json:"startedAt"`
DurationMs float64 `json:"durationMs,omitempty"`
ExitCode *int `json:"exitCode,omitempty"`
Error string `json:"error,omitempty"`
StdoutTail string `json:"stdoutTail,omitempty"`
StderrTail string `json:"stderrTail,omitempty"`
}
ExecRecord is one clicky exec start or exit. ProcessKey is <pid>@<create unix second>, the key telltale's process sampler gives the same child, so a start record hands the child off to the process kind; it is the bare pid when the child exited before its create time could be read.
type MemStats ¶
type MemStats struct {
Alloc, TotalAlloc, Sys, Lookups, Mallocs, Frees uint64
HeapAlloc, HeapSys, HeapIdle, HeapInuse uint64
HeapReleased, HeapObjects, StackInuse, StackSys uint64
NextGC, LastGC, PauseTotalNs uint64
NumGC, NumForcedGC uint32
GCCPUFraction float64
Goroutines, GOMAXPROCS, NumCPU int
}
MemStats is the subset of runtime.MemStats gops prints.
type Options ¶
type Options struct {
Service, Version string
Dial, Token string
Labels map[string]string
AllowMutation bool
// NoGops leaves the gops agent stopped; Gops configures it otherwise.
NoGops bool
Gops gops.Options
}
Options configures the embedded agents. Dial and Token default to TELLTALE_URL and TELLTALE_TOKEN; without a Dial the agent serves a local socket advertised under <UserConfigDir>/telltale/agents/<pid>.json.
type TaskRecord ¶
type TaskRecord struct {
Phase task.TaskPhase `json:"phase"`
task.TaskSnapshot
}
TaskRecord is a clicky task snapshot at a status transition, a throttled progress update, or (Phase "baseline") a task already present when the probe was armed. Logs and captured output are left to the logs and exec kinds; only the latest log line survives as Message.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package auto starts clicky's telltale and gops agents from the environment when imported for side effects:
|
Package auto starts clicky's telltale and gops agents from the environment when imported for side effects: |
|
examples
|
|
|
demo
command
Command demo is a clicky process observable by telltale and gops.
|
Command demo is a clicky process observable by telltale and gops. |