Summary
TelemetryRequestInterceptorRegistry documents support for a priority value on telemetry request interceptors, where a higher priority should have more weight than a lower one.
However, getInterceptors() currently returns applicable interceptors in registration order and does not sort them by priority.
As a result, the execution order of telemetry request interceptors is determined by plugin registration order rather than the configured interceptor priority.
Expected vs Current Behavior
Expected: Applicable telemetry request interceptors should be returned in descending priority order, consistent with other priority-based registries in Open MCT. Interceptors without an explicit priority should use the default priority.
Current: Applicable telemetry request interceptors are returned in registration order regardless of their configured priority.
Steps to Reproduce
- Create three telemetry request interceptors with priorities
-1000, no explicit priority, and 1000.
- Register them in the following order:
-1000, default, 1000.
- Call
TelemetryRequestInterceptorRegistry.getInterceptors().
- Observe that the returned order matches registration order (
-1000, default, 1000) instead of descending priority order (1000, default, -1000).
Environment
- Open MCT Version:
4.3.1
- Deployment Type: local development
- OS: Windows 10
- Browser: Brave / Chromium 152
Impact Check List
Additional Information
TelemetryRequestInterceptor.js already contains a TODO indicating that interceptors should be sorted by priority.
The existing object InterceptorRegistry implements analogous behavior by:
- treating an unspecified interceptor priority as
0
- sorting higher numeric priorities before lower priorities
A regression unit test can reproduce the issue and verify the expected ordering behavior.
Summary
TelemetryRequestInterceptorRegistrydocuments support for apriorityvalue on telemetry request interceptors, where a higher priority should have more weight than a lower one.However,
getInterceptors()currently returns applicable interceptors in registration order and does not sort them by priority.As a result, the execution order of telemetry request interceptors is determined by plugin registration order rather than the configured interceptor priority.
Expected vs Current Behavior
Expected: Applicable telemetry request interceptors should be returned in descending priority order, consistent with other priority-based registries in Open MCT. Interceptors without an explicit priority should use the default priority.
Current: Applicable telemetry request interceptors are returned in registration order regardless of their configured priority.
Steps to Reproduce
-1000, no explicit priority, and1000.-1000, default,1000.TelemetryRequestInterceptorRegistry.getInterceptors().-1000, default,1000) instead of descending priority order (1000, default,-1000).Environment
4.3.1Impact Check List
Additional Information
TelemetryRequestInterceptor.jsalready contains aTODOindicating that interceptors should be sorted by priority.The existing object
InterceptorRegistryimplements analogous behavior by:0A regression unit test can reproduce the issue and verify the expected ordering behavior.