metrics

package
v0.0.0-...-0375c8d Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricHandler

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

MetricHandler handles metrics collections/writes to cloud monarch

func NewMetricHandler

func NewMetricHandler(ctx context.Context, projectID, resourceType, resourceKeyValues, metricDomain, endpoint string) (*MetricHandler, error)

NewMetricHandler instantiates a metric client for the purpose of writing metrics to cloud monarch

func (*MetricHandler) GetResponseCountMetricType

func (h *MetricHandler) GetResponseCountMetricType() string

GetResponseCountMetricType constructs and returns a string representing the response_count metric type

func (*MetricHandler) WriteResponseCodeMetric

func (h *MetricHandler) WriteResponseCodeMetric(statusCode int) error

WriteResponseCodeMetric will record observed response codes and emitResponseCodeMetric writes to cloud monarch

Jump to

Keyboard shortcuts

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