metrics

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WakuVersion         = stats.Int64("waku_version", "", stats.UnitDimensionless)
	Messages            = stats.Int64("node_messages", "Number of messages received", stats.UnitDimensionless)
	Peers               = stats.Int64("peers", "Number of connected peers", stats.UnitDimensionless)
	Dials               = stats.Int64("dials", "Number of peer dials", stats.UnitDimensionless)
	StoreMessages       = stats.Int64("store_messages", "Number of historical messages", stats.UnitDimensionless)
	FilterSubscriptions = stats.Int64("filter_subscriptions", "Number of filter subscriptions", stats.UnitDimensionless)
	StoreErrors         = stats.Int64("errors", "Number of errors in store protocol", stats.UnitDimensionless)
	StoreQueries        = stats.Int64("store_queries", "Number of store queries", stats.UnitDimensionless)
	LightpushErrors     = stats.Int64("errors", "Number of errors in lightpush protocol", stats.UnitDimensionless)
	PeerExchangeError   = stats.Int64("errors", "Number of errors in peer exchange protocol", stats.UnitDimensionless)
)
View Source
var (
	KeyType, _    = tag.NewKey("type")
	ErrorType, _  = tag.NewKey("error_type")
	GitVersion, _ = tag.NewKey("git_version")
)
View Source
var (
	PeersView = &view.View{
		Name:        "gowaku_connected_peers",
		Measure:     Peers,
		Description: "Number of connected peers",
		Aggregation: view.Sum(),
	}
	DialsView = &view.View{
		Name:        "gowaku_peers_dials",
		Measure:     Dials,
		Description: "Number of peer dials",
		Aggregation: view.Count(),
	}
	MessageView = &view.View{
		Name:        "gowaku_node_messages",
		Measure:     Messages,
		Description: "The number of the messages received",
		Aggregation: view.Count(),
	}
	StoreQueriesView = &view.View{
		Name:        "gowaku_store_queries",
		Measure:     StoreQueries,
		Description: "The number of the store queries received",
		Aggregation: view.Count(),
	}
	StoreMessagesView = &view.View{
		Name:        "gowaku_store_messages",
		Measure:     StoreMessages,
		Description: "The distribution of the store protocol messages",
		Aggregation: view.LastValue(),
		TagKeys:     []tag.Key{KeyType},
	}
	FilterSubscriptionsView = &view.View{
		Name:        "gowaku_filter_subscriptions",
		Measure:     FilterSubscriptions,
		Description: "The number of content filter subscriptions",
		Aggregation: view.LastValue(),
	}
	StoreErrorTypesView = &view.View{
		Name:        "gowaku_store_errors",
		Measure:     StoreErrors,
		Description: "The distribution of the store protocol errors",
		Aggregation: view.Count(),
		TagKeys:     []tag.Key{ErrorType},
	}
	LightpushErrorTypesView = &view.View{
		Name:        "gowaku_lightpush_errors",
		Measure:     LightpushErrors,
		Description: "The distribution of the lightpush protocol errors",
		Aggregation: view.Count(),
		TagKeys:     []tag.Key{ErrorType},
	}
	VersionView = &view.View{
		Name:        "gowaku_version",
		Measure:     WakuVersion,
		Description: "The gowaku version",
		Aggregation: view.LastValue(),
		TagKeys:     []tag.Key{GitVersion},
	}
)

Functions

func RecordLightpushError

func RecordLightpushError(ctx context.Context, tagType string)

func RecordMessage

func RecordMessage(ctx context.Context, tagType string, len int)

func RecordPeerExchangeError

func RecordPeerExchangeError(ctx context.Context, tagType string)

func RecordStoreError

func RecordStoreError(ctx context.Context, tagType string)

func RecordStoreQuery

func RecordStoreQuery(ctx context.Context)

func RecordVersion

func RecordVersion(ctx context.Context, version string, commit string)

Types

This section is empty.

Jump to

Keyboard shortcuts

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