metrics

package
v0.0.0-...-0f876b5 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2025 License: Apache-2.0 Imports: 0 Imported by: 3

Documentation

Index

Constants

View Source
const (
	GetCredentialsMetricName       = metadataServerMetricNamespace + ".GetCredentials"
	CrashErrorMetricName           = metadataServerMetricNamespace + ".Crash"
	ShutdownErrorMetricName        = metadataServerMetricNamespace + ".ShutdownError"
	InternalServerErrorMetricName  = metadataServerMetricNamespace + ".InternalServerError"
	GetTaskProtectionMetricName    = metadataServerMetricNamespace + ".GetTaskProtection"
	UpdateTaskProtectionMetricName = metadataServerMetricNamespace + ".UpdateTaskProtection"
	AuthConfigMetricName           = metadataServerMetricNamespace + ".AuthConfig"

	ResourceValidationMetricName = attachResourceResponderNamespace + ".Validation"

	TaskManifestHandlingDuration = taskManifestResponderNamespace + ".Duration"

	TaskStoppedMetricName = taskStopVerificationACKResponderNamespace + ".TaskStopped"

	CredentialsRefreshFailure = credsRefreshNamespace + ".Failure"
	CredentialsRefreshSuccess = credsRefreshNamespace + ".Success"

	ACSDisconnectTimeoutMetricName = agentAvailabilityNamespace + ".ACSDisconnectTimeout"
	TCSDisconnectTimeoutMetricName = agentAvailabilityNamespace + ".TCSDisconnectTimeout"

	ACSSessionCallName         = acsSessionNamespace + ".ACSConnect"
	ACSSessionCallDurationName = acsSessionNamespace + ".ACSConnectDuration"

	DiscoverPollEndpointCallName     = ecsClientNamespace + ".DiscoverPollEndpoint"
	DiscoverPollEndpointDurationName = ecsClientNamespace + ".DiscoverPollEndpointDuration"

	GetNetworkConfigurationByTaskMetricName = dbClientMetricNamespace + ".GetNetworkConfigurationByTask"
	SaveNetworkNamespaceMetricName          = dbClientMetricNamespace + ".SaveNetworkNamespace"
	GetNetworkNamespaceMetricName           = dbClientMetricNamespace + ".GetNetworkNamespace"
	DelNetworkNamespaceMetricName           = dbClientMetricNamespace + ".DeleteNetworkNamespace"
	AssignGeneveDstPortMetricName           = dbClientMetricNamespace + ".AssignGeneveDstPort"

	BuildNetworkNamespaceMetricName       = networkBuilderNamespace + ".BuildNetworkNamespace"
	DeleteNetworkNamespaceMetricName      = networkBuilderNamespace + ".DeleteNetworkNamespace"
	V2NDestinationPortExhaustedMetricName = networkBuilderNamespace + ".V2NDestinationPortExhausted"
	ReleaseGeneveDstPortMetricName        = dbClientMetricNamespace + ".ReleaseGeneveDstPort"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry interface {
	// WithFields allows the caller to set metric metadata. Once an entry object is
	// created (typically using a meaningful metrics name), its properties can be
	// manipulated using WithFields. Example:
	//
	// m := m.WithFields(map[string]interface{"timestamp": time.Now()})
	WithFields(f map[string]interface{}) Entry
	// WithCount allows the caller to set metric counts. This is useful for determining
	// if a particular operation has occurred or not. Example:
	//
	// item, ok := lookup(key)
	// if ok {
	//   lookupSuccessMetric = lookupSuccessMetric.WithCount(1)
	//   // Use item
	// } else {
	//   lookupSuccessMetric = lookupSuccessMetric.WithCount(0))
	// }
	WithCount(count int) Entry
	// WithGauge allows the caller to associate a specific value to the metric. This is useful
	// for reporting numerical values related to any operation, for instance the data transfer
	// rate for an image pull operation.
	WithGauge(value interface{}) Entry
	// Done makes a metric operation as complete. It records the end time of the operation and
	// flushes the metric to a persistent store.
	Done(err error)
}

Entry specifies methods that need to be implemented by a metrics entry object.

type EntryFactory

type EntryFactory interface {
	New(op string) Entry
	Flush()
}

EntryFactory specifies the factory interface for creating new Metric Entry objects.

func NewNopEntryFactory

func NewNopEntryFactory() EntryFactory

NewNopEntryFactory creates a metric log entry factory that doesn't log any metrics.

Directories

Path Synopsis
Package mock_metrics is a generated GoMock package.
Package mock_metrics is a generated GoMock package.

Jump to

Keyboard shortcuts

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