[PR #5256] [MERGED] Prometheus endpoint #17728

Closed
opened 2025-11-02 15:21:11 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/5256
Author: @gaydin
Created: 11/2/2018
Status: Merged
Merged: 11/5/2018
Merged by: @techknowlogick

Base: masterHead: master


📝 Commits (10+)

  • 2fdfd72 Add prometheus collector and route
  • 8442d43 dep ensure -add github.com/prometheus/client_golang/prometheus
  • 05854dc dep ensure -update github.com/golang/protobuf
  • 4bf3b98 add metrics to reserved usernames
  • 59a59e2 add comment head in metrics package
  • 97e8b33 fix style imports
  • 5ef631e add metrics settings
  • 5e39a9e add bearer token check
  • 2a2c059 mapping metrics configs
  • 3594568 fix lint

📊 Changes

112 files changed (+24655 additions, -2973 deletions)

View changed files

📝 Gopkg.lock (+66 -2)
📝 Gopkg.toml (+4 -0)
📝 custom/conf/app.ini.sample (+6 -0)
📝 docs/content/doc/advanced/config-cheat-sheet.en-us.md (+5 -0)
📝 models/user.go (+1 -0)
modules/metrics/collector.go (+299 -0)
📝 modules/setting/setting.go (+11 -0)
routers/metrics.go (+30 -0)
📝 routers/routes/routes.go (+10 -0)
vendor/github.com/beorn7/perks/LICENSE (+20 -0)
vendor/github.com/beorn7/perks/quantile/stream.go (+316 -0)
📝 vendor/github.com/golang/protobuf/LICENSE (+0 -3)
📝 vendor/github.com/golang/protobuf/proto/clone.go (+43 -13)
📝 vendor/github.com/golang/protobuf/proto/decode.go (+167 -607)
vendor/github.com/golang/protobuf/proto/discard.go (+350 -0)
📝 vendor/github.com/golang/protobuf/proto/encode.go (+32 -1154)
📝 vendor/github.com/golang/protobuf/proto/equal.go (+44 -20)
📝 vendor/github.com/golang/protobuf/proto/extensions.go (+233 -89)
📝 vendor/github.com/golang/protobuf/proto/lib.go (+110 -25)
📝 vendor/github.com/golang/protobuf/proto/message_set.go (+69 -35)

...and 80 more files

📄 Description

I want to try to finish the task #2751, initial commits are based on #678

I need help on several issues:
1. How can l make an authorization token?
It is necessary to use a token in app.ini and make it accessible from the section /admin?
Is need to make token in modules/gererate and save in configuration,If the token doesn't exist in configuration?

2. Do I need to add "metrics" in a reservedUsernames?
3. How can l correct dependencies?
This PR is build successfully just if update it manually github.com/golang/protobuf

sorry for my bad english :)


🔄 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-gitea/gitea/pull/5256 **Author:** [@gaydin](https://github.com/gaydin) **Created:** 11/2/2018 **Status:** ✅ Merged **Merged:** 11/5/2018 **Merged by:** [@techknowlogick](https://github.com/techknowlogick) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (10+) - [`2fdfd72`](https://github.com/go-gitea/gitea/commit/2fdfd728a73a756ba14fff0e13e5cdbb51c6a1dd) Add prometheus collector and route - [`8442d43`](https://github.com/go-gitea/gitea/commit/8442d43fd0cd38a2e4865ac0d81e6e4092fa4518) dep ensure -add github.com/prometheus/client_golang/prometheus - [`05854dc`](https://github.com/go-gitea/gitea/commit/05854dc356273164ae74f04207bbe91b40f47060) dep ensure -update github.com/golang/protobuf - [`4bf3b98`](https://github.com/go-gitea/gitea/commit/4bf3b98332058e62a68744336017b1689b0ca95b) add metrics to reserved usernames - [`59a59e2`](https://github.com/go-gitea/gitea/commit/59a59e2ac5893afa47e3339660b357154571b492) add comment head in metrics package - [`97e8b33`](https://github.com/go-gitea/gitea/commit/97e8b33912addebcc562ae363bc815cb38836153) fix style imports - [`5ef631e`](https://github.com/go-gitea/gitea/commit/5ef631e7cd28108687b0d7664a6ff83a5d22da27) add metrics settings - [`5e39a9e`](https://github.com/go-gitea/gitea/commit/5e39a9e5a32f7909332a2c2525109d8b5174987d) add bearer token check - [`2a2c059`](https://github.com/go-gitea/gitea/commit/2a2c0590e3e0d77a308eae316cd93fcebdd87c01) mapping metrics configs - [`3594568`](https://github.com/go-gitea/gitea/commit/35945688c4a41bb840bf3920e670d4e9d0ab1e59) fix lint ### 📊 Changes **112 files changed** (+24655 additions, -2973 deletions) <details> <summary>View changed files</summary> 📝 `Gopkg.lock` (+66 -2) 📝 `Gopkg.toml` (+4 -0) 📝 `custom/conf/app.ini.sample` (+6 -0) 📝 `docs/content/doc/advanced/config-cheat-sheet.en-us.md` (+5 -0) 📝 `models/user.go` (+1 -0) ➕ `modules/metrics/collector.go` (+299 -0) 📝 `modules/setting/setting.go` (+11 -0) ➕ `routers/metrics.go` (+30 -0) 📝 `routers/routes/routes.go` (+10 -0) ➕ `vendor/github.com/beorn7/perks/LICENSE` (+20 -0) ➕ `vendor/github.com/beorn7/perks/quantile/stream.go` (+316 -0) 📝 `vendor/github.com/golang/protobuf/LICENSE` (+0 -3) 📝 `vendor/github.com/golang/protobuf/proto/clone.go` (+43 -13) 📝 `vendor/github.com/golang/protobuf/proto/decode.go` (+167 -607) ➕ `vendor/github.com/golang/protobuf/proto/discard.go` (+350 -0) 📝 `vendor/github.com/golang/protobuf/proto/encode.go` (+32 -1154) 📝 `vendor/github.com/golang/protobuf/proto/equal.go` (+44 -20) 📝 `vendor/github.com/golang/protobuf/proto/extensions.go` (+233 -89) 📝 `vendor/github.com/golang/protobuf/proto/lib.go` (+110 -25) 📝 `vendor/github.com/golang/protobuf/proto/message_set.go` (+69 -35) _...and 80 more files_ </details> ### 📄 Description I want to try to finish the task #2751, initial commits are based on #678 ~~I need help on several issues~~: ~~1. How can l make an authorization token? It is necessary to use a token in app.ini and make it accessible from the section /admin? Is need to make token in modules/gererate and save in configuration,If the token doesn't exist in configuration?~~ ~~2. Do I need to add "metrics" in a [reservedUsernames](https://github.com/go-gitea/gitea/blob/master/models/user.go#L685)?~~ ~~3. How can l correct dependencies? This PR is build successfully just if update it manually github.com/golang/protobuf~~ sorry for my bad english :) --- <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-02 15:21:11 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#17728