promwrapper

package
v2.8.0-beta1 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

promwrapper wraps another OCR2 reporting plugin and provides standardized prometheus metrics for each of the OCR2 phases (Query, Observation, Report, ShouldAcceptFinalizedReport, ShouldTransmitAcceptedReport, and Close).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(
	plugin types.ReportingPlugin,
	name string,
	chainType string,
	chainID *big.Int,
	config types.ReportingPluginConfig,
	backend PrometheusBackend,
) types.ReportingPlugin

func NewPromFactory

func NewPromFactory(wrapped types.ReportingPluginFactory, name, chainType string, chainID *big.Int) types.ReportingPluginFactory

Types

type PrometheusBackend added in v2.2.0

type PrometheusBackend interface {
	// Intra-phase latency.
	SetQueryDuration([]string, float64)
	SetObservationDuration([]string, float64)
	SetReportDuration([]string, float64)
	SetShouldAcceptFinalizedReportDuration([]string, float64)
	SetShouldTransmitAcceptedReportDuration([]string, float64)
	SetCloseDuration([]string, float64)

	// Inter-phase latency.
	SetQueryToObservationLatency([]string, float64)
	SetObservationToReportLatency([]string, float64)
	SetReportToAcceptFinalizedReportLatency([]string, float64)
	SetAcceptFinalizedReportToTransmitAcceptedReportLatency([]string, float64)
}

Contains interface for logging OCR telemetry.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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