metrics

package
v0.28.7 Latest Latest
Warning

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

Go to latest
Published: Feb 14, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RequestBodySizes = metrics.NewHistogramVec(
		&metrics.HistogramOpts{
			Subsystem: "apiserver",
			Name:      "request_body_sizes",
			Help:      "Apiserver request body sizes broken out by size.",

			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)

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