metrics

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SubSystemOCI     = "oci"
	OCIRequestsTotal = "requests_total"
	Duration         = "request_duration"
	Resource         = "resource"
	StatusCode       = "status_code"
	Operation        = "operation"

	Region        = "region"
	Get    string = "get"
	List   string = "list"
	Create string = "create"
	Update string = "update"
	Delete string = "delete"
)

Variables

This section is empty.

Functions

func IncRequestCounter

func IncRequestCounter(err error, resource string, operation string, region string, response *http.Response)

IncRequestCounter increments the request count metric for the given resource. Unknown errors from request dispatcher will have response code of 999

func ObserverRequestDuration

func ObserverRequestDuration(resource string, operation string, region string, duration time.Duration)

ObserverRequestDuration observes the request duration for the partcular OCI request

Types

type HttpRequestDispatcherWrapper

type HttpRequestDispatcherWrapper struct {
	// contains filtered or unexported fields
}

HttpRequestDispatcherWrapper is a wrapper around standard common.HTTPRequestDispatcher to handle metrics

func NewHttpRequestDispatcherWrapper

func NewHttpRequestDispatcherWrapper(dispatcher common.HTTPRequestDispatcher, region string) HttpRequestDispatcherWrapper

NewHttpRequestDispatcherWrapper creates a new instance of HttpRequestDispatcherWrapper

func (HttpRequestDispatcherWrapper) Do

Do is wrapper implementation of common.HTTPRequestDispatcher Do method

Jump to

Keyboard shortcuts

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