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

Commit 8f1b93b

Browse files
author
Noah Hanjun Lee
authored
Add metrics about changes of deployment (#169)
* Add the repo_id field to DeploymentStatistics * Add the 'production_environment' field * Add the 'rollback' field to count rollback * Fix to produce statistics only for the production environment * Produce statistics of changes of deployment from the latest deployment * Add docs of metrics * Add the 'IsProductionEnvironment' method to fix test
1 parent 401b1a4 commit 8f1b93b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+2582
-500
lines changed

docs/concepts/metrics.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,14 @@ scrape_configs:
2828

2929
## Gitploy Metrics
3030

31-
Gitploy provides the following Gitploy metrics:
31+
Gitploy provides the following Gitploy metrics. *Note that Some metrics are provided only for the production environment* (i.e. `production_environment: true` in the configuration file).
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 count of success deployment for each environment, respectively.
35+
* **gitploy_deployment_count** <br/> The count of success deployment of the production environment.
36+
* **gitploy_rollback_count**<br/> The count of rollback of the production environment.
37+
* **gitploy_line_additions**<br/> The count of added lines from the latest deployment of the production environment.
38+
* **gitploy_line_deletions**<br/> The count of deleted lines from the latest deployment of the production environment.
39+
* **gitploy_line_changes**<br/> The count of changed lines from the latest deployment of the production environment.
3640
* **gitploy_member_count**<br/> The total count of members.
37-
* **gitploy_member_limit**<br/> The limit count of members.
41+
* **gitploy_member_limit**<br/> The limit count of members.

ent/client.go

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ent/deployment.go

Lines changed: 11 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ent/deployment/deployment.go

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ent/deployment/where.go

Lines changed: 21 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ent/deployment_create.go

Lines changed: 29 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ent/deployment_update.go

Lines changed: 42 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)