Skip to content

MC-3230: Fix prometheus mapping names, wrap metrics tables to collapsible elements [v/5.7] #492

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: v/5.7
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
89 changes: 57 additions & 32 deletions docs/modules/integrate/pages/prometheus-metrics.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,18 @@ Updated metrics:
** Percentages as ratios (for example, 50% converts to 0.5)
* Append units to metric names
* Remove unit labels
* Append `_total` to accumulated metrics

The updated metrics are based on link:https://prometheus.io/docs/practices/naming/[Prometheus conventions].

The following examples illustrate the differences between the original and updated metrics.

* Rename and remove `unit` label:
* Rename and remove `unit` label, add `_total` suffix:
+
```
hz_map_queryCount{name="map-1",mc_member="127.0.0.1:5701",mc_cluster="Cluster-1",unit="COUNT",} 0.0 1737715903399

hazelcast_map_queries{name="map-1",mc_member="127.0.0.1:5701",mc_cluster="Cluster-1",} 0.0 1737715903399
hazelcast_map_queries_total{name="map-1",mc_member="127.0.0.1:5701",mc_cluster="Cluster-1",} 0.0 1737715903399
```

* Rename and append unit, remove `unit` label, convert value (1.7x10^12^ milliseconds to 1.7x10^9^ seconds):
Expand All @@ -56,6 +57,15 @@ hz_map_totalMaxRemoveLatency{name="map-1",mc_member="127.0.0.1:5701",mc_cluster=
hazelcast_map_latency_max_seconds{name="map-1",mc_member="127.0.0.1:5701",mc_cluster="Cluster-1",operation="remove",} 0.0 1737715903399
```

* Rename, append unit suffix and `_total` suffix, remove `unit` label, add `remove` label, convert value from milliseconds to seconds:
+
```
hz_map_totalPutLatency{name="map-1",mc_member="127.0.0.1:5701",mc_cluster="Cluster-1",unit="MS",} 2019.0 1743601193973

hazelcast_map_latency_seconds_total{name="map-1",mc_member="127.0.0.1:5701",mc_cluster="Cluster-1",operation="put",} 2.019 1743601193973
```


[[config]]
== Choose which set of metrics to use

Expand All @@ -75,21 +85,24 @@ Management Center converts all metrics for the `map`, `set` and `list` data stru

In some cases, several original metrics are combined into one and differentiated by labels. For example, `hazelcast_map_operations_total` replaces `hz_map_getCount` and `hz_map_setCount` by adding `operation="get"` and `operation="set"` labels.

.Map
[%collapsible]
====
|===
|Original metric `hz_` |Updated metric `hazelcast_` |Additional labels |Description

|map_backupCount
|map_backups
|map_backups_total
|n/a
|Number of backups per entry

|map_backupEntryCount
|map_entries_backup
|map_backup_entries_total
|n/a
|Number of backup entries held by the member

|map_backupEntryMemoryCost
|map_entries_backup_memory_cost
|map_backup_entries_memory_cost_bytes
|n/a
|Memory cost of backup entries in this member

Expand All @@ -99,17 +112,17 @@ In some cases, several original metrics are combined into one and differentiated
|Creation time of the map on the member

|map_dirtyEntryCount
|map_entries_dirty
|map_dirty_entries_total
|n/a
|Number of updated but not yet persisted entries (dirty entries) that the member owns

|map_evictionCount
|map_evictions
|map_evictions_total
|n/a
|Number of evictions on locally owned entries, excluding backups

|map_expirationCount
|map_expirations
|map_expirations_total
|n/a
|Number of expirations on locally owned entries, excluding backups

Expand All @@ -124,7 +137,7 @@ In some cases, several original metrics are combined into one and differentiated
|Total heap cost for the map on this member

|map_indexedQueryCount
|map_queries_indexed
|map_indexed_queries_total
|n/a
|Total number of indexed local queries performed on the map

Expand All @@ -139,7 +152,7 @@ In some cases, several original metrics are combined into one and differentiated
|Last update time of the locally owned entries

|map_lockedEntryCount
|map_entries_locked
|map_locked_entries_total
|n/a
|Number of locked entries that the member owns

Expand All @@ -149,7 +162,7 @@ In some cases, several original metrics are combined into one and differentiated
|Total heap cost of the Merkle trees used

|map_numberOfEvents
|map_events
|map_events_total
|n/a
|Number of local events received on the map

Expand All @@ -159,12 +172,12 @@ In some cases, several original metrics are combined into one and differentiated
|Total number of other operations performed on this member

|map_ownedEntryCount
|map_entries_owned
|map_owned_entries_total
|n/a
|Number of map entries owned by the member

|map_ownedEntryMemoryCost
|map_entries_owned_memory_cost
|map_owned_entry_memory_cost_bytes
|n/a
|Memory cost of owned map entries on this member

Expand All @@ -174,7 +187,7 @@ In some cases, several original metrics are combined into one and differentiated
|Number of local put operations on the map

|map_queryCount
|map_queries
|map_queries_total
|n/a
|Number of queries executed on the map (it may be imprecise for queries involving partition predicates (PartitionPredicate) on the off-heap storage)

Expand All @@ -189,12 +202,12 @@ In some cases, several original metrics are combined into one and differentiated
|Number of local set operations on the map

|map_hits
|map_hits
|map_hits_total
|n/a
|Number of reads of the locally owned entries; incremented for every read by any type of operation (get, set, put), so the entries should exist

|map_totalGetLatency
|map_latency_total_seconds
|map_latency_seconds_total
|get
|Total latency of local get operations on the map

Expand All @@ -204,7 +217,7 @@ In some cases, several original metrics are combined into one and differentiated
|Maximum latency of local get operations on the map

|map_totalPutLatency
|map_latency_total_seconds
|map_latency_seconds_total
|put
|Total latency of local put operations on the map

Expand All @@ -214,7 +227,7 @@ In some cases, several original metrics are combined into one and differentiated
|Maximum latency of local put operations on the map

|map_totalRemoveLatency
|map_latency_total_seconds
|map_latency_seconds_total
|remove
|Total latency of local remove operations on the map

Expand All @@ -224,7 +237,7 @@ In some cases, several original metrics are combined into one and differentiated
|Maximum latency of local remove operations on the map

|map_totalSetLatency
|map_latency_total_seconds
|map_latency_seconds_total
|set
|Total latency of local set operations on the map

Expand All @@ -239,52 +252,59 @@ In some cases, several original metrics are combined into one and differentiated
|Creation time of the index on this member

|map_index_hitCount
|map_index_hits
|map_index_hits_total
|n/a
|Total number of index hits (the value of this metric may be greater than the `map_index_queryCount` because a single query may hit the same index more than once)

|map_index_insertCount
|map_index_inserts
|map_index_inserts_total
|n/a
|Number of insert operations performed on the index

|map_index_memoryCost
|map_index_memory_cost
|map_index_memory_cost_bytes
|n/a
|Local memory cost of the index (for on-heap indexes in OBJECT or BINARY formats the returned value is a best-effort approximation and doesn't indicate a precise on-heap memory usage of the index)

|map_index_queryCount
|map_index_queries
|map_index_queries_total
|n/a
|Total number of queries served by the index

|map_index_removeCount
|map_index_removes
|map_index_removes_total
|n/a
|Number of remove operations performed on the index

|map_index_totalInsertLatency
|map_index_latency_total_seconds
|map_index_latency_seconds_total
|insert
|Total latency of insert operations performed on the index

|map_index_totalRemoveLatency
|map_index_latency_total_seconds
|map_index_latency_seconds_total
|remove
|Total latency of remove operations performed on the index

|map_index_totalUpdateLatency
|map_index_latency_total_seconds
|map_index_latency_seconds_total
|update
|Total latency of update operations performed on the index

|map_index_updateCount
|map_index_updates
|map_index_updates_total
|n/a
|Number of update operations performed on the index
|===
====

.Set
[%collapsible]
====
|===
|Original metric `hz_` |Updated metric `hazelcast_` |Additional labels |Description
|set_creationTime
|set_creation_timestamp
|set_creation_timestamp_seconds
|n/a
|Creation time of the set on the member

Expand All @@ -297,7 +317,14 @@ In some cases, several original metrics are combined into one and differentiated
|set_last_update_timestamp_seconds
|n/a
|Last update time of the locally owned items
|===
====

.List
[%collapsible]
====
|===
|Original metric `hz_` |Updated metric `hazelcast_` |Additional labels |Description
|list_creationTime
|list_creation_timestamp_seconds
|n/a
Expand All @@ -312,7 +339,5 @@ In some cases, several original metrics are combined into one and differentiated
|list_last_update_timestamp_seconds
|n/a
|Last update time of the locally owned items

|===


====