pierrejeambrun commented on code in PR #46177:
URL: https://github.com/apache/airflow/pull/46177#discussion_r1934142115
##########
airflow/api_fastapi/logging/decorators.py:
##########
@@ -79,11 +80,12 @@ async def log_action(
user: Annotated[BaseUser, Depends(get_user_with_exception_handling)],
):
"""Log user actions."""
- request_body = await request.json()
- masked_body_json = {k: secrets_masker.redact(v, k) for k, v in
request_body.items()}
-
- event_name = event or request.url.path
+ # This is needed as size of event column in log table is varchar60 and
run_id is already getting stored
+ # in run_id column so we can remove from url.
+ pattern =
r"(/scheduled__|/manual__)\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\+\d{2}:\d{2}"
+ request_url = re2.sub(pattern, "", request.url.path)
Review Comment:
You can take a look at `request["endpoint"].__name__` and do the same thing
as we were doing in the legacy.
--
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]