Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // PostHogAPIKey is set at build time for production PostHogAPIKey = "phc_development_key" // PostHogEndpoint is set at build time for production PostHogEndpoint = "https://eu.i.posthog.com" )
Functions ¶
Types ¶
type EventPayload ¶
type EventPayload struct {
Event string `json:"event"`
DistinctID string `json:"distinct_id"`
Properties map[string]any `json:"properties"`
Timestamp time.Time `json:"timestamp"`
}
EventPayload represents the data passed to the detached subprocess. Note: APIKey and Endpoint are intentionally excluded to avoid exposing them in process listings (ps/top). SendEvent reads them from package-level vars.
func BuildEventPayload ¶
func BuildEventPayload(cmd *cobra.Command, agent string, isEntireEnabled bool, version string) *EventPayload
BuildEventPayload constructs the event payload for tracking. Exported for testing. Returns nil if the payload cannot be built.
Click to show internal directories.
Click to hide internal directories.