metrics

package
v0.0.0-...-0611383 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package metrics contains all the metrics constants used in xds-relay.

Index

Constants

View Source
const (
	// scope: .server.*
	ScopeServer = "server"

	ServerAlive = "alive" // counter, 1 indicates that the server is running
)

.server

View Source
const (
	// scope: .orchestrator.$aggregated_key.*
	ScopeOrchestrator = "orchestrator"

	ScopeOrchestratorWatch       = "watch"
	OrchestratorWatchCreated     = "created"      // counter, # of watches created per aggregated key
	OrchestratorNackWatchCreated = "created_nack" // counter, # of watches created per aggregated key in NACK requests
	OrchestratorWatchCanceled    = "canceled"     // counter, # of watch cancels initiated per aggregated key
	OrchestratorWatchFanouts     = "fanout"       // counter, # of responses pushed downstream
	OrchestratorWatchDequeued    = "dequeued"     // counter, # of responses dequeued from the response channel

	// scope: .orchestrator.$aggregated_key.cache_evict.*
	ScopeOrchestratorCacheEvict            = "cache_evict"
	OrcheestratorCacheEvictCount           = "calls"            // counter, # of times cache evict is called
	OrchestratorOnCacheEvictedRequestCount = "requests_evicted" // counter, # of requests that were evicted

	// scope: .orchestrator.$aggregated_key.watch.errors.*
	ScopeOrchestratorWatchErrors = "errors"
	ErrorRegisterWatch           = "register"     // counter, # of errors as a result of watch registration in the cache
	ErrorChannelFull             = "channel_full" // counter, # of response fanout failures due to blocked channels
	ErrorUpstreamFailure         = "upstream"     // counter, # of errors as a result of a problem upstream
	ErrorCacheMiss               = "cache_miss"   // counter, # of errors due to a fanout attempt with no cached response

	TimerSendTime   = "send"   // timer, time taken for iterating all watches
	TimerFanoutTime = "fanout" // timer, time taken for response fanout completion
)

.orchestrator

View Source
const (
	// scope: .upstream.$xds.*
	ScopeUpstream = "upstream"

	// scope: .upstream.lds.*
	ScopeUpstreamLDS = "lds"
	// scope: .upstream.cds.*
	ScopeUpstreamCDS = "cds"
	// scope: .upstream.rds.*
	ScopeUpstreamRDS = "rds"
	// scope: .upstream.eds.*
	ScopeUpstreamEDS = "eds"

	UpstreamStreamOpened = "stream_opened" // counter, # of times a gRPC stream was opened to the origin server.

	UpstreamStreamRetry = "stream_retry" // counter, # of times a gRPC stream was opened to the origin server.

	UpstreamStreamCreationFailure = "stream_failure" // counter, # of times a gRPC stream creation failed.

	UpstreamConnected = "connected"
)

.upstream

View Source
const (
	// scope: .cache.$aggregated_key.*
	ScopeCache = "cache"

	// scope: .cache.$aggregated_key.fetch.*
	ScopeCacheFetch   = "fetch"
	CacheFetchAttempt = "attempt" // counter, # of cache fetches called
	CacheFetchMiss    = "miss"    // counter, # of cache fetches that resulted in a miss
	CacheFetchError   = "error"   // counter, # of errors while calling cache fetch
	CacheFetchExpired = "expired" // counter, # of cache entries expired while calling fetch

	// scope: .cache.$aggregated_key.set_response.*
	ScopeCacheSet   = "set_response"
	CacheSetAttempt = "attempt" // counter, # of cache sets called
	CacheSetSuccess = "success" // counter, # of cache sets succeeded
	CacheSetError   = "error"   // counter, # of errors while calling cache set

	// scope: .cache.$aggregated_key.add_request.*
	ScopeCacheAdd   = "add_request"
	CacheAddAttempt = "attempt" // counter, # of cache add requests called
	CacheAddSuccess = "success" // counter, # of cache add requests succeeded
	CacheAddError   = "error"   // counter, # of errors while calling cache add

	// scope: .cache.$aggregated_key.delete_request.*
	ScopeCacheDelete   = "delete_request"
	CacheDeleteAttempt = "attempt" // counter, # of cache delete requests called
	CacheDeleteSuccess = "success" // counter, # of cache delete requests succeeded
	CacheDeleteError   = "error"   // counter, # of errors while calling cache delete

	// scope: .cache.$aggregated_key.delete_key.*
	ScopeCacheDeleteKey   = "delete_key"
	CacheDeleteKeyAttempt = "attempt" // counter, # of cache delete key requests called
	CacheDeleteKeySuccess = "success" // counter, # of cache delete key requests succeeded
	CacheDeleteKeyError   = "error"   // counter, # of errors while calling cache delete key
)

.cache

View Source
const (
	// scope: .mapper.*
	ScopeMapper = "mapper"

	MapperSuccess = "success" // counter, # of successfully converted request to aggregated keys
	MapperError   = "error"   // counter, # of errors when converting a request to an aggregated key
)

.mapper

View Source
const (
	// scope: .upstream.error_interceptor.*
	ScopeErrorInterceptor = "error_interceptor"

	ErrorInterceptorErrorSendMsg = "error_sendmsg"
	ErrorInterceptorErrorRecvMsg = "error_recvmsg"
)

.upstream.error_interceptor

View Source
const TagName = "key"

Variables

This section is empty.

Functions

func CacheAddRequestSubscope

func CacheAddRequestSubscope(parent tally.Scope, aggregatedKey string) tally.Scope

CacheAddRequestSubscope gets the cache add request subscope and adds the aggregated key as a point tag. ex: .cache.add_request+key=$aggregated_key

func CacheDeleteKeySubscope

func CacheDeleteKeySubscope(parent tally.Scope, aggregatedKey string) tally.Scope

CacheDeleteKeySubscope gets the cache delete key subscope and adds the aggregated key as a point tag. ex: .cache.delete_key+key=$aggregated_key

func CacheDeleteRequestSubscope

func CacheDeleteRequestSubscope(parent tally.Scope, aggregatedKey string) tally.Scope

CacheDeleteRequestSubscope gets the cache delete request subscope and adds the aggregated key as a point tag. ex: .cache.delete_request+key=$aggregated_key

func CacheFetchSubscope

func CacheFetchSubscope(parent tally.Scope, aggregatedKey string) tally.Scope

CacheFetchSubscope gets the cache fetch subscope and adds the aggregated key as a point tag. ex: .cache.fetch+key=$aggregated_key

func CacheSetSubscope

func CacheSetSubscope(parent tally.Scope, aggregatedKey string) tally.Scope

CacheSetSubscope gets the cache set subscope and adds the aggregated key as a point tag. ex: .cache.set_response+key=$aggregated_key

func OrchestratorCacheEvictSubscope

func OrchestratorCacheEvictSubscope(parent tally.Scope, aggregatedKey string) tally.Scope

OrchestratorCacheEvictSubscope gets the orchestor cache evict subscope and adds the aggregated key as a point tag. ex: .orchestrator.cache_evict+key=$aggregated_key.

func OrchestratorWatchErrorsSubscope

func OrchestratorWatchErrorsSubscope(parent tally.Scope, aggregatedKey string) tally.Scope

OrchestratorWatchErrorsSubscope gets the orchestor watch errors subscope and adds the aggregated key as a point tag. ex: .orchestrator.watch.errors+key=$aggregated_key.

func OrchestratorWatchSubscope

func OrchestratorWatchSubscope(parent tally.Scope, aggregatedKey string) tally.Scope

OrchestratorWatchSubscope gets the orchestor watch subscope and adds the aggregated key as a point tag. ex: .orchestrator.watch+key=$aggregated_key

Types

This section is empty.

Jump to

Keyboard shortcuts

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