Skip to content
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

Prometheus endpoint #5256

Merged
merged 13 commits into from
Nov 5, 2018
Merged

Prometheus endpoint #5256

merged 13 commits into from
Nov 5, 2018

Conversation

gaydin
Copy link

@gaydin gaydin commented Nov 2, 2018

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 :)

@sapk
Copy link
Member

sapk commented Nov 2, 2018

At first sight, I would say yes to all the question.

For the deps, does dep ensure -update github.com/golang/protobuf solve the problem ?

@bkcsoft bkcsoft added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 2, 2018
@codecov-io
Copy link

codecov-io commented Nov 2, 2018

Codecov Report

Merging #5256 into master will decrease coverage by 0.22%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #5256      +/-   ##
==========================================
- Coverage    37.6%   37.37%   -0.23%     
==========================================
  Files         310      312       +2     
  Lines       46054    46327     +273     
==========================================
- Hits        17320    17317       -3     
- Misses      26254    26527     +273     
- Partials     2480     2483       +3
Impacted Files Coverage Δ
models/user.go 44.64% <ø> (ø) ⬆️
routers/metrics.go 0% <0%> (ø)
routers/routes/routes.go 85.45% <0%> (-0.8%) ⬇️
modules/metrics/collector.go 0% <0%> (ø)
modules/setting/setting.go 48.18% <0%> (-0.13%) ⬇️
modules/process/manager.go 76.81% <0%> (-4.35%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 92fb89f...76a7db6. Read the comment docs.

@gaydin
Copy link
Author

gaydin commented Nov 2, 2018

For the deps, does dep ensure -update github.com/golang/protobuf solve the problem ?

Yes it helped. thank

lunny
lunny previously requested changes Nov 2, 2018
modules/metrics/collector.go Show resolved Hide resolved
@techknowlogick techknowlogick added type/feature Completely new functionality. Can only be merged if feature freeze is not active. pr/wip This PR is not ready for review labels Nov 2, 2018
@gaydin
Copy link
Author

gaydin commented Nov 2, 2018

Bad idea to put metrics handler in a separate file?

By default metrics are disabled. If enable metrics will be available /metrics without authorization. But you can also add a token, then access to /metrics will be available only with a token.

@gaydin gaydin changed the title [WIP] Prometheus endpoint Prometheus endpoint Nov 2, 2018
@techknowlogick
Copy link
Member

I think having it in separate file is best, because it is a unique area (just like how the api is split off into different files).

@techknowlogick techknowlogick removed the pr/wip This PR is not ready for review label Nov 2, 2018
@bkcsoft bkcsoft added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Nov 3, 2018
modules/setting/setting.go Outdated Show resolved Hide resolved
@bkcsoft bkcsoft added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Nov 4, 2018
@techknowlogick techknowlogick added the type/changelog Adds the changelog for a new Gitea version label Nov 5, 2018
@techknowlogick
Copy link
Member

Maintainers note: Dismissing @lunny's review as requested change has been made, and there are 4 other positive reviews.

@techknowlogick techknowlogick dismissed lunny’s stale review November 5, 2018 03:08

change has been made (see my comment above)

@techknowlogick techknowlogick merged commit 078c404 into go-gitea:master Nov 5, 2018
@techknowlogick techknowlogick added this to the 1.7.0 milestone Jan 24, 2019
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
@delvh delvh removed the type/changelog Adds the changelog for a new Gitea version label Oct 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants