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

New module stage: exitpoint #4044

Open
bretg opened this issue Nov 8, 2024 · 2 comments
Open

New module stage: exitpoint #4044

bretg opened this issue Nov 8, 2024 · 2 comments

Comments

@bretg
Copy link
Contributor

bretg commented Nov 8, 2024

We need a new hook stage executed right before the final Prebid Server response. This allows for the last-chance changes to the response itself. The primary intent behind this stage is to allow the modification of the response format and headers.

The document is https://docs.google.com/document/d/1Fkwym4EREfOdaTD8SHUODKwlj-vWpZWQa0eGUToyzPU/edit?tab=t.0#heading=h.iaqb0q3s18nj

Prebid Server doesn’t allow short-circuiting a hook execution group. This effectively means that multiple modules might modify the response. In this case the last hook that modified the response will take precedence.

Prebid Server gives no guarantee which module final response will be used when there are multiple configured exitpoint modules. This effectively means that the host company will need to make sure that there is only one module which does response serialization and that this module is executed last.

As part of this mechanism, Prebid Server will extend AuctionContext with the field indicating HTTP request method, so that it can be used by module creators.

Exit stage modules should still be able to add aTag objects that are seen by analytics adapters.

PBS-Core updates:

  • allow the module to change the Content-Type header
  • allow the module to set headers in general
  • allow the module to set the response body
  • ideally, detect the situations of multiple modules providing response output (indicating a configuration error) and emit a alert.general metric so that issues will not be unnoticed.
  • update documentation
@bretg
Copy link
Contributor Author

bretg commented Nov 15, 2024

Adding clarifications:

  • exitpoint modules are not called if PBS is going to respond with a 4xx or 5xx error. i.e. there's no output to format.
  • the ext.prebid.modules trace output will not contain the status of the exitpoint module invocation
  • analytics adapters are not expected to be able to read the output created by an exitpoint module. The response sent to analytics adapters should be the ORTB that was present at the start of the exitpoint stage.

@bretg
Copy link
Contributor Author

bretg commented Dec 11, 2024

Done with PBS-Java 3.16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Ready for Dev
Development

No branches or pull requests

1 participant