metrics

package
v0.0.68 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ARMRequestErrors

func ARMRequestErrors() api.Int64Counter

ARMRequestErrors returns the counter for ARM request errors.

func ARMRequestLatency

func ARMRequestLatency() api.Float64Histogram

ARMRequestLatency returns the histogram for ARM request latency.

func ARMRequestRateLimits

func ARMRequestRateLimits() api.Int64Counter

ARMRequestRateLimits returns the counter for ARM request rate limits.

func ARMRequestThrottles

func ARMRequestThrottles() api.Int64Counter

ARMRequestThrottles returns the counter for ARM request throttles.

func Setup

func Setup(meter api.Meter) error

Setup sets up the ARM metrics.

Types

type ARMContext

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

ARMContext is the context for ARM metrics.

func BeginARMRequest

func BeginARMRequest(subscriptionID, resourceGroup, resource, method string) *ARMContext

BeginARMRequest creates a new ARMContext for an ARM request.

func BeginARMRequestWithAttributes added in v0.0.49

func BeginARMRequestWithAttributes(attributes ...attribute.KeyValue) *ARMContext

BeginARMRequest creates a new ARMContext for an ARM request.

func (*ARMContext) Done

func (c *ARMContext) Done(ctx context.Context)

Done finishes the ARMContext and records the latency.

func (*ARMContext) Errored

func (c *ARMContext) Errored(ctx context.Context, err error)

Errored finishes the ARMContext and records the error.

func (*ARMContext) Observe

func (c *ARMContext) Observe(ctx context.Context, err error)

Observe observes the result of the ARM request. It's a convenience method for calling Done, Errored, RateLimited, or Throttled. You should not call this method after calling one of the other methods.

func (*ARMContext) RateLimited

func (c *ARMContext) RateLimited(ctx context.Context)

RateLimited finishes the ARMContext and records the rate limit.

func (*ARMContext) Throttled

func (c *ARMContext) Throttled(ctx context.Context)

Throttled finishes the ARMContext and records the throttle.

Jump to

Keyboard shortcuts

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