henry3260 commented on code in PR #64523:
URL: https://github.com/apache/airflow/pull/64523#discussion_r3397381364
##########
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:
> Mostly: why is this even a config value? It feels like it should be in the
code only
The intent is to allow deployment managers to add metrics coverage for
additional mounted APIs or plugin routes without requiring an Airflow code
change. For example, users could enable metrics for the Execution API or name a
plugin route through configuration.
--
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]