metrics

package
v1.1.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	AccessTracing = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "access_log",
		},
		[]string{"trace_id", "span_id", "method"},
	)

	AccessErrorCode = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "access_errcode",
		},
		[]string{"trace_id", "span_id", "method", "code"},
	)

	RecoveryPanic = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "recovery_panic",
		},
		[]string{"trace_id", "span_id", "method"},
	)

	ErrorLogging = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "error_log",
		},
		[]string{"trace_id", "span_id", "level"},
	)

	SQLTracing = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Name:    "sql_tracing",
			Buckets: []float64{0.5, 1, 3, 5, 10, 30},
		},
		[]string{"trace_id", "span_id", "span_name", "instance", "user", "statement"},
	)

	HTTPTracing = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Name:    "http_tracing",
			Buckets: []float64{1, 3, 5, 10, 30},
		},
		[]string{"trace_id", "span_id", "span_name", "request_uri", "status_code"},
	)

	RPCTracing = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Name:    "rpc_tracing",
			Buckets: []float64{1, 3, 5, 10, 30},
		},
		[]string{"trace_id", "span_id", "span_name", "method"},
	)

	RedisTracing = prometheus.NewHistogramVec(
		prometheus.HistogramOpts{
			Name:    "redis_tracing",
			Buckets: []float64{0.1, 0.5, 1, 5, 10},
		},
		[]string{"trace_id", "span_id", "span_name", "command_name"},
	)
)

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