Add Token expiry buffer for oauth2clientauthextension #35148
Labels
Contribfest
enhancement
New feature or request
extension/oauth2clientauth
good first issue
Good for newcomers
Component(s)
extension/oauth2clientauth
Is your feature request related to a problem? Please describe.
There is a risk that the oauth token expired right after the request being sent and causing a data loss.
Describe the solution you'd like
Add a config for expiry buffer. The change would be like replace the ReuseTokenSource with ReuseTokenSourceWithExpiry and add a config for the expiry. Optional to provide a default expiry buffer
ref:
https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/extension/oauth2clientauthextension/clientcredentialsconfig.go#L93
https://pkg.go.dev/golang.org/x/oauth2#ReuseTokenSourceWithExpiry
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: