analytics

package
v0.7.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultEndpoint is the default address for the analytics collector.
	DefaultEndpoint = "otlp.ncps.dev:443"
)

Variables

This section is empty.

Functions

func SafeGo added in v0.6.1

func SafeGo(ctx context.Context, fn func())

Types

type Reporter

type Reporter interface {
	GetLogger() log.Logger
	GetMeter() metric.Meter
	LogPanic(context.Context, any, []byte)
	Shutdown(context.Context) error
	WithContext(context.Context) context.Context
}

func Ctx added in v0.6.1

func Ctx(ctx context.Context) Reporter

func New added in v0.6.1

func New(
	ctx context.Context,
	db database.Querier,
	res *resource.Resource,
) (Reporter, error)

New initializes the analytics reporting pipeline. It returns a shutdown function that should be called when the application exits.

Jump to

Keyboard shortcuts

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