• Type: Task
    • 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

      The design (SPM-4962, Build-time validation, "Name governance") calls for a path-scoped validator that enforces a unified naming convention on every instrument, since metrics are defined by different teams.

      SERVER-138594 restructured the metrics grammar validation into a single pass over the bound metrics tree (buildscripts/idl/idl/metrics/validators.py): validate_metrics runs NODE_VALIDATORS against every leaf with its dotted path, which is the extension point the design describes. This ticket adds the first path-scoped validator to that registry.

      Scope* Name governance validator in NODE_VALIDATORS: synthesize the full instrument name as mongodb... from the walk path and reject names that do not carry the mongodb. prefix or whose components fail the field-name regex.

      • OTel instrument-name rules: case-insensitive uniqueness across the tree, lowercase alphanumeric characters plus ., _, and -, must start with a letter, 255-character limit.
      • Exceptions construct (metrics_name_exceptions.yml) for grandfathered paths, added when the first real exception appears; the validator takes an exceptions parameter from the start.
      • New error IDs numbered from this ticket.

      Links

      • Blocked by SERVER-138594 (validation-pass registry).
      • Related to SERVER-138334 (OTel bindings create instruments whose names this validates).

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

              Created:
              Updated: