mirror of
https://github.com/Unleash/unleash.git
synced 2025-02-23 00:22:19 +01:00
fix: Add metrics for old proxy forward (#6695)
This change adds a new prometheus counter to all us to capture when we automatically forward traffic from old /proxy paths to the /api/frontend path. 
This commit is contained in:
parent
91b33362bd
commit
d065905e73
@ -103,6 +103,11 @@ export default class MetricsMonitor {
|
||||
help: 'Number of times a feature toggle has been used',
|
||||
labelNames: ['toggle', 'active', 'appName'],
|
||||
});
|
||||
const oldEmbeddedProxyForwardCounter = createCounter({
|
||||
name: 'old_embedded_proxy_forward_total',
|
||||
help: 'Number of times we forwarded old embedded proxy requests',
|
||||
labelNames: ['path', 'method'],
|
||||
});
|
||||
const featureTogglesTotal = createGauge({
|
||||
name: 'feature_toggles_total',
|
||||
help: 'Number of feature toggles',
|
||||
@ -600,6 +605,11 @@ export default class MetricsMonitor {
|
||||
}
|
||||
});
|
||||
|
||||
// On purpose a hard-coded string. Will we removed when we are done migrating.
|
||||
eventBus.on('OLD_EMBEDDED_PROXY_REQUEST', ({ path, method }) => {
|
||||
oldEmbeddedProxyForwardCounter.labels({ path, method }).inc();
|
||||
});
|
||||
|
||||
await this.configureDbMetrics(db, eventBus, schedulerService);
|
||||
|
||||
return Promise.resolve();
|
||||
|
Loading…
Reference in New Issue
Block a user