Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit d537567

Browse files
author
Noah Hanjun Lee
authored
Fix the name of metrics (#182)
1 parent 19ec584 commit d537567

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

docs/concepts/metrics.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,12 @@ Gitploy provides the following Gitploy metrics. *Note that Some metrics are prov
3232

3333
* **gitploy_requests_total** <br/> How many HTTP requests processed, partitioned by status code and HTTP method.
3434
* **gitploy_request_duration_seconds**<br/> The HTTP request latencies in seconds
35-
* **gitploy_deployment_count** <br/> The total deployment count of the production deployments.
36-
* **gitploy_rollback_count**<br/> The total rollback count of the production deployments.
37-
* **gitploy_line_additions**<br/> The total added lines of the production deployments.
38-
* **gitploy_line_deletions**<br/> The total deleted lines of the production deployments.
39-
* **gitploy_line_changes**<br/> The total changed lines of the production deployments.
40-
* **gitploy_lead_time_seconds**<br/> The total amount of time it takes a commit to get into the production environments.
41-
* **gitploy_commit_count**<br/> The total commit count of production deployments.
35+
* **gitploy_total_deployment_count** <br/> The total deployment count of the production deployments.
36+
* **gitploy_total_rollback_count**<br/> The total rollback count of the production deployments.
37+
* **gitploy_total_line_additions**<br/> The total added lines of the production deployments.
38+
* **gitploy_total_line_deletions**<br/> The total deleted lines of the production deployments.
39+
* **gitploy_total_line_changes**<br/> The total changed lines of the production deployments.
40+
* **gitploy_total_lead_time_seconds**<br/> The total amount of time it takes a commit to get into the production environments.
41+
* **gitploy_total_commit_count**<br/> The total commit count of production deployments.
4242
* **gitploy_member_count**<br/> The total count of members.
4343
* **gitploy_member_limit**<br/> The limit count of members.

internal/server/metrics/metrics.go

+7-7
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func (c *collector) Collect(ch chan<- prometheus.Metric) {
118118
prometheus.BuildFQName(
119119
namespace,
120120
"",
121-
"deployment_count",
121+
"total_deployment_count",
122122
),
123123
"The total deployment count of the production deployments.",
124124
[]string{"namespace", "name", "env"},
@@ -134,7 +134,7 @@ func (c *collector) Collect(ch chan<- prometheus.Metric) {
134134
prometheus.BuildFQName(
135135
namespace,
136136
"",
137-
"rollback_count",
137+
"total_rollback_count",
138138
),
139139
"The total rollback count of the production deployments.",
140140
[]string{"namespace", "name", "env"},
@@ -150,7 +150,7 @@ func (c *collector) Collect(ch chan<- prometheus.Metric) {
150150
prometheus.BuildFQName(
151151
namespace,
152152
"",
153-
"line_additions",
153+
"total_line_additions",
154154
),
155155
"The total added lines of the production deployments.",
156156
[]string{"namespace", "name", "env"},
@@ -166,7 +166,7 @@ func (c *collector) Collect(ch chan<- prometheus.Metric) {
166166
prometheus.BuildFQName(
167167
namespace,
168168
"",
169-
"line_deletions",
169+
"total_line_deletions",
170170
),
171171
"The total deleted lines of the production deployments.",
172172
[]string{"namespace", "name", "env"},
@@ -182,7 +182,7 @@ func (c *collector) Collect(ch chan<- prometheus.Metric) {
182182
prometheus.BuildFQName(
183183
namespace,
184184
"",
185-
"line_changes",
185+
"total_line_changes",
186186
),
187187
"The total changed lines of the production deployments.",
188188
[]string{"namespace", "name", "env"},
@@ -198,7 +198,7 @@ func (c *collector) Collect(ch chan<- prometheus.Metric) {
198198
prometheus.BuildFQName(
199199
namespace,
200200
"",
201-
"lead_time_seconds",
201+
"total_lead_time_seconds",
202202
),
203203
"The total amount of time it takes a commit to get into the production environments.",
204204
[]string{"namespace", "name", "env"},
@@ -214,7 +214,7 @@ func (c *collector) Collect(ch chan<- prometheus.Metric) {
214214
prometheus.BuildFQName(
215215
namespace,
216216
"",
217-
"commit_count",
217+
"total_commit_count",
218218
),
219219
"The total commit count of production deployments.",
220220
[]string{"namespace", "name", "env"},

0 commit comments

Comments
 (0)