metrics

package
v0.6.31 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package metrics is the SDK's own instrumentation, on meter github.com/backplane-labs/backplane. Instruments are created once on the global provider, which delegates to the one telemetry installs, so they may be used before telemetry starts.

Index

Constants

View Source
const (
	OK          = "ok"
	Error       = "error"
	Applied     = "applied"
	Rejected    = "rejected"
	Unavailable = "unavailable"
	NoBinding   = "no_binding"
	Timeout     = "timeout"
	Ack         = "ack"
	Nak         = "nak"
	Dead        = "dead"
	Terminal    = "terminal"
)

Outcomes shared by the counters.

View Source
const Meter = "github.com/backplane-labs/backplane"

Meter name.

Variables

This section is empty.

Functions

func ActivityHandled

func ActivityHandled(ctx context.Context, activity, outcome string, took time.Duration)

ActivityHandled records an activity execution.

func ConfigDegraded

func ConfigDegraded(ctx context.Context, degraded bool)

ConfigDegraded records whether the Consul layer is stale.

func ConfigUpdate

func ConfigUpdate(ctx context.Context, outcome string)

ConfigUpdate counts an applied or rejected configuration update.

func DependencyProvide

func DependencyProvide(ctx context.Context, node, outcome string)

DependencyProvide counts a provide attempt.

func DependencyReady

func DependencyReady(ctx context.Context, node string, ready bool)

DependencyReady records whether node's dependency is provided.

func EventPublished

func EventPublished(ctx context.Context, event, outcome string)

EventPublished counts a publish.

func HookCall

func HookCall(ctx context.Context, hook, outcome string, took time.Duration)

HookCall records a hook call.

func Panic

func Panic(ctx context.Context, where string)

Panic counts a recovered panic.

func ReactorHandled

func ReactorHandled(ctx context.Context, consumer, outcome string, took time.Duration)

ReactorHandled records a reactor delivery.

func TransportConnected

func TransportConnected(ctx context.Context, transport string, connected bool)

TransportConnected records a transport's connection ("consul", "nats", "temporal").

Types

This section is empty.

Jump to

Keyboard shortcuts

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