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 ¶
- type Set
- func (s *Set) ConnectorBytes(ctx context.Context, connector string, n int64)
- func (s *Set) ConnectorMessages(ctx context.Context, connector, stage string, n int64)
- func (s *Set) RemoveComponent(kind, id string)
- func (s *Set) RemoveConnector(connector string)
- func (s *Set) SetComponentState(kind, id string, state int64)
- func (s *Set) SetQueueDepth(connector string, depth, bytes int64)
- func (s *Set) SinkClients(sink string, delta int64)
- func (s *Set) SourceDrops(ctx context.Context, component string, n int64)
- func (s *Set) SourceMessages(ctx context.Context, source string, n int64)
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 (*Set) ConnectorBytes ¶
func (*Set) ConnectorMessages ¶
func (*Set) RemoveComponent ¶
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 ¶
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 (*Set) SetQueueDepth ¶
func (*Set) SinkClients ¶
func (*Set) SourceDrops ¶
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.