metrics

package
v0.0.3-RC4 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2023 License: GPL-3.0 Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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 RequestHandledLabel

type RequestHandledLabel string

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

const (
	// RequestHandledLabelInvalid represents an request of type invalid
	RequestHandledLabelInvalid RequestHandledLabel = "invalid"
	// RequestHandledLabelSingle represents an request of type single
	RequestHandledLabelSingle RequestHandledLabel = "single"
	// RequestHandledLabelBatch represents an request of type batch
	RequestHandledLabelBatch RequestHandledLabel = "batch"
)

Jump to

Keyboard shortcuts

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