Help us shape the future of Go! Take the 2026 Go Developer Survey

telemetry

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OnStartup = trigger{/* contains filtered or unexported fields */}

OnStartup is a trigger type for immediate execution.

Functions

func ClientIDGeneratedOnStartup

func ClientIDGeneratedOnStartup() func() string

ClientIDGeneratedOnStartup returns a function that generates and returns client ID stored in memory. New client ID is generated on each app restart (in-memory only).

func EveryXHours

func EveryXHours(duration time.Duration) trigger

EveryXHours returns a trigger for periodic execution.

func NumberOfSecsSinceStarted

func NumberOfSecsSinceStarted() *paramBuilder

NumberOfSecsSinceStarted returns a paramBuilder that calculates seconds since app start. Start time is stored in memory on first call.

func Raw

func Raw(value any) *paramBuilder

Raw returns a wrapper for static values.

func SimpleEvent

func SimpleEvent(name string, clientIDFunc func() string, paramBuilders ...*paramBuilder) *eventBuilder

SimpleEvent creates an event builder.

func Start

func Start(opts ...option)

Start initializes and starts the telemetry client.

func WithEvent

func WithEvent(trig trigger, event *eventBuilder) option

WithEvent adds an event configuration.

func WithURL

func WithURL(url string) option

WithURL sets the telemetry endpoint URL.

Types

This section is empty.

Jump to

Keyboard shortcuts

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