scraper

package
v0.6.1 Latest Latest
Warning

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

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

Documentation

Overview

Package scraper fetches Prometheus-format metrics.

Index

Constants

View Source
const (
	// MetricInflightName is the in-flight gauge.
	MetricInflightName = "broker_inflight_requests"

	// MetricRequestsName is the per-transport request counter,
	// incremented on HTTP request completion or gRPC stream close.
	MetricRequestsName = "broker_requests_total"

	// MetricStreamMessagesName is the per-transport stream message
	// counter — SSE events for REST/passthrough, server→client
	// frames for gRPC. Zero for unary responses.
	MetricStreamMessagesName = "broker_stream_messages_total"

	// TransportLabelName is the label the broker uses to distinguish
	// JSONRPC, REST, gRPC, and passthrough buckets on every metric.
	TransportLabelName = "transport"
)

Metric names emitted by the broker.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scraper

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

Scraper fetches one pod's /metrics endpoint and parses it.

func New

func New(timeout time.Duration) *Scraper

New returns a Scraper.

func (*Scraper) Scrape

func (s *Scraper) Scrape(ctx context.Context, host string) (*rater.PodSample, error)

Scrape fetches https://<host>:<port>/metrics and returns the parsed PodSample.

Jump to

Keyboard shortcuts

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