Fix rest API logging
Part of https://github.com/apache/airflow/issues/22352
Try to improve action logging in the REST API. Include api.{name_of_function}. We should probably try to capture more information for extra but audit log now reads like so:
This is a draft to get feedback on the format and then I will do it for basically all PATCH, PUT, POST, DELETE endpoints
^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.
LGTM
Made extra a json object instead of a tuple. Added request body to extra. And hiding sensitive fields for connections and variables:
Looks good for me!
Closing in favor of https://github.com/apache/airflow/pull/37734
I want to leave changes to variables+connections API and the extra field as a separate effort