• 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

      Enforce at build time that every metrics: fragment references a section root declared in mongo/observability/metrics_sections.idl (epic SPM-4962). This enforcement was cut from SERVER-138331; the sections file itself is created there, but its contents are not yet checked against fragments.

      Scope of Work

      * In the IDL binder, resolve each metrics: fragment's section-root key against the metrics_section: declarations reachable via the file's imports:.
      * Unknown or misspelled section roots are build errors naming the declaring file and the offending root.
      * Duplicate section-root declarations across files are build errors (metrics_sections.idl is the single registry of roots).
      * Decide and document whether duplicate fragment keys within the same section root across different files are legal (the design allows sibling fragments that merge at materialization) or need an ownership rule.
      * Add parser/binder tests for the pass and negative cases, and extend idl_schema.yml if the grammar grows for it.

      Notes

      * Runtime path-ownership conflict detection still happens at materialization in the MetricsRegistry (SERVER-138332); this ticket moves the section-root half of that check to build time, which is the earliest point the information exists.
      * The binder needs the cross-file import-resolution machinery that SERVER-138331 deliberately avoids, so this ticket lands after it.

            Assignee:
            Unassigned
            Reporter:
            Finley Lau
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: