Skip to content
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

PBJ: Improve CookieSync and Setuid logging and metrics #1253

Merged
merged 5 commits into from
May 18, 2021

Conversation

SerhiiNahornyi
Copy link
Collaborator

No description provided.

docs/metrics.md Outdated
@@ -115,6 +115,8 @@ Following metrics are collected and submitted if account is configured with `det
- `usersync.bad_requests` - number of requests received with bidder not specified
- `usersync.<bidder-name>.sets` - number of requests received resulted in `uid` cookie update for `<bidder-name>`
- `usersync.<bidder-name>.tcf.blocked` - number of requests received that didn't result in `uid` cookie update for `<bidder-name>` because of lack of user consent for this action according to TCF
- `usersync.<bidder-name>.tcf.invalid` - number of requests received that are lacking of a valid consent string for `<bidder-name>`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls do mention /setuid here.

docs/metrics.md Outdated
@@ -115,6 +115,8 @@ Following metrics are collected and submitted if account is configured with `det
- `usersync.bad_requests` - number of requests received with bidder not specified
- `usersync.<bidder-name>.sets` - number of requests received resulted in `uid` cookie update for `<bidder-name>`
- `usersync.<bidder-name>.tcf.blocked` - number of requests received that didn't result in `uid` cookie update for `<bidder-name>` because of lack of user consent for this action according to TCF
- `usersync.<bidder-name>.tcf.invalid` - number of requests received that are lacking of a valid consent string for `<bidder-name>`
- `usersync.all.tcf.invalid` - number of requests received that are lacking of a valid consent string for all requested bidders
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls do mention /cooki_sync here.

userSync().forBidder(bidder).tcf().incCounter(MetricName.invalid);
}

public void updateUserSyncTcfInvalidMetricForAllBidders() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method can overloaded from updateUserSyncTcfInvalidMetric but without args.
Also, it call updateUserSyncTcfInvalidMetric(ALL_REQUEST_BIDDERS) directly.

@@ -245,7 +246,7 @@ public void shouldRespondWithBadRequestStatusIfGdprConsentIsInvalid() {
// given
given(routingContext.getBody())
.willReturn(givenRequestBody(CookieSyncRequest.builder()
.bidders(emptyList())
.bidders(Collections.singletonList(RUBICON))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In tests we'd rather prefer to use static method imports to rid off Collections., etc.

@rpanchyk rpanchyk merged commit 25914b0 into master May 18, 2021
@rpanchyk rpanchyk deleted the cookiesync/setuid/metrics_logs branch May 18, 2021 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants