metrics

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MetricReader metric.Reader

Functions

func InitMetricsExporter

func InitMetricsExporter(metricsBackend string, port int) error

InitMetricsExporter initializes the metrics exporter for the specified metrics backend and port

func ReportAADExchangeDuration

func ReportAADExchangeDuration(ctx context.Context, duration int64, resourceType string)

ReportAADExchangeDuration reports the duration of an AAD exchange Attributes: resourceType: the scope of resource being exchanged (AKV or ACR)

func ReportACRExchangeDuration

func ReportACRExchangeDuration(ctx context.Context, duration int64, repository string)

ReportACRExchangeDuration reports the duration of an ACR exchange (AAD token for ACR refresh token) Attributes: repository: the repository being accessed

func ReportAKVCertificateDuration

func ReportAKVCertificateDuration(ctx context.Context, duration int64, certificateName string)

ReportAKVCertificateDuration reports the duration of an AKV certificate fetch Attributes: certificateName: the object name of the certificate

func ReportBlobCacheCount

func ReportBlobCacheCount(ctx context.Context, hit bool)

ReportBlobCacheCount reports a blob cache hit or miss Attributes: hit: whether the blob was found in the cache

func ReportMutationRequest

func ReportMutationRequest(ctx context.Context, duration int64)

ReportMutationRequest reports the duration of a mutation request

func ReportRegistryRequestCount

func ReportRegistryRequestCount(ctx context.Context, statusCode int, registryHost string)

ReportRegistryRequestCount reports a registry request Attributes: statusCode: the status code of the request registryHost: the host name of the registry

func ReportSystemError

func ReportSystemError(ctx context.Context, errorString string)

ReportSystemError reports a system error from the server handler Attributes: errorString: the error message

func ReportVerificationRequest

func ReportVerificationRequest(ctx context.Context, duration int64)

ReportVerificationRequest reports the duration of a verification request

func ReportVerifierDuration

func ReportVerifierDuration(ctx context.Context, duration int64, veriferName string, subjectReference string, success bool, isError bool)

ReportVerifierDuration reports the duration of a single verifier's execution Attributes: verifierName: the name of the verifier subjectReference: the subject reference of the verification success: whether the verification succeeded isError: whether the verification failed due to an error

Types

This section is empty.

Jump to

Keyboard shortcuts

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