Add helper to determine if a test supports Opentelemetry

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 9.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • Networking & Observability
    • Fully Compatible
    • N&O 2025-06-08
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, to test otel in js you need to add the `requires_otel_build` tag to tests, which excludes it from being run on any variant that doesn't build in otel. This means that tests for otel metrics must be separate from tests for the general behavior, or else the general behavior will lose test coverage. With this helper, the otel-specific assertions can be skipped entirely if the build doesn't support otel, so the otel tests can be safely alongside the tests for the behavior. E.g.

      ```
      if (buildSupportsOtel()) {
      assert(/otel specific stuff, e.g., some otel counter has some value/).
      }
      ```

            Assignee:
            Michael Nugent
            Reporter:
            Michael Nugent
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: