mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-12 07:39:00 +08:00
feat: error rate is added (#2638)
* feat: error rate is added * fix: build is fixed * chore: added the percentage sign
This commit is contained in:
parent
f45ac7855e
commit
93220ba6c2
@ -39,7 +39,7 @@ function TopOperationsTable(props: TopOperationsTableProps): JSX.Element {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns: ColumnsType<DataProps> = [
|
const columns: ColumnsType<TopOperationList> = [
|
||||||
{
|
{
|
||||||
title: 'Name',
|
title: 'Name',
|
||||||
dataIndex: 'name',
|
dataIndex: 'name',
|
||||||
@ -58,7 +58,7 @@ function TopOperationsTable(props: TopOperationsTableProps): JSX.Element {
|
|||||||
dataIndex: 'p50',
|
dataIndex: 'p50',
|
||||||
key: 'p50',
|
key: 'p50',
|
||||||
width: 50,
|
width: 50,
|
||||||
sorter: (a: DataProps, b: DataProps): number => a.p50 - b.p50,
|
sorter: (a: TopOperationList, b: TopOperationList): number => a.p50 - b.p50,
|
||||||
render: (value: number): string => (value / 1000000).toFixed(2),
|
render: (value: number): string => (value / 1000000).toFixed(2),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -66,7 +66,7 @@ function TopOperationsTable(props: TopOperationsTableProps): JSX.Element {
|
|||||||
dataIndex: 'p95',
|
dataIndex: 'p95',
|
||||||
key: 'p95',
|
key: 'p95',
|
||||||
width: 50,
|
width: 50,
|
||||||
sorter: (a: DataProps, b: DataProps): number => a.p95 - b.p95,
|
sorter: (a: TopOperationList, b: TopOperationList): number => a.p95 - b.p95,
|
||||||
render: (value: number): string => (value / 1000000).toFixed(2),
|
render: (value: number): string => (value / 1000000).toFixed(2),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -74,7 +74,7 @@ function TopOperationsTable(props: TopOperationsTableProps): JSX.Element {
|
|||||||
dataIndex: 'p99',
|
dataIndex: 'p99',
|
||||||
key: 'p99',
|
key: 'p99',
|
||||||
width: 50,
|
width: 50,
|
||||||
sorter: (a: DataProps, b: DataProps): number => a.p99 - b.p99,
|
sorter: (a: TopOperationList, b: TopOperationList): number => a.p99 - b.p99,
|
||||||
render: (value: number): string => (value / 1000000).toFixed(2),
|
render: (value: number): string => (value / 1000000).toFixed(2),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -82,9 +82,19 @@ function TopOperationsTable(props: TopOperationsTableProps): JSX.Element {
|
|||||||
dataIndex: 'numCalls',
|
dataIndex: 'numCalls',
|
||||||
key: 'numCalls',
|
key: 'numCalls',
|
||||||
width: 50,
|
width: 50,
|
||||||
sorter: (a: TopOperationListItem, b: TopOperationListItem): number =>
|
sorter: (a: TopOperationList, b: TopOperationList): number =>
|
||||||
a.numCalls - b.numCalls,
|
a.numCalls - b.numCalls,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'Error Rate',
|
||||||
|
dataIndex: 'errorCount',
|
||||||
|
key: 'errorCount',
|
||||||
|
width: 50,
|
||||||
|
sorter: (a: TopOperationList, b: TopOperationList): number =>
|
||||||
|
a.errorCount - b.errorCount,
|
||||||
|
render: (value: number, record: TopOperationList): string =>
|
||||||
|
`${((value / record.numCalls) * 100).toFixed(2)} %`,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -99,18 +109,17 @@ function TopOperationsTable(props: TopOperationsTableProps): JSX.Element {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TopOperationListItem {
|
export interface TopOperationList {
|
||||||
p50: number;
|
p50: number;
|
||||||
p95: number;
|
p95: number;
|
||||||
p99: number;
|
p99: number;
|
||||||
numCalls: number;
|
numCalls: number;
|
||||||
name: string;
|
name: string;
|
||||||
|
errorCount: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
type DataProps = TopOperationListItem;
|
|
||||||
|
|
||||||
interface TopOperationsTableProps {
|
interface TopOperationsTableProps {
|
||||||
data: TopOperationListItem[];
|
data: TopOperationList[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default TopOperationsTable;
|
export default TopOperationsTable;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
import { TopOperationList } from 'container/MetricsApplication/TopOperationsTable';
|
||||||
import { ServicesList } from 'types/api/metrics/getService';
|
import { ServicesList } from 'types/api/metrics/getService';
|
||||||
import { ServiceOverview } from 'types/api/metrics/getServiceOverview';
|
import { ServiceOverview } from 'types/api/metrics/getServiceOverview';
|
||||||
import { TopOperations } from 'types/api/metrics/getTopOperations';
|
|
||||||
|
|
||||||
export const GET_SERVICE_LIST_SUCCESS = 'GET_SERVICE_LIST_SUCCESS';
|
export const GET_SERVICE_LIST_SUCCESS = 'GET_SERVICE_LIST_SUCCESS';
|
||||||
export const GET_SERVICE_LIST_LOADING_START = 'GET_SERVICE_LIST_LOADING_START';
|
export const GET_SERVICE_LIST_LOADING_START = 'GET_SERVICE_LIST_LOADING_START';
|
||||||
@ -32,7 +32,7 @@ export interface GetServiceListError {
|
|||||||
export interface GetInitialApplicationData {
|
export interface GetInitialApplicationData {
|
||||||
type: typeof GET_INTIAL_APPLICATION_DATA;
|
type: typeof GET_INTIAL_APPLICATION_DATA;
|
||||||
payload: {
|
payload: {
|
||||||
topOperations: TopOperations[];
|
topOperations: TopOperationList[];
|
||||||
// dbOverView: DBOverView[];
|
// dbOverView: DBOverView[];
|
||||||
// externalService: ExternalService[];
|
// externalService: ExternalService[];
|
||||||
// externalAverageDuration: ExternalAverageDuration[];
|
// externalAverageDuration: ExternalAverageDuration[];
|
||||||
|
@ -1,13 +1,6 @@
|
|||||||
|
import { TopOperationList } from 'container/MetricsApplication/TopOperationsTable';
|
||||||
import { Tags } from 'types/reducer/trace';
|
import { Tags } from 'types/reducer/trace';
|
||||||
|
|
||||||
export interface TopOperations {
|
|
||||||
name: string;
|
|
||||||
numCalls: number;
|
|
||||||
p50: number;
|
|
||||||
p95: number;
|
|
||||||
p99: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface Props {
|
export interface Props {
|
||||||
service: string;
|
service: string;
|
||||||
start: number;
|
start: number;
|
||||||
@ -15,4 +8,4 @@ export interface Props {
|
|||||||
selectedTags: Tags[];
|
selectedTags: Tags[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PayloadProps = TopOperations[];
|
export type PayloadProps = TopOperationList[];
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
|
import { TopOperationList } from 'container/MetricsApplication/TopOperationsTable';
|
||||||
import { DBOverView } from 'types/api/metrics/getDBOverview';
|
import { DBOverView } from 'types/api/metrics/getDBOverview';
|
||||||
import { ExternalAverageDuration } from 'types/api/metrics/getExternalAverageDuration';
|
import { ExternalAverageDuration } from 'types/api/metrics/getExternalAverageDuration';
|
||||||
import { ExternalError } from 'types/api/metrics/getExternalError';
|
import { ExternalError } from 'types/api/metrics/getExternalError';
|
||||||
import { ExternalService } from 'types/api/metrics/getExternalService';
|
import { ExternalService } from 'types/api/metrics/getExternalService';
|
||||||
import { ServicesList } from 'types/api/metrics/getService';
|
import { ServicesList } from 'types/api/metrics/getService';
|
||||||
import { ServiceOverview } from 'types/api/metrics/getServiceOverview';
|
import { ServiceOverview } from 'types/api/metrics/getServiceOverview';
|
||||||
import { TopOperations } from 'types/api/metrics/getTopOperations';
|
|
||||||
|
|
||||||
interface MetricReducer {
|
interface MetricReducer {
|
||||||
services: ServicesList[];
|
services: ServicesList[];
|
||||||
@ -14,7 +14,7 @@ interface MetricReducer {
|
|||||||
errorMessage: string;
|
errorMessage: string;
|
||||||
dbOverView: DBOverView[];
|
dbOverView: DBOverView[];
|
||||||
externalService: ExternalService[];
|
externalService: ExternalService[];
|
||||||
topOperations: TopOperations[];
|
topOperations: TopOperationList[];
|
||||||
externalAverageDuration: ExternalAverageDuration[];
|
externalAverageDuration: ExternalAverageDuration[];
|
||||||
externalError: ExternalError[];
|
externalError: ExternalError[];
|
||||||
serviceOverview: ServiceOverview[];
|
serviceOverview: ServiceOverview[];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user