Documentation ¶
Index ¶
- Constants
- func AddConfigurationClientConn()
- func AddDiscoveryClientConn()
- func AddSDKClientConn()
- func GetClientInstanceTotal() prometheus.Gauge
- func GetConfigFileTotal() *prometheus.GaugeVec
- func GetConfigGroupTotal() *prometheus.GaugeVec
- func GetHttpHandler() http.Handler
- func GetInstanceAbnormalCountl() *prometheus.GaugeVec
- func GetInstanceCount() *prometheus.GaugeVec
- func GetInstanceIsolateCountl() *prometheus.GaugeVec
- func GetInstanceOnlineCountl() *prometheus.GaugeVec
- func GetMetricsPort() int32
- func GetRegistry() *prometheus.Registry
- func GetReleaseConfigFileTotal() *prometheus.GaugeVec
- func GetServiceAbnormalCountl() *prometheus.GaugeVec
- func GetServiceCount() *prometheus.GaugeVec
- func GetServiceOfflineCountl() *prometheus.GaugeVec
- func GetServiceOnlineCountl() *prometheus.GaugeVec
- func InitMetrics()
- func RecordCacheUpdateCost(cost time.Duration, cacheTye string, total int64)
- func RemoveConfigurationClientConn()
- func RemoveDiscoveryClientConn()
- func RemoveSDKClientConn()
- func ReportAddBatchJob(label string, count int64)
- func ReportDropInstanceRegisTask()
- func ReportFinishBatchJob(label string, count int64)
- func ReportInstanceRegisCost(cost time.Duration)
- func ReportRedisIsAlive()
- func ReportRedisIsDead()
- func ReportRedisReadFailure()
- func ReportRedisWriteFailure()
- func ResetConfigurationClientConn()
- func ResetDiscoveryClientConn()
- func ResetSDKClientConn()
- func ResourceOfConfigFile(group, name string) string
- func ResourceOfConfigFileList(group string) string
- func SetMetricsPort(port int32)
- type CallMetric
- type CallMetricType
- type ClientDiscoverMetric
- type ConfigMetricType
- type ConfigMetrics
- type DiscoveryMetric
- type DiscoveryMetricType
- type TrafficDirection
Constants ¶
const ( LabelServerNode = "polaris_server_instance" LabelNamespace = "namespace" LabelService = "service" LabelGroup = "group" LabelVersion = "version" LabelApi = "api" LabelApiType = "api_type" LabelProtocol = "protocol" LabelErrCode = "err_code" )
const ( ActionGetConfigFile = "GET_CONFIG_FILE" ActionListConfigFiles = "LIST_CONFIG_FILES" ActionListConfigGroups = "LIST_CONFIG_GROUPS" ActionPublishConfigFile = "PUBLISH_CONFIG_FILE" ActionDiscoverInstance = "DISCOVER_INSTANCE" ActionDiscoverServices = "DISCOVER_SERVICES" ActionDiscoverRouterRule = "DISCOVER_ROUTER_RULE" ActionDiscoverRateLimit = "DISCOVER_RATE_LIMIT" ActionDiscoverCircuitBreaker = "DISCOVER_CIRCUIT_BREAKER" ActionDiscoverFaultDetect = "DISCOVER_FAULT_DETECT" ActionDiscoverServiceContract = "DISCOVER_SERVICE_CONTRACT" )
Variables ¶
This section is empty.
Functions ¶
func AddConfigurationClientConn ¶ added in v1.14.0
func AddConfigurationClientConn()
AddConfigurationClientConn add configuration client connection number
func AddDiscoveryClientConn ¶ added in v1.14.0
func AddDiscoveryClientConn()
AddDiscoveryClientConn add discovery client connection number
func AddSDKClientConn ¶ added in v1.15.0
func AddSDKClientConn()
AddSDKClientConn add client connection number
func GetClientInstanceTotal ¶ added in v1.15.1
func GetClientInstanceTotal() prometheus.Gauge
func GetConfigFileTotal ¶ added in v1.15.1
func GetConfigFileTotal() *prometheus.GaugeVec
func GetConfigGroupTotal ¶ added in v1.15.1
func GetConfigGroupTotal() *prometheus.GaugeVec
func GetInstanceAbnormalCountl ¶ added in v1.15.1
func GetInstanceAbnormalCountl() *prometheus.GaugeVec
func GetInstanceCount ¶ added in v1.15.1
func GetInstanceCount() *prometheus.GaugeVec
func GetInstanceIsolateCountl ¶ added in v1.15.1
func GetInstanceIsolateCountl() *prometheus.GaugeVec
func GetInstanceOnlineCountl ¶ added in v1.15.1
func GetInstanceOnlineCountl() *prometheus.GaugeVec
func GetMetricsPort ¶ added in v1.14.0
func GetMetricsPort() int32
func GetReleaseConfigFileTotal ¶ added in v1.15.1
func GetReleaseConfigFileTotal() *prometheus.GaugeVec
func GetServiceAbnormalCountl ¶ added in v1.15.1
func GetServiceAbnormalCountl() *prometheus.GaugeVec
func GetServiceCount ¶ added in v1.15.1
func GetServiceCount() *prometheus.GaugeVec
func GetServiceOfflineCountl ¶ added in v1.15.1
func GetServiceOfflineCountl() *prometheus.GaugeVec
func GetServiceOnlineCountl ¶ added in v1.15.1
func GetServiceOnlineCountl() *prometheus.GaugeVec
func RecordCacheUpdateCost ¶ added in v1.14.2
RecordCacheUpdateCost record per cache update cost time
func RemoveConfigurationClientConn ¶ added in v1.14.0
func RemoveConfigurationClientConn()
RemoveConfigurationClientConn remove configuration client connection number
func RemoveDiscoveryClientConn ¶ added in v1.14.0
func RemoveDiscoveryClientConn()
RemoveDiscoveryClientConn remove discovery client connection number
func RemoveSDKClientConn ¶ added in v1.15.0
func RemoveSDKClientConn()
RemoveSDKClientConn remove client connection number
func ReportAddBatchJob ¶ added in v1.17.2
ReportAddBatchJob .
func ReportDropInstanceRegisTask ¶
func ReportDropInstanceRegisTask()
ReportDropInstanceRegisTask Record the number of registered tasks discarded
func ReportFinishBatchJob ¶ added in v1.17.2
ReportFinishBatchJob .
func ReportInstanceRegisCost ¶
ReportInstanceRegisCost Total time to report the short-term registered task of the reporting instance
func ReportRedisIsAlive ¶ added in v1.14.0
func ReportRedisIsAlive()
ReportRedisIsAlive report redis alive status is health
func ReportRedisIsDead ¶ added in v1.14.0
func ReportRedisIsDead()
ReportRedisIsDead report redis alive status is dead
func ReportRedisReadFailure ¶ added in v1.14.0
func ReportRedisReadFailure()
ReportRedisReadFailure report redis exec read operatio failure
func ReportRedisWriteFailure ¶ added in v1.14.0
func ReportRedisWriteFailure()
ReportRedisWriteFailure report redis exec write operatio failure
func ResetConfigurationClientConn ¶ added in v1.14.0
func ResetConfigurationClientConn()
ResetConfigurationClientConn reset configuration client connection number
func ResetDiscoveryClientConn ¶ added in v1.14.0
func ResetDiscoveryClientConn()
ResetDiscoveryClientConn reset discovery client connection number
func ResetSDKClientConn ¶ added in v1.15.0
func ResetSDKClientConn()
Conn reset client connection number
func ResourceOfConfigFile ¶ added in v1.18.0
func ResourceOfConfigFileList ¶ added in v1.18.0
func SetMetricsPort ¶ added in v1.14.0
func SetMetricsPort(port int32)
Types ¶
type CallMetric ¶ added in v1.15.0
type CallMetric struct { Type CallMetricType API string Protocol string Code int Times int Success bool Duration time.Duration Labels map[string]string TrafficDirection TrafficDirection }
func (CallMetric) GetLabels ¶ added in v1.15.0
func (m CallMetric) GetLabels() map[string]string
type CallMetricType ¶ added in v1.15.0
type CallMetricType string
CallMetricType .
const ( // SystemCallMetric Time consuming statistics of some asynchronous tasks inside SystemCallMetric CallMetricType = "system" // ServerCallMetric Apiserver-layer interface call consumption statistics ServerCallMetric CallMetricType = "api" // RedisCallMetric Redis call time consumption statistics RedisCallMetric CallMetricType = "redis" // StoreCallMetric Store call time consumption statistics StoreCallMetric CallMetricType = "store" // ProtobufCacheCallMetric PB encode cache call/hit statistics ProtobufCacheCallMetric CallMetricType = "pbCacheCall" // XDSResourceBuildCallMetric XDSResourceBuildCallMetric CallMetricType = "xds" )
type ClientDiscoverMetric ¶ added in v1.18.0
type ClientDiscoverMetric struct { ClientIP string Action string Namespace string Resource string Revision string Timestamp int64 CostTime int64 Success bool }
func (ClientDiscoverMetric) String ¶ added in v1.18.0
func (c ClientDiscoverMetric) String() string
type ConfigMetricType ¶ added in v1.15.0
type ConfigMetricType string
const ( ConfigGroupMetric ConfigMetricType = "config_group" FileMetric ConfigMetricType = "file" ReleaseFileMetric ConfigMetricType = "release_file" )
type ConfigMetrics ¶ added in v1.15.0
type ConfigMetrics struct { Type ConfigMetricType Total int64 Release int64 Labels map[string]string }
type DiscoveryMetric ¶ added in v1.15.0
type DiscoveryMetricType ¶ added in v1.15.0
type DiscoveryMetricType string
const ( ClientMetrics DiscoveryMetricType = "client" ServiceMetrics DiscoveryMetricType = "service" InstanceMetrics DiscoveryMetricType = "instance" )
type TrafficDirection ¶ added in v1.18.0
type TrafficDirection string
const ( // TrafficDirectionInBound . TrafficDirectionInBound TrafficDirection = "INBOUND" // TrafficDirectionOutBound . TrafficDirectionOutBound TrafficDirection = "OUTBOUND" )