telemetry

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SyncMetrics

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

SyncMetrics tracks high-throughput runtime telemetry for the Disruptor ring buffer and MTProto sync state.

func NewSyncMetrics

func NewSyncMetrics() *SyncMetrics

NewSyncMetrics constructs a new atomic metrics tracker.

func (*SyncMetrics) Handler

func (m *SyncMetrics) Handler() http.Handler

Handler returns an http.Handler that renders metrics for Prometheus scraping.

func (*SyncMetrics) RecordDroppedUpdates

func (m *SyncMetrics) RecordDroppedUpdates(reason string, count uint64)

RecordDroppedUpdates increments the dropped updates counter with reason classification.

func (*SyncMetrics) RecordPublishContention

func (m *SyncMetrics) RecordPublishContention()

RecordPublishContention increments the counter of spin-waits experienced during sequence claiming.

func (*SyncMetrics) RecordResyncDuration

func (m *SyncMetrics) RecordResyncDuration(d time.Duration)

RecordResyncDuration updates the latest resynchronization duration in seconds.

func (*SyncMetrics) RecordResyncEvent

func (m *SyncMetrics) RecordResyncEvent(resyncType string)

RecordResyncEvent increments the count of state resynchronization events.

func (*SyncMetrics) RecordRingBufferUtilization

func (m *SyncMetrics) RecordRingBufferUtilization(ratio float64)

RecordRingBufferUtilization records the percentage of ring buffer capacity currently occupied (0.0 to 1.0).

func (*SyncMetrics) RecordShardOverflow

func (m *SyncMetrics) RecordShardOverflow()

RecordShardOverflow increments the counter indicating updates spilling into the elastic shard queue.

func (*SyncMetrics) WritePrometheus

func (m *SyncMetrics) WritePrometheus(w io.Writer)

WritePrometheus formats all tracked metrics into standard Prometheus exposition format.

Jump to

Keyboard shortcuts

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