Skip to content

Commit

Permalink
ref(api-logging): Added user agent to api logging (#28881)
Browse files Browse the repository at this point in the history
Last metric to be added for now. Track the user agent of the caller
  • Loading branch information
AniketDas-Tekky authored and vuluongj20 committed Sep 30, 2021
1 parent 66176f0 commit 81a39eb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/sentry/api/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ def _create_api_access_log(self):
auth_id=auth_id,
path=self.request.path,
caller_ip=self.request.META.get("REMOTE_ADDR"),
user_agent=self.request.META.get("HTTP_USER_AGENT"),
)
api_access_logger.info("api.access", extra=log_metrics)
except Exception:
Expand Down

0 comments on commit 81a39eb

Please sign in to comment.