MINOR: contrib/prometheus-exporter: Don't needlessly set empty label for metrics
There is no reason to define empty labels for metrics. By default, all labels are initialized to an empty ist.
This commit is contained in:
parent
b9577450ea
commit
0175b1f0b7
|
@ -750,169 +750,17 @@ const struct ist promex_st_metric_desc[ST_F_TOTAL_FIELDS] = {
|
|||
|
||||
/* Specific labels for all info fields. Empty by default. */
|
||||
const struct ist promex_inf_metric_labels[INF_TOTAL_FIELDS] = {
|
||||
[INF_NAME] = IST(""),
|
||||
[INF_VERSION] = IST(""),
|
||||
[INF_RELEASE_DATE] = IST(""),
|
||||
[INF_BUILD_INFO] = IST(PROMEX_BUILDINFO_LABEL),
|
||||
[INF_NBTHREAD] = IST(""),
|
||||
[INF_NBPROC] = IST(""),
|
||||
[INF_PROCESS_NUM] = IST(""),
|
||||
[INF_PID] = IST(""),
|
||||
[INF_UPTIME] = IST(""),
|
||||
[INF_UPTIME_SEC] = IST(""),
|
||||
[INF_START_TIME_SEC] = IST(""),
|
||||
[INF_MEMMAX_BYTES] = IST(""),
|
||||
[INF_POOL_ALLOC_BYTES] = IST(""),
|
||||
[INF_POOL_USED_BYTES] = IST(""),
|
||||
[INF_POOL_FAILED] = IST(""),
|
||||
[INF_ULIMIT_N] = IST(""),
|
||||
[INF_MAXSOCK] = IST(""),
|
||||
[INF_MAXCONN] = IST(""),
|
||||
[INF_HARD_MAXCONN] = IST(""),
|
||||
[INF_CURR_CONN] = IST(""),
|
||||
[INF_CUM_CONN] = IST(""),
|
||||
[INF_CUM_REQ] = IST(""),
|
||||
[INF_MAX_SSL_CONNS] = IST(""),
|
||||
[INF_CURR_SSL_CONNS] = IST(""),
|
||||
[INF_CUM_SSL_CONNS] = IST(""),
|
||||
[INF_MAXPIPES] = IST(""),
|
||||
[INF_PIPES_USED] = IST(""),
|
||||
[INF_PIPES_FREE] = IST(""),
|
||||
[INF_CONN_RATE] = IST(""),
|
||||
[INF_CONN_RATE_LIMIT] = IST(""),
|
||||
[INF_MAX_CONN_RATE] = IST(""),
|
||||
[INF_SESS_RATE] = IST(""),
|
||||
[INF_SESS_RATE_LIMIT] = IST(""),
|
||||
[INF_MAX_SESS_RATE] = IST(""),
|
||||
[INF_SSL_RATE] = IST(""),
|
||||
[INF_SSL_RATE_LIMIT] = IST(""),
|
||||
[INF_MAX_SSL_RATE] = IST(""),
|
||||
[INF_SSL_FRONTEND_KEY_RATE] = IST(""),
|
||||
[INF_SSL_FRONTEND_MAX_KEY_RATE] = IST(""),
|
||||
[INF_SSL_FRONTEND_SESSION_REUSE_PCT] = IST(""),
|
||||
[INF_SSL_BACKEND_KEY_RATE] = IST(""),
|
||||
[INF_SSL_BACKEND_MAX_KEY_RATE] = IST(""),
|
||||
[INF_SSL_CACHE_LOOKUPS] = IST(""),
|
||||
[INF_SSL_CACHE_MISSES] = IST(""),
|
||||
[INF_COMPRESS_BPS_IN] = IST(""),
|
||||
[INF_COMPRESS_BPS_OUT] = IST(""),
|
||||
[INF_COMPRESS_BPS_RATE_LIM] = IST(""),
|
||||
[INF_ZLIB_MEM_USAGE] = IST(""),
|
||||
[INF_MAX_ZLIB_MEM_USAGE] = IST(""),
|
||||
[INF_TASKS] = IST(""),
|
||||
[INF_RUN_QUEUE] = IST(""),
|
||||
[INF_IDLE_PCT] = IST(""),
|
||||
[INF_NODE] = IST(""),
|
||||
[INF_DESCRIPTION] = IST(""),
|
||||
[INF_STOPPING] = IST(""),
|
||||
[INF_JOBS] = IST(""),
|
||||
[INF_UNSTOPPABLE_JOBS] = IST(""),
|
||||
[INF_LISTENERS] = IST(""),
|
||||
[INF_ACTIVE_PEERS] = IST(""),
|
||||
[INF_CONNECTED_PEERS] = IST(""),
|
||||
[INF_DROPPED_LOGS] = IST(""),
|
||||
[INF_BUSY_POLLING] = IST(""),
|
||||
[INF_FAILED_RESOLUTIONS] = IST(""),
|
||||
[INF_TOTAL_BYTES_OUT] = IST(""),
|
||||
[INF_TOTAL_SPLICED_BYTES_OUT] = IST(""),
|
||||
[INF_BYTES_OUT_RATE] = IST(""),
|
||||
[INF_DEBUG_COMMANDS_ISSUED] = IST(""),
|
||||
[INF_BUILD_INFO] = IST(PROMEX_BUILDINFO_LABEL),
|
||||
};
|
||||
|
||||
/* Specific labels for all stats fields. Empty by default. */
|
||||
const struct ist promex_st_metric_labels[ST_F_TOTAL_FIELDS] = {
|
||||
[ST_F_PXNAME] = IST(""),
|
||||
[ST_F_SVNAME] = IST(""),
|
||||
[ST_F_QCUR] = IST(""),
|
||||
[ST_F_QMAX] = IST(""),
|
||||
[ST_F_SCUR] = IST(""),
|
||||
[ST_F_SMAX] = IST(""),
|
||||
[ST_F_SLIM] = IST(""),
|
||||
[ST_F_STOT] = IST(""),
|
||||
[ST_F_BIN] = IST(""),
|
||||
[ST_F_BOUT] = IST(""),
|
||||
[ST_F_DREQ] = IST(""),
|
||||
[ST_F_DRESP] = IST(""),
|
||||
[ST_F_EREQ] = IST(""),
|
||||
[ST_F_ECON] = IST(""),
|
||||
[ST_F_ERESP] = IST(""),
|
||||
[ST_F_WRETR] = IST(""),
|
||||
[ST_F_WREDIS] = IST(""),
|
||||
[ST_F_STATUS] = IST(""),
|
||||
[ST_F_WEIGHT] = IST(""),
|
||||
[ST_F_ACT] = IST(""),
|
||||
[ST_F_BCK] = IST(""),
|
||||
[ST_F_CHKFAIL] = IST(""),
|
||||
[ST_F_CHKDOWN] = IST(""),
|
||||
[ST_F_LASTCHG] = IST(""),
|
||||
[ST_F_DOWNTIME] = IST(""),
|
||||
[ST_F_QLIMIT] = IST(""),
|
||||
[ST_F_PID] = IST(""),
|
||||
[ST_F_IID] = IST(""),
|
||||
[ST_F_SID] = IST(""),
|
||||
[ST_F_THROTTLE] = IST(""),
|
||||
[ST_F_LBTOT] = IST(""),
|
||||
[ST_F_TRACKED] = IST(""),
|
||||
[ST_F_TYPE] = IST(""),
|
||||
[ST_F_RATE] = IST(""),
|
||||
[ST_F_RATE_LIM] = IST(""),
|
||||
[ST_F_RATE_MAX] = IST(""),
|
||||
[ST_F_CHECK_STATUS] = IST(""),
|
||||
[ST_F_CHECK_CODE] = IST(""),
|
||||
[ST_F_CHECK_DURATION] = IST(""),
|
||||
[ST_F_HRSP_1XX] = IST("code=\"1xx\""),
|
||||
[ST_F_HRSP_2XX] = IST("code=\"2xx\""),
|
||||
[ST_F_HRSP_3XX] = IST("code=\"3xx\""),
|
||||
[ST_F_HRSP_4XX] = IST("code=\"4xx\""),
|
||||
[ST_F_HRSP_5XX] = IST("code=\"5xx\""),
|
||||
[ST_F_HRSP_OTHER] = IST("code=\"other\""),
|
||||
[ST_F_HANAFAIL] = IST(""),
|
||||
[ST_F_REQ_RATE] = IST(""),
|
||||
[ST_F_REQ_RATE_MAX] = IST(""),
|
||||
[ST_F_REQ_TOT] = IST(""),
|
||||
[ST_F_CLI_ABRT] = IST(""),
|
||||
[ST_F_SRV_ABRT] = IST(""),
|
||||
[ST_F_COMP_IN] = IST(""),
|
||||
[ST_F_COMP_OUT] = IST(""),
|
||||
[ST_F_COMP_BYP] = IST(""),
|
||||
[ST_F_COMP_RSP] = IST(""),
|
||||
[ST_F_LASTSESS] = IST(""),
|
||||
[ST_F_LAST_CHK] = IST(""),
|
||||
[ST_F_LAST_AGT] = IST(""),
|
||||
[ST_F_QTIME] = IST(""),
|
||||
[ST_F_CTIME] = IST(""),
|
||||
[ST_F_RTIME] = IST(""),
|
||||
[ST_F_TTIME] = IST(""),
|
||||
[ST_F_AGENT_STATUS] = IST(""),
|
||||
[ST_F_AGENT_CODE] = IST(""),
|
||||
[ST_F_AGENT_DURATION] = IST(""),
|
||||
[ST_F_CHECK_DESC] = IST(""),
|
||||
[ST_F_AGENT_DESC] = IST(""),
|
||||
[ST_F_CHECK_RISE] = IST(""),
|
||||
[ST_F_CHECK_FALL] = IST(""),
|
||||
[ST_F_CHECK_HEALTH] = IST(""),
|
||||
[ST_F_AGENT_RISE] = IST(""),
|
||||
[ST_F_AGENT_FALL] = IST(""),
|
||||
[ST_F_AGENT_HEALTH] = IST(""),
|
||||
[ST_F_ADDR] = IST(""),
|
||||
[ST_F_COOKIE] = IST(""),
|
||||
[ST_F_MODE] = IST(""),
|
||||
[ST_F_ALGO] = IST(""),
|
||||
[ST_F_CONN_RATE] = IST(""),
|
||||
[ST_F_CONN_RATE_MAX] = IST(""),
|
||||
[ST_F_CONN_TOT] = IST(""),
|
||||
[ST_F_INTERCEPTED] = IST(""),
|
||||
[ST_F_DCON] = IST(""),
|
||||
[ST_F_DSES] = IST(""),
|
||||
[ST_F_WREW] = IST(""),
|
||||
[ST_F_CONNECT] = IST(""),
|
||||
[ST_F_REUSE] = IST(""),
|
||||
[ST_F_CACHE_LOOKUPS] = IST(""),
|
||||
[ST_F_CACHE_HITS] = IST(""),
|
||||
[ST_F_IDLE_CONN_CUR] = IST(""),
|
||||
[ST_F_SAFE_CONN_CUR] = IST(""),
|
||||
[ST_F_USED_CONN_CUR] = IST(""),
|
||||
[ST_F_NEED_CONN_EST] = IST(""),
|
||||
[ST_F_HRSP_1XX] = IST("code=\"1xx\""),
|
||||
[ST_F_HRSP_2XX] = IST("code=\"2xx\""),
|
||||
[ST_F_HRSP_3XX] = IST("code=\"3xx\""),
|
||||
[ST_F_HRSP_4XX] = IST("code=\"4xx\""),
|
||||
[ST_F_HRSP_5XX] = IST("code=\"5xx\""),
|
||||
[ST_F_HRSP_OTHER] = IST("code=\"other\""),
|
||||
};
|
||||
|
||||
/* Type for all info fields. "untyped" is used for unsupported field. */
|
||||
|
|
Loading…
Reference in New Issue