-
Type:
New Feature
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
DB Integration & Observability
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Overview
Binder validation for the metrics grammar (epic SPM-4962, split from SERVER-138331). Depends on SERVER-138593.
Scope
- buildscripts/idl/idl/metrics/binder.py and hooks in idl/binder.py; idl/compiler.py now calls binder.bind(spec, input_file). All error modules land with SERVER-138593.
Validation
- kind/cpp_type compatibility matrix and the unit enum.
- buckets required for histogram kinds, forbidden elsewhere; boundaries are integers in the signed 64-bit range, ascending (ID127).
- Node keys are lowerCamel (ID124); cpp_name renames the member.
- Rejects sibling member name collisions, duplicate metrics symbols (ID123), fragment-derived struct names, and group types shadowing enclosing types.
- Rejects reserved generated names: appendTo, std, mongo, observability, BSONObjBuilder, BSONArrayBuilder.
Tests
tests/test_metrics_binder.py. Full IDL suite green (236 passed).
- blocks
-
SERVER-138331 Codegen to create metrics structs (<file>_metrics_gen.h/cpp and metrics_sections.idl)
-
- In Code Review
-
-
SERVER-139210 Enforce metric name governance in the IDL compiler (mongodb. prefix, component rules, OTel instrument names)
-
- Needs Scheduling
-
- is blocked by
-
SERVER-138593 Metrics grammar and parser in the IDL compiler (*_metrics.idl)
-
- In Code Review
-
- related to
-
SERVER-138332 Build the MetricsRegistry for materialization, validation, and unmaterialize()
-
- Needs Scheduling
-