feat(monitoring): add frontend and backend protocol distribution metrics to network stats
This commit is contained in:
@@ -56,6 +56,8 @@ export interface INetworkState {
|
||||
requestsPerSecond: number;
|
||||
requestsTotal: number;
|
||||
backends: interfaces.data.IBackendInfo[];
|
||||
frontendProtocols: interfaces.data.IProtocolDistribution | null;
|
||||
backendProtocols: interfaces.data.IProtocolDistribution | null;
|
||||
lastUpdated: number;
|
||||
isLoading: boolean;
|
||||
error: string | null;
|
||||
@@ -154,6 +156,8 @@ export const networkStatePart = await appState.getStatePart<INetworkState>(
|
||||
requestsPerSecond: 0,
|
||||
requestsTotal: 0,
|
||||
backends: [],
|
||||
frontendProtocols: null,
|
||||
backendProtocols: null,
|
||||
lastUpdated: 0,
|
||||
isLoading: false,
|
||||
error: null,
|
||||
@@ -523,6 +527,8 @@ export const fetchNetworkStatsAction = networkStatePart.createAction(async (stat
|
||||
requestsPerSecond: networkStatsResponse.requestsPerSecond || 0,
|
||||
requestsTotal: networkStatsResponse.requestsTotal || 0,
|
||||
backends: networkStatsResponse.backends || [],
|
||||
frontendProtocols: networkStatsResponse.frontendProtocols || null,
|
||||
backendProtocols: networkStatsResponse.backendProtocols || null,
|
||||
lastUpdated: Date.now(),
|
||||
isLoading: false,
|
||||
error: null,
|
||||
@@ -1845,6 +1851,8 @@ async function dispatchCombinedRefreshActionInner() {
|
||||
requestsPerSecond: network.requestsPerSecond || 0,
|
||||
requestsTotal: network.requestsTotal || 0,
|
||||
backends: network.backends || [],
|
||||
frontendProtocols: network.frontendProtocols || null,
|
||||
backendProtocols: network.backendProtocols || null,
|
||||
lastUpdated: Date.now(),
|
||||
isLoading: false,
|
||||
error: null,
|
||||
@@ -1866,6 +1874,8 @@ async function dispatchCombinedRefreshActionInner() {
|
||||
requestsPerSecond: network.requestsPerSecond || 0,
|
||||
requestsTotal: network.requestsTotal || 0,
|
||||
backends: network.backends || [],
|
||||
frontendProtocols: network.frontendProtocols || null,
|
||||
backendProtocols: network.backendProtocols || null,
|
||||
lastUpdated: Date.now(),
|
||||
isLoading: false,
|
||||
error: null,
|
||||
|
||||
Reference in New Issue
Block a user