Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector buffers and periodically ships telemetry events.
func New ¶
func New(enabled bool, endpoint string, batchIntervalSec int, epsilon float64, salt string, logger *slog.Logger) *Collector
New creates a new Collector. batchIntervalSec is in seconds.
type Event ¶
type Event struct {
AgentIDHash string `json:"agentIdHash"`
Timestamp time.Time `json:"timestamp"`
Method string `json:"method"`
Direction string `json:"direction"` // "request" | "response"
Success bool `json:"success"`
LatencyMs float64 `json:"latencyMs"`
PayloadSizeBytes int `json:"payloadSizeBytes"`
AuthStatus string `json:"authStatus"` // "verified" | "failed" | "unsigned"
ErrorCode string `json:"errorCode,omitempty"`
}
Event is a single telemetry event.
Click to show internal directories.
Click to hide internal directories.