Open uwedeportivo opened 5 years ago
I don't think anyone will object to removing duplicated metrics :) For those you can just send PRs without proposals.
For metrics that aren't duplicate but you believe aren't useful for some reason, those may warrant a discussion (a PR, if easy to create, can also be a good way to discuss such changes)
we could do one round of this after @slimsag excellent work in observability. we could scrape for metrics that are on deprecated and/or deleted panels and delete those from the code. this will help with the prometheus data volume too.
Heads up @davejrt @ggilmore @dan-mckean @caugustus-sourcegraph @stephanx - the "team/delivery" label was applied to this issue.
prom-metrics-doc generates a list of all metrics with corresponding documentation.
We have a couple of instances where we use counters and histograms for the same event. Histograms have an internal counter we can use and get rid of the additional counter.
Inventory of metrics related to http requests
pkg/metrics/metrics.go
Used to measure requests to external services (bitbucket, github, etc) from the client POV (http client instrumentation). Currently consists of counter vector (breakdown by http status code + special case for error). PR 5093 adds request duration histogram vector.
Example metrics: repo-updater (this includes PR 5093)
cmd/frontend/backend/trace.go
Used by cmd/frontend/backend/repos.go (for example
func (s *repos) AddGitHubDotComRepository
).Example metrics: frontend
pkg/trace/httptrace.go
Woven into
trace.Middleware()
. Used only bycmd/frontend/internal/cli.newExternalHTTPHandler()
to create the external http handler for frontend.Example metrics: frontend
cmd/repo-updater/repoupdater/observability.go
Created by
repoupdater.NewHandlerMetrics()
wraps handlers (server POV in repo-updater).Example metrics: repo-updater