Skip to content

API metrics (bee_api_*) are never registered, so they never appear on /metrics #5562

Description

@darkobas2

pkg/api/metrics.go defines the bee_api_* metrics — bee_api_request_count, bee_api_response_code_count, bee_api_response_duration_seconds, bee_api_content_api_duration — but pkg/node/node.go never registers them with the /metrics registry. It calls MustRegisterMetrics for around 22 other packages; for the API only apiService.StatusMetrics() is registered, and that goes to the separate status-protocol registry.

Same on master, v2.8.1 and v2.8.2-rc1. Checked against live nodes too: no bee_api_* series exist in our metrics backend.

Effect: you can't see API request rates, response codes or latencies from a Bee node, and Grafana panels built on these metrics stay empty.

The fix looks like a single registration call in pkg/node/node.go.

Metadata

Metadata

Assignees

Labels

seenIssue has been reviewed as part of the weekly issue rotation.

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions