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 handler design : payment models #84

Open
baywet opened this issue Apr 19, 2023 · 0 comments
Open

new handler design : payment models #84

baywet opened this issue Apr 19, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@baywet
Copy link
Member

baywet commented Apr 19, 2023

The service is slowly rolling our payment models for large volume or highly value added APIs. As part of this roll out, client apps need to send the payment model they are using to track consumption as a query parameter.
Instead of requiring client apps to set it on a per request basis, we could include a middleware handler that'd set it for any request, based on the client app configuration. (something like client.WithPaymentModel(model) would configure the client).
Considerations:

  • The model might be set on a per request basis, this handler shouldn't override that.
  • This handler should provide the ability to be disabled through a request option on a per request basis.
  • This handler should be disabled by default.
  • This handler should create an observability span see Define requirements for Logging Handler #9
  • Some APIs might not support receiving the query parameter, maybe work with a list of path patterns for the handler to operate on?
@baywet baywet added the enhancement New feature or request label Apr 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants