mirror of
https://github.com/coder/coder.git
synced 2026-06-02 20:48:20 +00:00
chore: instrument github oauth2 limits (#11532)
* chore: instrument github oauth2 limits Rate limit information for github oauth2 providers instrumented in prometheus
This commit is contained in:
@@ -464,8 +464,13 @@ func ConvertConfig(instrument *promoauth.Factory, entries []codersdk.ExternalAut
|
||||
oauthConfig = &exchangeWithClientSecret{oc}
|
||||
}
|
||||
|
||||
instrumented := instrument.New(entry.ID, oauthConfig)
|
||||
if strings.EqualFold(entry.Type, string(codersdk.EnhancedExternalAuthProviderGitHub)) {
|
||||
instrumented = instrument.NewGithub(entry.ID, oauthConfig)
|
||||
}
|
||||
|
||||
cfg := &Config{
|
||||
InstrumentedOAuth2Config: instrument.New(entry.ID, oauthConfig),
|
||||
InstrumentedOAuth2Config: instrumented,
|
||||
ID: entry.ID,
|
||||
Regex: regex,
|
||||
Type: entry.Type,
|
||||
|
||||
Reference in New Issue
Block a user