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:
parent
2c5cd13160
commit
e4649e6421
@ -355,6 +355,15 @@ export default class MetricsMonitor {
|
|||||||
rateLimits
|
rateLimits
|
||||||
.labels({ endpoint: '/auth/simple', method: 'POST' })
|
.labels({ endpoint: '/auth/simple', method: 'POST' })
|
||||||
.set(config.rateLimiting.simpleLoginMaxPerMinute);
|
.set(config.rateLimiting.simpleLoginMaxPerMinute);
|
||||||
|
rateLimits
|
||||||
|
.labels({
|
||||||
|
endpoint: '/api/incoming-webhook/:name',
|
||||||
|
method: 'POST',
|
||||||
|
})
|
||||||
|
.set(
|
||||||
|
config.rateLimiting.callIncomingWebhookMaxPerSecond *
|
||||||
|
60,
|
||||||
|
);
|
||||||
} catch (e) {}
|
} catch (e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user