metrics

package
v0.30.3-testing Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterBadgerMetrics

func RegisterBadgerMetrics() error

Types

type MetricsWriter

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

MetricsWriter wraps the writer and records metrics for the data it writes.

func NewMetricsWriter

func NewMetricsWriter(write *index.Writer) *MetricsWriter

NewMetricsWriter creates a counter that counts indexed elements and exposes this information as prometheus counters.

func (*MetricsWriter) Collections

func (w *MetricsWriter) Collections(height uint64, collections []*flow.LightCollection) error

func (*MetricsWriter) Commit

func (w *MetricsWriter) Commit(height uint64, commit flow.StateCommitment) error

func (*MetricsWriter) Events

func (w *MetricsWriter) Events(height uint64, events []flow.Event) error

func (*MetricsWriter) First

func (w *MetricsWriter) First(height uint64) error

func (*MetricsWriter) Guarantees

func (w *MetricsWriter) Guarantees(height uint64, guarantees []*flow.CollectionGuarantee) error

func (*MetricsWriter) Header

func (w *MetricsWriter) Header(height uint64, header *flow.Header) error

func (*MetricsWriter) Height

func (w *MetricsWriter) Height(blockID flow.Identifier, height uint64) error

func (*MetricsWriter) Last

func (w *MetricsWriter) Last(height uint64) error

func (*MetricsWriter) Payloads

func (w *MetricsWriter) Payloads(height uint64, paths []ledger.Path, payloads []*ledger.Payload) error

func (*MetricsWriter) Registers added in v0.31.4

func (w *MetricsWriter) Registers(height uint64, registers []*wal.LeafNode) error

func (*MetricsWriter) Results

func (w *MetricsWriter) Results(results []*flow.TransactionResult) error

func (*MetricsWriter) Seals

func (w *MetricsWriter) Seals(height uint64, seals []*flow.Seal) error

func (*MetricsWriter) Transactions

func (w *MetricsWriter) Transactions(height uint64, transactions []*flow.TransactionBody) error

type Server

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

Server is the http server that will be serving the /metrics request for prometheus.

func NewServer

func NewServer(log zerolog.Logger, address string) *Server

NewServer creates a new server that exposes metrics.

func (*Server) Start

func (s *Server) Start() error

Start registers the metrics and launches the server.

type Tracer

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

Tracer is a generic tracer implementation for the Archive API servers

func NewTracer

func NewTracer(log zerolog.Logger, serviceName string) (*Tracer, error)

func (*Tracer) Done

func (t *Tracer) Done() <-chan struct{}

Done returns a channel that will close when shutdown is complete.

func (*Tracer) Ready

func (t *Tracer) Ready() <-chan struct{}

Ready returns a channel that will close when the network stack is ready.

func (*Tracer) StartSpanFromContext

func (t *Tracer) StartSpanFromContext(
	ctx context.Context,
	operationName archiveTrace.SpanName,
	opts ...trace.SpanStartOption,
) (context.Context, trace.Span)

Jump to

Keyboard shortcuts

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