Use a build tag to toggle Prometheus/metrics
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- go, prometheus
- Domain
- build-system, observability
Research direction
Start by reading the linked Go build-tags article and identify the Prometheus and API endpoint imports in the Bee codebase. Use the proposed metrics tag to assess whether those imports are excluded, then run gsa and confirm that the resulting bundle no longer includes Prometheus metrics.
Written by the indexing model from the issue text.
Description
Summary
Not always metrics are needed to be enabled. In certain cases, you'd want to have them disabled to decrease bundle size and gain slight performance gains. Would be very nice if all metrics (including both prometheus and API endpoints) could be disabled using a build tag
Motivation
There is no point for Prometheus metrics in WASM or low-end environments such as EFI modules. Additionally, Prometheus blocks compilation for tinygo.
Implementation
Use build tags. Here's an article explaining how they work: https://leapcell.io/blog/understanding-go-build-tags
Example name: -tag metrics
Drawbacks
Would require a bunch of manual rewriting. You can also check whether Prometheus is included or not by running gsa and observing imports: https://github.com/Zxilly/go-size-analyzer/issues
- Dominant language
- Go
- Stars
- 1.5k
- Forks
- 390
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 23
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ethersphere/bee
-
Chequebook deployment uses a fixed 175,000 gas limit; it needs about 630,000 under Glamsterdam (live on Sepolia since 2026-10-06)Possibly taken @sbackend123 claimed this 9 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
ethersphere/bee#5650 · 1 assignee ·
Maintainers usually reply within 2 days
-
Add a transaction inbox for outbound chain transactionsPossibly taken @sbackend123 claimed this 3 days ago. Openseen
Difficulty 5/5 Over a week Newbie friendliness 35/100
ethersphere/bee#5660 · 1 assignee ·
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
ethersphere/bee#5659 ·
Maintainers usually reply within 2 days
-
accepted seen
Difficulty 4/5 3-5 days Newbie friendliness 40/100
ethersphere/bee#5648 · 1 comment ·
Maintainers usually reply within 2 days
-
pusher: chunksWorker deadlocks on a deferred chunk that fails IdentityAddress (send on nil op.Err), halting all push-syncPossibly taken @sbackend123 claimed this 11 days ago. Openseen
Difficulty 3/5 1-2 days Newbie friendliness 75/100
ethersphere/bee#5641 · 1 assignee ·
Maintainers usually reply within 2 days
Similar issues
-
documentation priority:p1
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
yeixio/toskar-core#697 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
keyxmakerx/Chronicle#1532 ·
Maintainers usually reply within 1 day
-
The acquisition fixture's search path skips the argument table production enforces (regression from #285)Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Judgment-Pack/judgment-pack-gateway#293 ·
Maintainers usually reply within 1 day
-
bug desktop v3 windows
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
esengine/DeepSeek-Reasonix#13697 · 1 comment ·
Maintainers usually reply within 1 day
-
good first issue help wanted
Difficulty 1/5 Under an hour Newbie friendliness 95/100
eugenioenko/ttt#959 ·
Maintainers usually reply within 1 day