metrics

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package metrics owns the OTel instrument set. A nil *Set no-ops every method so components never need nil checks around instrumentation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

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

func New

func New(registries ...*stats.Registry) (*Set, http.Handler, error)

func (*Set) ConnectorBytes

func (s *Set) ConnectorBytes(ctx context.Context, connector string, n int64)

func (*Set) ConnectorMessages

func (s *Set) ConnectorMessages(ctx context.Context, connector, stage string, n int64)

func (*Set) RemoveComponent

func (s *Set) RemoveComponent(kind, id string)

RemoveComponent drops the component-state gauge entry for a source, sink, or connector. Called when a component is stopped and no longer desired (disabled or deleted) so its last state doesn't linger in the exposition.

func (*Set) RemoveConnector

func (s *Set) RemoveConnector(connector string)

RemoveConnector drops the queue depth/bytes gauge entry for a connector. Called when a connector is removed from config entirely so its last observed queue depth doesn't linger in the exposition forever.

func (*Set) SetComponentState

func (s *Set) SetComponentState(kind, id string, state int64)

func (*Set) SetQueueDepth

func (s *Set) SetQueueDepth(connector string, depth, bytes int64)

func (*Set) SinkClients

func (s *Set) SinkClients(sink string, delta int64)

func (*Set) SourceDrops

func (s *Set) SourceDrops(ctx context.Context, component string, n int64)

SourceDrops records envelopes dropped by a full subscriber channel on a non-blocking broadcast (hub.publish for HTTP/CAN sources, busClient's internal broadcast for bus subscribers). component is the source id for hub drops, or "bus:<kind>:<name>" for a shared CAN client's internal broadcast.

func (*Set) SourceMessages

func (s *Set) SourceMessages(ctx context.Context, source string, n int64)

Jump to

Keyboard shortcuts

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