scraper

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 17 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 AgentCardScraper added in v0.7.0

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

AgentCardScraper fetches a peer's live AgentCard from its per-AgentDeploy ClusterIP Service and returns its hash.

func NewAgentCardScraper added in v0.7.0

func NewAgentCardScraper(timeout time.Duration) *AgentCardScraper

NewAgentCardScraper returns an AgentCardScraper.

func (*AgentCardScraper) ScrapeAgentCard added in v0.7.0

func (s *AgentCardScraper) ScrapeAgentCard(ctx context.Context, baseURL string) (*rater.PeerAgentCard, error)

ScrapeAgentCard fetches the AgentCard served at baseURL (a peer's per-AgentDeploy ClusterIP Service address) and returns its hash.

type IntrospectScraper added in v0.7.0

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

IntrospectScraper fetches one pod's broker-exposed /introspect endpoint and decodes its peerHashes.

func NewIntrospectScraper added in v0.7.0

func NewIntrospectScraper(timeout time.Duration) *IntrospectScraper

NewIntrospectScraper returns an IntrospectScraper.

func (*IntrospectScraper) ScrapeIntrospect added in v0.7.0

func (s *IntrospectScraper) ScrapeIntrospect(ctx context.Context, host string) (*rater.IntrospectSample, error)

ScrapeIntrospect fetches https://<host>:<port>/introspect and returns its peer-hashes, decoded into rater.IntrospectSample.

type MetricsScraper added in v0.7.0

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

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

func NewMetricsScraper added in v0.7.0

func NewMetricsScraper(timeout time.Duration) *MetricsScraper

NewMetricsScraper returns a MetricsScraper.

func (*MetricsScraper) ScrapeMetrics added in v0.7.0

func (s *MetricsScraper) ScrapeMetrics(ctx context.Context, host string) (*rater.PodSample, error)

ScrapeMetrics 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