Documentation ¶
Overview ¶
Copyright 2023 PayPal Inc. Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2023 PayPal Inc.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright 2023 PayPal Inc.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- Variables
- func Finalize()
- func GetCounter(counterName CMetric) (chan DataPoint, error)
- func InitMetricProvider(config *otelCfg.Config)
- func InitSystemMetrics(serverType ServerType, workerStats [][]stats.IState)
- func Initialize(args ...interface{}) (err error)
- func IsEnabled() bool
- func NewHTTPExporter(ctx context.Context) (metric.Exporter, error)
- func NewMeterProvider(ctx context.Context, cfg otelCfg.Config, vis ...metric.View) (*metric.MeterProvider, error)
- func PopulateJunoMetricNamePrefix(metricName string) string
- func RecordCount(counterName CMetric, tags []Tags)
- func RecordOperation(opType string, status proto.OpStatus, latency int64)
- func RecordOutboundConnection(endpoint string, status string, latency int64)
- func RecordReplication(opType string, status string, destination string, latency int64)
- func RecordSSConnection(endpoint string, status string, latency int64)
- type CMetric
- type DataPoint
- type GaugeMetric
- type ServerType
- type StateData
- type Tags
Constants ¶
const ( Target = string("target") Endpoint = string("target_ip_port") Operation = string("operation") Client = string("client_app") Status = string("status") Fatal = string("Fatal") Error = string("Error") Warn = string("Warning") Success = string("Success") SS_RB_expire = string("SS_RB_expire") SSReqTimeout = string("SSReqTimeout") SSMarkDown = string("Down") SSMarkUp = string("Up") TLS_version = string("tls_version") Cipher = string("cipher") Ssl_r = string("ssl_r") )
const ( SvrTypeProxy = ServerType(1) SvrTypeStorage = ServerType(2) SvrTypeClusterMgr = ServerType(3) SvrTypeAll = ServerType(6) )
const ( StatusSuccess string = "SUCCESS" StatusFatal string = "FATAL" StatusError string = "ERROR" StatusWarning string = "WARNING" StatusUnknown string = "UNKNOWN" )
OTEl Status
const ( MachineCpuUsed string = string("machineCpuUsed") ProcessCpuUsed string = string("machineCpuUsed") MachineMemoryUsed ProcessMemoryUsed )
const COLLECTOR_POLLING_INTERVAL_SECONDS int32 = 5
const DEFAULT_GRPC_OTEL_COLLECTOR_PORT string = "4317"
const DEFAULT_HTTP_OTEL_COLLECTOR_PORT string = "4318"
const DEFAULT_OTEL_COLLECTOR_PROTOCOL string = "http"
default OTEL configurations point to QA collector
const DEFAULT_OTEL_COLLECTOR__IP string = "0.0.0.0"
const JUNO_METRIC_PREFIX = "juno.server."
const MeterName = "juno-server-meter"
Variables ¶
var GaugeMetricList = []*GaugeMetric{ {"pCPU", "proc_cpu_used", "CPU utilization of individual Juno instance", nil, nil, &processCpuUsedOnce, SvrTypeAll}, {"pMem", "proc_mem_used", "Memory utilization of individual Juno instance", nil, nil, &processMemoryUsedOnce, SvrTypeAll}, {"nBShd", "bad_shard", "Number of bad shards", nil, nil, &badShardOnce, SvrTypeProxy}, {"nAShd", "alert_shard", "number of shards with no redundancy", nil, nil, &alertShardOnce, SvrTypeProxy}, {"nWShd", "warning_shard", "number of shards with bad SS", nil, nil, &warningShardOnce, SvrTypeProxy}, {"conns", "conns_count", "number of current TCP connections", nil, nil, &TCPConnCountOnce, SvrTypeProxy}, {"ssl_conns", "conns_ssl_count", "number of current SSL connections", nil, nil, &SSLConnCountOnce, SvrTypeProxy}, {"keys", "key_count", "Key Counte in rocksDB", nil, nil, &keyCountOnce, SvrTypeStorage}, {"free", "free_mb_storage_space", "Free Storage Space (mbytes)", nil, nil, &freeStorageOnce, SvrTypeStorage}, {"used", "storage_used_mb", "Used Storage Space (mbytes)", nil, nil, &usedStorageOnce, SvrTypeStorage}, {"LN", "LN_level", "Max LN Level in Rocksdb", nil, nil, &LNLevelOnce, SvrTypeStorage}, {"compSec", "compaction_sec", "Compaction Sec", nil, nil, &compSecOnce, SvrTypeStorage}, {"compCount", "compaction_count", "Compaction Count", nil, nil, &compCountOnce, SvrTypeStorage}, {"pCompKB", "pending_compaction", "Pending Compaction KBytes", nil, nil, &pendingCompOnce, SvrTypeStorage}, {"stall", "stall_write_rate", "Actural Delayed Write Rate", nil, nil, &stallOnce, SvrTypeStorage}, }
var OTEL_COLLECTOR_PROTOCOL string = DEFAULT_OTEL_COLLECTOR_PROTOCOL
Functions ¶
func GetCounter ¶
func InitMetricProvider ¶
func InitSystemMetrics ¶
func InitSystemMetrics(serverType ServerType, workerStats [][]stats.IState)
func Initialize ¶
func Initialize(args ...interface{}) (err error)
func NewMeterProvider ¶
func RecordCount ¶
func RecordOperation ¶
This is the pp.app.intbound metric
func RecordReplication ¶
func RecordSSConnection ¶
Types ¶
type CMetric ¶
type CMetric int
************************************ Types ****************************
type GaugeMetric ¶
type ServerType ¶
type ServerType int
type StateData ¶
type StateData struct { Name string Value float64 Dimensions instrument.MeasurementOption }
Represents stats by a worker