Skip to content

feat: add pprof and prometheus metrics to coder server #1266

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

Merged
merged 3 commits into from
May 3, 2022

Conversation

coadler
Copy link
Contributor

@coadler coadler commented May 2, 2022

No description provided.

@coadler coadler self-assigned this May 2, 2022
@coadler coadler requested a review from kylecarbs May 2, 2022 23:15
@codecov
Copy link

codecov bot commented May 2, 2022

Codecov Report

Merging #1266 (dca1216) into main (fd49a18) will decrease coverage by 0.27%.
The diff coverage is 74.35%.

@@            Coverage Diff             @@
##             main    #1266      +/-   ##
==========================================
- Coverage   66.07%   65.79%   -0.28%     
==========================================
  Files         276      277       +1     
  Lines       18146    18221      +75     
  Branches      216      216              
==========================================
- Hits        11990    11989       -1     
- Misses       4917     4976      +59     
- Partials     1239     1256      +17     
Flag Coverage Δ
unittest-go-macos-latest 53.27% <74.35%> (+0.13%) ⬆️
unittest-go-postgres- 64.75% <74.35%> (-0.17%) ⬇️
unittest-go-ubuntu-latest 55.71% <74.35%> (-0.02%) ⬇️
unittest-go-windows-2022 51.61% <74.35%> (+0.15%) ⬆️
unittest-js 70.69% <ø> (ø)
Impacted Files Coverage Δ
cli/server.go 57.59% <37.93%> (-1.20%) ⬇️
coderd/httpmw/prometheus.go 95.45% <95.45%> (ø)
coderd/coderd.go 97.72% <100.00%> (+0.04%) ⬆️
peerbroker/dial.go 77.04% <0.00%> (-13.12%) ⬇️
coderd/parameter/compute.go 74.07% <0.00%> (-4.45%) ⬇️
peerbroker/proxy.go 58.72% <0.00%> (-3.49%) ⬇️
provisioner/echo/serve.go 56.80% <0.00%> (-2.41%) ⬇️
cli/cliui/provisionerjob.go 76.42% <0.00%> (-2.15%) ⬇️
peer/conn.go 76.86% <0.00%> (-1.75%) ⬇️
provisionerd/provisionerd.go 75.23% <0.00%> (-1.48%) ⬇️
... and 4 more

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 fd49a18...dca1216. Read the comment docs.

Copy link
Member

@kylecarbs kylecarbs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like how simple this is. Neato!

cli/server.go Outdated
cliflag.StringVarP(root.Flags(), &address, "address", "a", "CODER_ADDRESS", "127.0.0.1:3000", "The address to serve the API and dashboard")
cliflag.StringVarP(root.Flags(), &accessURL, "access-url", "", "CODER_ACCESS_URL", "", "Specifies the external URL to access Coder.")
cliflag.StringVarP(root.Flags(), &address, "address", "a", "CODER_ADDRESS", "127.0.0.1:3000", "The address to serve the API and dashboard.")
cliflag.BoolVarP(root.Flags(), &promEnabled, "enable-prometheus", "", "CODER_ENABLE_PROMETHEUS", false, "Enable serving prometheus metrics on the addressdefined by --prometheus-address.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For TLS, we did the naming inverted. Not sure if we wanna keep it going, but we could 🤷.

prometheus-enabled or something.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops, I'll make it consistent!

@coadler coadler requested a review from a team as a code owner May 2, 2022 23:45
@coadler coadler removed the request for review from a team May 2, 2022 23:47
@coadler coadler enabled auto-merge (squash) May 3, 2022 00:23
@coadler coadler merged commit 55ad97b into main May 3, 2022
@coadler coadler deleted the colin/prom-pprof branch May 3, 2022 12:48
@misskniss misskniss added this to the V2 Beta milestone May 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants