-
Notifications
You must be signed in to change notification settings - Fork 3.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add User Agent info to server events #9154
base: develop
Are you sure you want to change the base?
Conversation
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #9154 +/- ##
========================================
Coverage 73.32% 73.32%
========================================
Files 448 448
Lines 45862 45867 +5
Branches 3914 3914
========================================
+ Hits 33628 33633 +5
Misses 12234 12234
|
request_id: Optional[str], | ||
user_agent: Optional[str] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you merge these into a single parameter (taking a compound object)? Seems like it would be more robust to pass request information as a single parameter, instead of deciding for every call whether the user agent is needed or not.
**payload, | ||
"request": { | ||
**payload.get("request", {}), | ||
"id": request_id, | ||
"user-agent": user_agent, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"user-agent": user_agent, | |
"user_agent": user_agent, |
(I'm pretty sure we're using snake_case in these fields... see working_time
.)
Motivation and context
How has this been tested?
Checklist
develop
branchLicense
Feel free to contact the maintainers if that's a concern.