metrics

package
v0.32.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RequestBodySizes = metrics.NewHistogramVec(
		&metrics.HistogramOpts{
			Subsystem: "apiserver",
			Name:      "request_body_size_bytes",
			Help:      "Apiserver request body size in bytes broken out by resource and verb.",

			Buckets:        metrics.LinearBuckets(50000, 100000, 31),
			StabilityLevel: metrics.ALPHA,
		},
		[]string{"resource", "verb"},
	)
)

Functions

func RecordRequestBodySize

func RecordRequestBodySize(ctx context.Context, resource string, verb RequestBodyVerb, size int)

func Register added in v0.29.0

func Register()

Register all metrics.

Types

type RequestBodyVerb

type RequestBodyVerb string
const (
	Patch            RequestBodyVerb = "patch"
	Delete           RequestBodyVerb = "delete"
	Update           RequestBodyVerb = "update"
	Create           RequestBodyVerb = "create"
	DeleteCollection RequestBodyVerb = "delete_collection"
)

Jump to

Keyboard shortcuts

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