-
Notifications
You must be signed in to change notification settings - Fork 739
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
Improving /setuid #86
Closed
Closed
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
70e0460
Added interfaces for metrics classes.
dbemiller c63e72a
First pass at a working taggable metrics module.
dbemiller 97795b3
Better API for the influx metric module.
dbemiller f599a67
Implemented the Influx metrics using Tags for the server.
dbemiller 4a09b3b
Added cookie sync counter, which we would also want to replace.
dbemiller a08c16d
Added some unit tests, and fixed a bug.
dbemiller 3ae9ecd
Added unit tests for the reporter, and fixed some bugs.
dbemiller b50bcb6
Made everything private which could be made private. Added more tests.
dbemiller 81d0b8d
Added more thorough unit tests, and fixed some bugs.
dbemiller c84b0ba
Added a unit test for the cookiesync event logging.
dbemiller 73d183f
Merge branch 'master' of https://github.com/prebid/prebid-server into…
dbemiller 03d9373
Merge branch 'gometrics-metrics' of https://github.com/prebid/prebid-…
dbemiller 4472519
Added tagged metrics throughout pbs_light. Removed the metrics_test c…
dbemiller bde0102
Removed some superfluous code, and fixed some documentation.
dbemiller e4d1dc9
Fixed style.
dbemiller 5df9ec0
Removed pbs as a dependency from the metrics package. This will preve…
dbemiller deefaf5
Added metrics to capture the number of user sync requests per bidder.
dbemiller 76bcc1b
Small refactor to bury the cookie behind an interface, to control mut…
dbemiller 1eed01c
Replaced the raw userIDs map with the cookie, on the pbsrequest.
dbemiller 1ab7763
Prevented PBS from saving 0 for audienceNetwork.
dbemiller bdf3585
Renamed some methods, and added a bunch of documentation.
dbemiller e057ca1
Small refactoring. Many added unit tests.
dbemiller 3850b27
Added a test for request reading & writing.
dbemiller 854c3b1
Reorganized the imports, to pass gofmt.
dbemiller ba81deb
Renamed IsAllowed, because it didnt make much sense.
dbemiller 799f5ef
Polishing the code after seeing the diff.
dbemiller 9fad2fc
Removed the nils from prod code. Added more tests.
dbemiller 2d9a4b9
More thorough tests.
dbemiller 9abf5ae
Fixed a potential bug with nil-panics on app requests. Renamed interf…
dbemiller 3e4c71a
Fixed user sync metrics so that we dont count facebook uid=0.
dbemiller 876b57d
Made the user sync metrics more granular, to separate out facebook er…
dbemiller 4adbfaf
Merged from master, and fixed the conflicts
dbemiller 705de9a
Merged from master. Tests/code may not validate anymore.
dbemiller 91bb9f7
Used go-metrics to log usersyncs per adapter.
dbemiller bf21bfe
Merged from master. Fixed the conflict.
dbemiller File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Do we need an empty SyncMap on mobile app requests for everything to work? Cookie sync doesn’t make sense on mobile app, so having an empty sync map could be confusing.
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.
The short answer is... I'm not sure. I definitely agree that it's confusing.
On the other hand...
func (req *PBSRequest) GetUserID(BidderCode string)
surfaced some interesting unit test failures. Apparently in Go any reads on anil
map are treated as if that map were empty. SopbsReq.UIDs['key']
will just return nil ifUIDs
is undefined, butreq.SyncMap.GetUID()
will cause panic. Stashing an emptySyncMap
on here makes reads behave nicely.I don't know offhand whether any of the other PBS code attempts to read cookiesyncs inside the "mobile" code branches... but as a general rule, ab object should be equally usable regardless of how its constructed.
I think this lends some extra weight to your suggestion here. If the methods are defined on a struct, then I can define how they behave on a
nil
. Interfaces don't give that flexibility.