[PR #1330] feat: Add tasks_completed_total Prometheus metric #1425

Open
opened 2025-11-01 21:18:48 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-vikunja/vikunja/pull/1330
Author: @s1lverkin
Created: 8/21/2025
Status: 🔄 Open

Base: mainHead: patch-2


📝 Commits (2)

📊 Changes

2 files changed (+19 additions, -0 deletions)

View changed files

📝 pkg/metrics/metrics.go (+10 -0)
📝 pkg/models/tasks.go (+9 -0)

📄 Description

This commit introduces a new Prometheus metric, vikunja_tasks_completed_total, to monitor user productivity and instance activity.

The counter is incremented every time a task is marked as complete (i.e., its 'done' status changes from false to true). This provides valuable insight into how actively the platform is being used.

Changes include:

  • Registering the new metric in pkg/metrics/metrics.go.
  • Adding an IncCount helper function for easier metric manipulation.
  • Implementing the increment logic within the Update method in pkg/models/tasks.go.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-vikunja/vikunja/pull/1330 **Author:** [@s1lverkin](https://github.com/s1lverkin) **Created:** 8/21/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `patch-2` --- ### 📝 Commits (2) - [`e37c24d`](https://github.com/go-vikunja/vikunja/commit/e37c24d9a20969436e801a495b1df915cbae1085) Update tasks.go - [`5037a31`](https://github.com/go-vikunja/vikunja/commit/5037a31d7a283c5d292a074cb0e485661ccb6877) Update metrics.go ### 📊 Changes **2 files changed** (+19 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `pkg/metrics/metrics.go` (+10 -0) 📝 `pkg/models/tasks.go` (+9 -0) </details> ### 📄 Description This commit introduces a new Prometheus metric, `vikunja_tasks_completed_total`, to monitor user productivity and instance activity. The counter is incremented every time a task is marked as complete (i.e., its 'done' status changes from false to true). This provides valuable insight into how actively the platform is being used. Changes include: - Registering the new metric in `pkg/metrics/metrics.go`. - Adding an `IncCount` helper function for easier metric manipulation. - Implementing the increment logic within the `Update` method in `pkg/models/tasks.go`. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the
pull-request
label 2025-11-01 21:18:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/vikunja#1425
No description provided.