telemetry

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package telemetry is lic's business counters: validations by their code, activations, check-outs and usage reports by outcome. Labels are bounded: Keygen's validation codes, the refusal codes, ok, error.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Outcome

func Outcome(err error) string

Outcome is ok, a refusal's code (or its HTTP class when it has none), or error for a technical failure.

Types

type Counters

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

Counters are the business counters; the zero value records nothing.

func New

func New(meter metric.Meter) Counters

New is the counters on meter.

func (Counters) Activation

func (c Counters) Activation(ctx context.Context, err error)

Activation counts an activation that ended with err.

func (Counters) Checkout

func (c Counters) Checkout(ctx context.Context, kind string, err error)

Checkout counts a check-out of kind (license, machine) that ended with err.

func (Counters) UsageReport

func (c Counters) UsageReport(ctx context.Context, err error)

UsageReport counts a usage report that ended with err.

func (Counters) Validation

func (c Counters) Validation(ctx context.Context, code string)

Validation counts a validation answered with code.

func (Counters) Webhook

func (c Counters) Webhook(ctx context.Context, outcome string)

Webhook counts a webhook delivery attempt ending in outcome (delivered, failing, failed).

Jump to

Keyboard shortcuts

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