Skip to content

Real Time Monitoring API for FLEDGE #430

Open
@abrik0131

Description

Client side ad auctions described in FLEDGE create new challenges for detecting failures in real time and reacting to them in order to avoid expensive outages. The main factor contributing to these new challenges is decreased visibility of client side failures. To improve visibility of client side failures we propose the following extension of FLEDGE whose purpose is to support effective monitoring of client side auctions.

Events to be monitored

There are several types of events that we would like to monitor. These are:

  1. crashes that occur in seller auction worklets
  2. crashes that occur in buyer bidding worklets
  3. crashes that occur in Fenced Frames as they run rendering JS code
  4. Failures on URL fetches, including timeouts

For the crashes, i.e. events (1)-(3) we would like Chrome to send the following types of data:

  1. worklet code version
  2. stack trace of the crash
  3. chrome version

For the failures on URL fetches we would like Chrome to send the following types of data:

  1. worklet code version
  2. chrome version
  3. URL causing the failure
  4. Error code that can distinguish between timeouts and other types of failures

Registering monitoring URLs

Reporting URLs will be provided in the auction config.

  1. Seller monitoring URL via sellerErrorReportingUrl param
  2. Buyer monitoring URL via perBuyerErrorReportinggUrl param
const myAuctionConfig = {
   'sellerErrorReportingUrl': 'https://www.seller.com/monitoring',
   'perBuyerErrorReportingUrl': {'https://www.example-dsp.com/':
                           'https://www.example-dsp.com/monitoring',
                                    'https://www.another-buyer.com/':
                           'https://www.another-buyer.com/monitoring',
                        ...},
   …
};
const auctionResultPromise = navigator.runAdAuction(myAuctionConfig);
  1. Info about crashes in the seller auction worklets will be reported to sellerErrorReportingUrl.
  2. Info about crashes in the buyer auction worklets will be reported to perBuyerErrorReportingUrl for the appropriate buyer.
  3. Info about crashes in the fenced frames will be reported to perBuyerErrorReportingUrl for the appropriate buyer.
  4. Info about failures on URL fetches will be reported as follows:
    a. ​​biddingLogicUrl, dailyUpdateUrl, trustedBiddingSignalsUrl, renderUrl to perBuyerErrorReportingUrl for the appropriate buyer.
    b. trustedScoringSignalsUrl to sellerErrorReportingUrl.

Sending monitoring notifications

Upon each event, i.e. a crash in the seller or buyer worklets, or a crash in Fenced Frames, or a timeout, Chrome will send a notification to the registered URL, with the following URL params:

  1. eventType containing the type of the event. For sellers eventType will be omitted. For buyers, three values are possible: 'bidding', 'fencedframes', or 'timeout'.
  2. workletVersion containing the worklet code version.
  3. stackTrace containing stack trace.
  4. chromeVersion containing Chrome version.

In case of a failure on a URL fetch, additional param containing URL causing the failure will be added:
fetchFailureURL containing the timed out URL.

The notifications will look as follows. For the crash in the seller worklet

https://www.seller.com/monitoring&workletVersion=<worklet_version>&stackTrace=<stack_trace>&chromeVersion=<chrome_version>

For the crash in the buyer worklet

https://www.example-dsp.com/monitoring&eventType='bidding'&workletVersion=<worklet_version>&stackTrace=<stack_trace>&chromeVersion=<chrome_version>

For the crash in the fenced frames

https://www.example-dsp.com/monitoring&eventType='fencedframes'&workletVersion=<worklet_version>&stackTrace=<stack_trace>&chromeVersion=<chrome_version>

For the failure on URL fetch

https://www.example-dsp.com/monitoring&eventType='fetchfailure'&workletVersion=<worklet_version>&chromeVersion=<chrome_version>&fetchFailureURL=<URL>&errorCode=<error>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Non-breaking Feature RequestFeature request for functionality unlikely to break backwards compatibility

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions