Repository navigation
feat(metrics): Export build info, memory limit, and tracked memory - #5030
colinbarry wants to merge 6 commits into
Conversation
Tracking
Standard development
CI Testing Labels
Kubernetes operator / Helm chartsDoes this change affect how Memgraph is deployed or configured on Kubernetes? It likely does if it adds, removes or renames a flag; changes run-time or startup settings; touches the license, AWS settings, coordinators, replication, TLS, monitoring or another enterprise feature.
Documentation checklist
|
|
This PR has potential conflicts with the following other open pull requests which modify the same files:
|
|
Dashboards could not tell which version an instance runs, and could not alert on memory headroom, because neither the version nor the memory limit was exported. Instances now export memgraph_build_info with the version, edition, and build type as labels, plus memgraph_memory_limit_bytes and memgraph_memory_tracked_bytes, the limit enforced on tracked memory and the amount tracked against it.
d953bc7 to
86424fc
Compare
Operators had no way to alert before an enterprise licence expires. memgraph_license_expiry_timestamp_seconds exports the licence's expiry as a Unix timestamp, +Inf for a licence that never expires, and no series without a valid licence.
|
Release note advisory Release note: The note contains two sentences but the required format calls for a single short sentence describing the change. Please combine into one concise sentence (the PR link is correct). |
The memory limit help said 0 meant unlimited, which never happens, and claimed the value covered every licence limit, though an AI_PLATFORM licence limits graph memory instead. The help now says so. The build_info edition label added nothing, since the version already names the edition, so it is gone.
The tracked memory test passed even if UpdateGauges never set the gauge, and no test covered the licence expiry series going away when a valid licence becomes invalid. The test now tracks a known amount and checks the gauge matches it, and a new test checks the expiry series disappears after the licence is invalidated.



Dashboards could not show which version an instance runs, alert on memory headroom, or warn before the licence expires, because none of these were exported.
Instances now export:
memgraph_build_info{version, build_type}utils::GetBuildInfo(), asSHOW BUILD INFOuses)memgraph_memory_limit_bytesmemgraph_memory_tracked_bytesmemgraph_license_expiry_timestamp_seconds