telemetry

package
v0.1.0-rc.49 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: BSD-3-Clause Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

package telemetry owns optional native client collection and delivery. commands and publication owners supply generated contract values; transports only update bounded memory through callbacks. no server runtime depends on this owner.

Index

Constants

View Source
const ReceiverURL = "https://tnl.dev/api/telemetry"
View Source
const RequestTimeout = 500 * time.Millisecond

Variables

This section is empty.

Functions

func Command

func Command(payload api.CommandOutcome) api.Event

event constructors use generated payloads directly. validation remains at the queue and receiver boundaries, rather than maintaining another payload model.

func Demo

func Demo() api.Event

func Integration

func Integration(payload api.IntegrationOutcome) api.Event

func Path

func Path(transport tunnel.Transport) api.Path

func Ready

func Ready(payload api.PublicationReady) api.Event

Types

type Collector

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

collector owns one queue writer/sender and one preference watcher. observations never wait for disk or network; close cancels and joins both workers.

func New

func New(parent context.Context, cfg Config) (*Collector, error)

func (*Collector) BeginScope

func (c *Collector) BeginScope(role api.TransportReportRole) *Scope

func (*Collector) Close

func (c *Collector) Close(ctx context.Context)

func (*Collector) Flush

func (c *Collector) Flush()

func (*Collector) Report

func (c *Collector) Report(event api.Event)

type Config

type Config struct {
	Root       string
	Protection clientstate.ProtectionMode
	Client     *http.Client
	Metadata   *api.Client
	Endpoint   string
	Interval   time.Duration
}

type Scope

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

each publication owns its scope and closes it after its transport workers. only fixed-size counters are touched by transport and recovery callbacks.

func (*Scope) Close

func (s *Scope) Close()

func (*Scope) Connectivity

func (s *Scope) Connectivity(options peer.ConnectivityOptions) peer.ConnectivityOptions

func (*Scope) Demo

func (s *Scope) Demo()

request callbacks only retain bounded facts; the collector encodes them.

func (*Scope) Integration

func (s *Scope) Integration(payload api.IntegrationOutcome)

func (*Scope) Ready

func (s *Scope) Ready(payload api.PublicationReady)

func (*Scope) Record

func (s *Scope) Record(operation api.Operation, path api.Path, outcome api.Outcome, elapsed time.Duration)

func (*Scope) RelayAttempt

func (s *Scope) RelayAttempt(ctx context.Context, transport tunnel.Transport, elapsed time.Duration, err error)

Jump to

Keyboard shortcuts

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