henry3260 commented on code in PR #64523:
URL: https://github.com/apache/airflow/pull/64523#discussion_r3397521403
##########
airflow-core/src/airflow/config_templates/config.yml:
##########
@@ -1152,6 +1152,18 @@ metrics:
type: string
example: ~
default: "True"
+ api_path_prefix_to_surface:
+ description: |
+ JSON mapping of HTTP path prefixes to API surface names used for the
``api_surface`` tag
+ on API metrics. Requests that do not match a configured prefix emit
metrics without the
+ ``api_surface`` tag.
+
+ Add prefixes to identify additional routes, such as the Execution API
or routes registered
+ by plugins. When prefixes overlap, the most specific prefix is used.
+ version_added: 3.3.0
+ type: string
+ example: '{"/api/v2": "public", "/ui": "ui", "/execution": "execution",
"/my-plugin": "plugin"}'
Review Comment:
> We've already got a means to filter out metrics, so this feels like
duplicating that feature
IMO, these are not the same feature. Airflow's existing allow lists filter
by metric name, whereas this configuration filters by route prefix. Since all
API routes emit the same metric names, the existing filters cannot select which
routes should emit metrics.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]