-
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
Prometheus Refactor #1108
Prometheus Refactor #1108
Changes from 2 commits
565bb47
65227e2
f2b872a
bdf4ad9
3469dc2
c3d8795
0a95c52
d8b9ba8
d8cd3b8
43a44cb
b20a656
5604600
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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() | ||
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. The labels are unused. Slimming down the interface. |
||
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. |
||
} |
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.
To keep consistency maybe we can remove this
return
statement as was done in theRecordPrebidCacheRequestTime
functionThere 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.
Done.