metrics

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewContext

func NewContext(parent context.Context, m Metrics) context.Context

NewContext adds Metrics to the Context.

Types

type LabelNames

type LabelNames struct {
	Channel         basemetrics.LabelName
	AppVer          basemetrics.LabelName
	AppSdkFabricVer basemetrics.LabelName
	FailTransferTag basemetrics.LabelName
	TransferStatus  basemetrics.LabelName
}

func Labels

func Labels() LabelNames

type Metrics

type Metrics interface {
	TotalTransferCreated() basemetrics.Counter
	TotalReconnectsToFabric() basemetrics.Counter
	TotalSuccessTransfer() basemetrics.Counter
	TotalFailureTransfer() basemetrics.Counter

	TotalInWorkTransfer() basemetrics.Gauge
	AppInitDuration() basemetrics.Gauge
	FabricConnectionStatus() basemetrics.Gauge

	TimeDurationCompleteTransferBeforeResponding() basemetrics.Histogram
	TransferExecutionTimeDuration() basemetrics.Histogram
	TransferStageExecutionTimeDuration() basemetrics.Histogram

	CollectorProcessBlockNum() basemetrics.Gauge
	AppInfo() basemetrics.Counter
	CreateChild(labels ...basemetrics.Label) Metrics
}

func FromContext

func FromContext(ctx context.Context) Metrics

FromContext gets Logger from the Context.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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