metrics

package
v0.0.0-...-add38de Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MetricsGraphqlRequestCount = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "customer_os_api_graphql_requests_total",
			Help: "Total number of GraphQL requests",
		},
		[]string{"name", "status"},
	)

	MetricsGraphqlRequestDuration = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Name:    "customer_os_api_graphql_request_duration_seconds",
			Help:    "GraphQL request duration in seconds",
			Buckets: prometheus.DefBuckets,
		},
		[]string{"name"},
	)

	MetricsGraphqlRequestErrorCount = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "customer_os_api_graphql_request_errors_total",
			Help: "Total number of GraphQL request errors",
		},
		[]string{"name"},
	)
)

Prometheus metrics

Functions

This section is empty.

Types

type Config

type Config struct {
	PrometheusPath string `env:"PROMETHEUS_PATH" envDefault:"/metrics" validate:"required"`
}

Jump to

Keyboard shortcuts

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