-
Notifications
You must be signed in to change notification settings - Fork 12
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 a structured log field for just the normalized device-id. #391
Conversation
…e id from url path
transaction/transactor.go
Outdated
id, ok := vars["deviceid"] | ||
if !ok { | ||
//TODO: edit log statement | ||
fmt.Println("id is missing in parameters") |
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.
If the id isn't present I think we should add a deviceid of mac:000000000000
which is both a valid address, but also a reserved value that should never be used. This will allow us to track this happened easier than nothing being present.
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.
I'm not sure how difficult it would be to make this configurable (ideal).
Codecov Report
@@ Coverage Diff @@
## main #391 +/- ##
==========================================
+ Coverage 44.22% 45.14% +0.91%
==========================================
Files 15 15
Lines 1135 1154 +19
==========================================
+ Hits 502 521 +19
Misses 621 621
Partials 12 12
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
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.
Looks good! Just a few minor things
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.
Looks good. Approved with Owen's recommended changes
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.
lgtm! 🍻
Some some changes I suggested.
Co-authored-by: Owen Cabalceta <[email protected]>
Co-authored-by: Owen Cabalceta <[email protected]>
Co-authored-by: Owen Cabalceta <[email protected]>
Kudos, SonarCloud Quality Gate passed! |
What's included: #373