Documentation
¶
Overview ¶
Package telemetry provides OpenTelemetry instrumentation for Tikr, including metric definitions for ingestion throughput, aggregation flushes, query latency, and storage usage.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Counter ¶
type Counter = metric.Int64Counter
Counter is a convenience alias for the OTel Int64Counter instrument.
type Metrics ¶
type Metrics struct {
// Ingest metrics
TicksTotal Counter // tikr.ingest.ticks_total
BatchSize metric.Float64Histogram // tikr.ingest.batch_size
// Aggregation metrics
BarsFlushedTotal Counter // tikr.agg.bars_flushed_total
// Output metrics
KafkaWritesTotal Counter // tikr.output.kafka_writes_total
KafkaDropsTotal Counter // tikr.output.kafka_drops_total
// Query metrics
QueryRequestsTotal Counter // tikr.query.requests_total (use "type" attr)
QueryLatencyMs metric.Float64Histogram // tikr.query.latency_ms
// contains filtered or unexported fields
}
Metrics holds all OTel instruments for the Tikr service. The underlying MeterProvider can be configured with any OTel exporter (Prometheus, OTLP/gRPC, OTLP/HTTP, stdout, Kafka, etc.).
func NewMetrics ¶
NewMetrics creates a Metrics instance with the given OTel readers/exporters. If no readers are provided, metrics are collected but not exported (useful for tests).
Click to show internal directories.
Click to hide internal directories.