promwrapper

package
v2.13.0-rc0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: MIT Imports: 9 Imported by: 0

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