Skip to content

rust: keep span attribute cardinality bounds in sync with entities #982

Closed

Description

@athvin

Evidence

The attribute registry declares 218 statement identities and 42 relations, while the current entity tree contains 264 declared operation SQL files and 52 entity definitions. The stale count is repeated in the statement description and generated telemetry reference, understating the scale the reference claims. Source.

Change

Derive these counts from the entity tree or add a gate that fails when declared bounds drift; regenerate the owned reference through its supported test workflow.

Done when

  • The statement and relation bounds agree with the current catalog.
  • Adding a declared SQL file or entity without refreshing the bounds fails a test/gate.
  • The generated telemetry reference is updated from the registry, not hand-edited.

Additional stale counts

er-obs/src/registry.rs and er-obs/tests/cardinality.rs still refer to 247 declared statements and 494 statement/outcome combinations; the current tree has 264 SQL files (528 combinations). er-obs/src/metrics.rs also says 42 generated entity files. Include these sources and the generated telemetry reference in the same derived-count or drift-gate fix. For er-span relation cardinality, count distinct emitted relation names rather than assuming every entity name is unique.

Activity

  1. added
    code-cleanup
    on Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    code-cleanup

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions