1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

chore: add call incoming webhook rate limit metric (#6252)

Follow up to https://github.com/Unleash/unleash/pull/6248 - Add this
rate limit to metrics.


![image](https://github.com/Unleash/unleash/assets/14320932/6b458f5d-2e13-4ac4-8331-7950e7784585)
This commit is contained in:
Nuno Góis 2024-02-15 17:05:52 +00:00 committed by GitHub
parent 2c5cd13160
commit e4649e6421
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -355,6 +355,15 @@ export default class MetricsMonitor {
rateLimits
.labels({ endpoint: '/auth/simple', method: 'POST' })
.set(config.rateLimiting.simpleLoginMaxPerMinute);
rateLimits
.labels({
endpoint: '/api/incoming-webhook/:name',
method: 'POST',
})
.set(
config.rateLimiting.callIncomingWebhookMaxPerSecond *
60,
);
} catch (e) {}
}