metrics

package
v0.0.0-...-53d8ad0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const Namespace = "platform"

Namespace is the global qualifier of all metrics. It should be passed to all Prometheus metric opts.

Variables

View Source
var GRPCRequestDuration = promauto.NewHistogramVec(
	prometheus.HistogramOpts{
		Namespace: Namespace,
		Name:      "grpc_request_duration_seconds",
		Help:      "Duration of gRPC requests in seconds.",
		Buckets:   prometheus.LinearBuckets(0.01, 0.01, 10),
	},
	[]string{"service_id", "code", "method", "type"},
)

GRPCRequestDuration represents the duration of gRPC requests in seconds.

View Source
var GRPCRequestsTotal = promauto.NewCounterVec(
	prometheus.CounterOpts{
		Namespace: Namespace,
		Name:      "grpc_requests_total",
		Help:      "Total number of gRPC requests.",
	},
	[]string{"service_id", "code", "method", "type"},
)

GRPCRequestsTotal represents the total number of gRPC requests.

View Source
var ServiceInfo = promauto.NewCounterVec(
	prometheus.CounterOpts{
		Namespace: Namespace,
		Name:      "service_info",
		Help:      "Service specific information.",
	},
	[]string{"service_id", "version"},
)

ServiceInfo represents an indivdual service.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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