-
Notifications
You must be signed in to change notification settings - Fork 761
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
Prometheus Refactor #1108
Merged
Merged
Prometheus Refactor #1108
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
565bb47
Initial Commit
SyntaxNode 65227e2
Finished Design + Initial Tests
SyntaxNode f2b872a
Attempt #1 For Testify Equality Fix
SyntaxNode bdf4ad9
Attempt #2 For Testify Equality Fix
SyntaxNode 3469dc2
Attempt #3 For Testify Equality Fix
SyntaxNode c3d8795
Expanded Tests
SyntaxNode 0a95c52
Expanded Tests
SyntaxNode d8b9ba8
Finished tests. Fix misconfigured cardinality.
SyntaxNode d8cd3b8
PR Feedback
SyntaxNode 43a44cb
PR Feedback + SetUserID Defensiveness
SyntaxNode b20a656
Clarified Prebid Cache Timing Metric
SyntaxNode 5604600
GoLang Doesn't Like Underscores
SyntaxNode 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -236,6 +236,16 @@ const ( | |
RequestActionErr RequestAction = "err" | ||
) | ||
|
||
// RequestActions returns possible setuid action labels | ||
func RequestActions() []RequestAction { | ||
return []RequestAction{ | ||
RequestActionSet, | ||
RequestActionOptOut, | ||
RequestActionGDPR, | ||
RequestActionErr, | ||
} | ||
} | ||
|
||
// MetricsEngine is a generic interface to record PBS metrics into the desired backend | ||
// The first three metrics function fire off once per incoming request, so total metrics | ||
// will equal the total numer of incoming requests. The remaining 5 fire off per outgoing | ||
|
@@ -256,10 +266,10 @@ type MetricsEngine interface { | |
RecordAdapterBidReceived(labels AdapterLabels, bidType openrtb_ext.BidType, hasAdm bool) | ||
RecordAdapterPrice(labels AdapterLabels, cpm float64) | ||
RecordAdapterTime(labels AdapterLabels, length time.Duration) | ||
RecordCookieSync(labels Labels) // May ignore all labels | ||
RecordCookieSync() | ||
RecordAdapterCookieSync(adapter openrtb_ext.BidderName, gdprBlocked bool) | ||
RecordUserIDSet(userLabels UserLabels) // Function should verify bidder values | ||
RecordStoredReqCacheResult(cacheResult CacheResult, inc int) | ||
RecordStoredImpCacheResult(cacheResult CacheResult, inc int) | ||
RecordPrebidCacheRequestTime(labels RequestLabels, length time.Duration) | ||
RecordPrebidCacheRequestTime(success bool, length time.Duration) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I really just care about success and failure. Changing to match similar existing constructs in the metrics. |
||
} |
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.
The labels are unused. Slimming down the interface.