metrics

package
v0.5.0-RC22 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2024 License: AGPL-3.0, AGPL-3.0-or-later Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// RequestHandledLabelInvalid represents an request of type invalid
	RequestHandledLabelInvalid RequestHandledLabel = "invalid"
	// RequestHandledLabelError represents an request of type error
	RequestHandledLabelError RequestHandledLabel = "error"
	// RequestHandledLabelSingle represents an request of type single
	RequestHandledLabelSingle RequestHandledLabel = "single"
	// RequestHandledLabelBatch represents an request of type batch
	RequestHandledLabelBatch RequestHandledLabel = "batch"

	// HTTPConnLabel represents a HTTP connection
	HTTPConnLabel ConnLabel = "HTTP"
	// WSConnLabel represents a WS connection
	WSConnLabel ConnLabel = "WS"
)

Variables

This section is empty.

Functions

func CountConn added in v0.4.3

func CountConn(label ConnLabel)

CountConn increments the connection counter vector by one for the given label.

func Register

func Register()

Register the metrics for the jsonrpc package.

func RequestDuration

func RequestDuration(start time.Time)

RequestDuration observes (histogram) the duration of a request from the provided starting time.

func RequestHandled

func RequestHandled(label RequestHandledLabel)

RequestHandled increments the requests handled counter vector by one for the given label.

Types

type ConnLabel added in v0.4.3

type ConnLabel string

ConnLabel represents the possible values for the `jsonrpc_request_connection` metric `type` label.

type RequestHandledLabel

type RequestHandledLabel string

RequestHandledLabel represents the possible values for the `jsonrpc_request_handled` metric `type` label.

Jump to

Keyboard shortcuts

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