metering

package
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MeterLiveUncompressedReadBytes = "live_uncompressed_read_bytes"

	MeterFileUncompressedReadBytes = "file_uncompressed_read_bytes"
	MeterFileCompressedReadBytes   = "file_compressed_read_bytes"

	MeterFileUncompressedWriteBytes = "file_uncompressed_write_bytes"
	MeterFileCompressedWriteBytes   = "file_compressed_write_bytes"

	MeterUncompressedEgressBytes = "egress_bytes" // named like this to be backwards compatible with the previous metrics
	MeterProcessedBlocks         = "processed_blocks"

	MeterWasmInputBytes = "wasm_input_bytes"

	// MeterExternalCallsPrefix is followed by the kind of external call, ex: "external_calls_eth_call"
	MeterExternalCallsPrefix = "external_calls_"

	TotalReadBytes  = "total_read_bytes"
	TotalWriteBytes = "total_write_bytes"
)

Variables

This section is empty.

Functions

func AddEgressBytes added in v1.15.5

func AddEgressBytes(ctx context.Context, n int)

func AddExternalCalls added in v1.25.0

func AddExternalCalls(ctx context.Context, kind string, n int)

AddExternalCalls counts `n` calls of the given kind (ex: "eth_call") made by a wasm extension. A batch counts for as many calls as it contains.

func AddProcessedBlocks added in v1.15.5

func AddProcessedBlocks(ctx context.Context, n int)

func AddWasmInputBytes added in v1.10.7

func AddWasmInputBytes(ctx context.Context, n int)

func FileSourceMiddlewareHandlerFactory added in v1.10.7

func FileSourceMiddlewareHandlerFactory(ctx context.Context) func(handler bstream.Handler) bstream.Handler

func GetTotalBytesRead

func GetTotalBytesRead(meter dmetering.Meter) uint64

func GetTotalBytesWritten

func GetTotalBytesWritten(meter dmetering.Meter) uint64

func LiveSourceMiddlewareHandlerFactory added in v1.10.7

func LiveSourceMiddlewareHandlerFactory(ctx context.Context) func(handler bstream.Handler) bstream.Handler

func WithBlockBytesReadMeteringOptions

func WithBlockBytesReadMeteringOptions(meter dmetering.Meter, logger *zap.Logger) []dstore.Option

func WithBytesMeteringOptions

func WithBytesMeteringOptions(meter dmetering.Meter, logger *zap.Logger) []dstore.Option

func WithMetricsSender added in v1.10.7

func WithMetricsSender(ctx context.Context) context.Context

Types

type MetricsSender added in v1.10.7

type MetricsSender struct {
	sync.Mutex
}

func GetMetricsSender added in v1.10.7

func GetMetricsSender(ctx context.Context) *MetricsSender

func NewMetricsSender added in v1.10.7

func NewMetricsSender() *MetricsSender

func (*MetricsSender) Send added in v1.10.7

func (ms *MetricsSender) Send(ctx context.Context, organizationID, apiKeyID, ip, userMeta, outputModuleHash, endpoint string)

Jump to

Keyboard shortcuts

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