Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client wraps the Prometheus HTTP API.
type MetricReader ¶
type MetricReader struct {
// contains filtered or unexported fields
}
MetricReader implements dataplane.MetricReader against the Prometheus HTTP API.
func NewMetricReader ¶
func NewMetricReader(c *Client) *MetricReader
NewMetricReader creates a MetricReader from the given Client.
func (*MetricReader) Percentiles ¶
func (r *MetricReader) Percentiles(ctx context.Context, service, action string, window time.Duration) (*dataplane.LatencyPercentiles, error)
Percentiles queries Prometheus for per-action latency percentiles over the given window duration.
func (*MetricReader) ServiceStats ¶
func (r *MetricReader) ServiceStats(ctx context.Context, service string, window time.Duration) (*dataplane.ServiceMetrics, error)
ServiceStats queries Prometheus for aggregate service metrics over the given window duration and returns them as a ServiceMetrics value.
type MetricWriter ¶
type MetricWriter struct{}
MetricWriter is a no-op implementation of dataplane.MetricWriter.
In production mode, the OTel SDK emits metrics directly to the Collector, which Prometheus then scrapes. This interface exists for symmetry with the local-mode data plane.
func NewMetricWriter ¶
func NewMetricWriter() *MetricWriter
NewMetricWriter returns a no-op MetricWriter.