You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Expose metric monitor aggregates in the OpenAPI schema #129450
The public API schema does not say which aggregate values a metric monitor (detector) data source accepts. Clients such as @sentry/api and the Sentry CLI copy the list from the backend source instead, and their copies drift from it.
BaseDetectorTypeValidator.data_sources (src/sentry/workflow_engine/endpoints/validators/base/detector.py) is a plain ListField. The generated schema therefore types it as Array<unknown>. This is still the case in @sentry/api 0.432.0.
The only aggregates the schema mentions are prose examples in DATA_SOURCES_HELP_TEXT (workflow_engine/endpoints/validators/api_docs_help_text.py), and some are out of date. For example, it lists percentile(measurements.lcp,x), but EAP spans don't define percentile (src/sentry/search/eap/spans/aggregates.py).
The accepted aggregates are scattered across the code:
The public schema is generated here (.github/workflows/openapi.yml runs make build-api-docs and copies tests/apidocs/openapi-derefed.json into getsentry/sentry-api-schema), so the change has to be made in this repo.
Impact: a client that validates or completes aggregates has to copy these rules by hand. getsentry/toolkit#1785 does this for CLI shell completion.
Activity
linear-code commentedon Nov 1, 2026
ENG-8945
ref(workflow_engine): Write the monitor aggregate list as JSON
feat(workflow_engine): Document metric monitor aggregates in the API …