mailgun / mailgun/groupcache

Prometheus metrics

Open
#67 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
539
Forks
76
PR merge metrics
No merged PRs in 30d

Description

Hi!

Is there any publicly available code for easily exposing groupcache metrics for Prometheus?

I am sketching up the package below, but maybe I am reinventing the wheel here?!

Please advise!

```golang
// Usage example
{
metricsRoute := "/metrics"
metricsPort := ":3000"

log.Printf("starting metrics server at: %s %s", metricsPort, metricsRoute)

mailgun := mailgun.New(cache)
labels := map[string]string{
"app": appName,
}
namespace := ""
collector := groupcache_exporter.NewExporter(namespace, labels, mailgun)

prometheus.MustRegister(collector)

go func() {
http.Handle(metricsRoute, promhttp.Handler())
log.Fatal(http.ListenAndServe(metricsPort, nil))
}()
}
```

Full details: https://github.com/udhos/groupcache_exporter

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the linked groupcache_exporter package and its usage example to determine whether this repository should expose Prometheus metrics itself or point users to an external exporter. Done would require a decided integration scope and documented metric exposure approach; the issue names no repository files or tests to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, prometheus
Domain
observability-sre
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.