diff --git a/pr_agent/servers/github_app.py b/pr_agent/servers/github_app.py index 5f59969b..afcd29a6 100644 --- a/pr_agent/servers/github_app.py +++ b/pr_agent/servers/github_app.py @@ -213,9 +213,8 @@ def handle_closed_pr(body, event, action, log_context): return api_url = pull_request.get("url", "") pr_statistics = get_git_provider()(pr_url=api_url).calc_pr_statistics(pull_request) - with get_logger().contextualize(**log_context): - with get_logger().contextualize(pr_statistics=pr_statistics): - get_logger().info("PR-Agent statistics for closed PR", analytics=True) + log_context["api_url"] = api_url + get_logger().info("PR-Agent statistics for closed PR", analytics=True, pr_statistics=pr_statistics, **log_context) async def handle_request(body: Dict[str, Any], event: str):