telemetry

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const EventServerHeartbeat = "server_heartbeat"

Event names should use underscores because they will be ingested into Snowflake and then snakeCase becomes SNAKECASE which makes it a little hard to read.

View Source
const EventServerUserAction = "server_user_action"
View Source
const ServerHeartbeatTypeInitialized = "initialized"
View Source
const ServerHeartbeatTypePanic = "panic"
View Source
const ServerUserActionTypeCommandExecuted = "commandExecuted"
View Source
const ServerUserActionTypeFileAnalyzed = "fileAnalyzed"

Variables

This section is empty.

Functions

This section is empty.

Types

type Record

type Record struct {
	Event      string         `json:"event"`
	Source     string         `json:"source"`
	Timestamp  int64          `json:"event_timestamp"`
	Properties map[string]any `json:"properties"`
}

type TelemetryClient

type TelemetryClient interface {
	Enqueue(event string, properties map[string]any)
	Publish(ctx context.Context) (int, error)
	UpdateTelemetrySetting(value string)
}

func NewClient

func NewClient() TelemetryClient

type TelemetryClientImpl

type TelemetryClientImpl struct {
	// contains filtered or unexported fields
}

func (*TelemetryClientImpl) Enqueue

func (c *TelemetryClientImpl) Enqueue(event string, properties map[string]any)

func (*TelemetryClientImpl) Publish

func (c *TelemetryClientImpl) Publish(ctx context.Context) (int, error)

func (*TelemetryClientImpl) UpdateTelemetrySetting

func (c *TelemetryClientImpl) UpdateTelemetrySetting(value string)

type TelemetryPaylad

type TelemetryPaylad struct {
	Records []Record `json:"records"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL