Skip to content

Commit 28c8df5

Browse files
authored
Fix(FE):trace page (#356)
* chore: Router provider is removed * update: localstorage set get is added * update: AppLayout is updated * fix: adapter type is fixed * fix: Metric and metric application is now fixed * fix: Metrics page application is updated * fix: Tracepage is made fix * fix: app layout is updated * fix: global Time reducer is updated * refactor: getService api is added * update: metrics reducer is added * update: service list is fixed * fix: Metrics page is updated * fix: api for the metrics application are done * fix: metrics reducer is updated * fix: metrics application is updated * fix: content layout shift is removed * fix: Metric application is updated * fix: metrics application is updated * fix: Metrics application is updated * fix: Application tab is updated * chore: graph is updated * chore: Metrics application is updated * fix: chart x-axis is label is now fixed * fix: application tab is updated * fix: Top end points is added and re-redering in stopped * fix: fixed the edge case when user changes the global time then updated data is fetched * fix: Settings page is updated * chore: AppLayout is updated * chore: AppLayout is updated * chore: applayout is updated * chore: changed default loading is true in the global time reducer * chore: Global Time option is fixed * chore: Signup and Applayout is updated * chore: Button text is updated * chore: Button in the metrics application is updated * chore: dashboard menu item position in the side nav is updated * fix: Logo is now redirecting to the Application page * fix: Application page is updated * fix: AppLayout is updated * fix: starting and ending time is fixed * fix: Metrics Application is updated to the previous chart data * update: getDateArrayFromStartAndEnd function is added * update: Empty graph data is added * fix: External Call and DB Call Tabs graph are updated when there is no data a empty data is rendered * fix: onboarding modal condition is fixed and new calling api every 50000 ms to fetch the data * fix: onBoarding condition modal is updated * fix: onBoarding condition modal is updated * fix: onBoarding condition modal is updated * fix: Application chart re rendering issue is fixed * fix: Application page is changed when we change the global time * chore: step size is increased from 30 to 60 * chore: build is now fixed * chore: metrics application page is updated * fix: empty graph is now fixed * fix: application metrics graph is now fixed * update: seperate api for trace page are made * fix: /trace page is updated * chore: Filter of the Trace page is updated * chore: initial trace page is updated * fix: changing the filters,fetches the updated values from the backend * chore: Trace page is updated * update: trace page is updated * fix: trace page is updated * Refresh Text is updated * update: Trace page is updated * update:header is updated * update: Trace page is updated * update: Trace page is updated * update: Trace page is updated * update: Trace page is updated * update: why did you re render is added * update: trace page is updated * update: trace page is updated * update: Loading is updated * update: start and end time is updated * fix: metrics and metrics page redudant calls is reduced * fix: Metrics Application page reducer is reset on the unmount * fix: Trace page reducer is reset when the page is unmounted * fix: Custom Visualizations is now fetching only one api to get the details * fix: Trace page is updated * fix: composeEnhancers is updated * fix: metrics application is updated * chore: webpack eslint fixes are updated * chore: some of the type definition is added * fix(UI): Trace page bug is resolved * chore(UI): if length of the selected tags is zero updated the value over the form * chore(UI): check for the no spans filter is updated
1 parent 5108156 commit 28c8df5

File tree

84 files changed

+2986
-372
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+2986
-372
lines changed

frontend/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@
145145
"@types/webpack-dev-server": "^4.3.0",
146146
"@typescript-eslint/eslint-plugin": "^4.28.2",
147147
"@typescript-eslint/parser": "^4.28.2",
148+
"@welldone-software/why-did-you-render": "^6.2.1",
148149
"autoprefixer": "^9.0.0",
149150
"babel-plugin-styled-components": "^1.12.0",
150151
"compression-webpack-plugin": "^9.0.0",

frontend/src/AppRoutes/pageComponents.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ export const TraceDetailPage = Loadable(
2525
),
2626
);
2727

28+
export const TraceDetailPages = Loadable(
29+
() => import(/* webpackChunkName: "TraceDetailPage" */ 'pages/TraceDetails'),
30+
);
31+
2832
export const TraceGraphPage = Loadable(
2933
() =>
3034
import(

frontend/src/AppRoutes/routes.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
SettingsPage,
1313
SignupPage,
1414
TraceDetailPage,
15+
TraceDetailPages,
1516
TraceGraphPage,
1617
UsageExplorerPage,
1718
} from './pageComponents';
@@ -77,6 +78,11 @@ const routes: AppRoutes[] = [
7778
exact: true,
7879
component: DashboardWidget,
7980
},
81+
{
82+
path: ROUTES.TRACE,
83+
exact: true,
84+
component: TraceDetailPages,
85+
},
8086
];
8187

8288
interface AppRoutes {
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import axios from 'api';
2+
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
3+
import { AxiosError } from 'axios';
4+
import { ErrorResponse, SuccessResponse } from 'types/api';
5+
import { PayloadProps } from 'types/api/trace/getServiceList';
6+
7+
const getServiceList = async (): Promise<
8+
SuccessResponse<PayloadProps> | ErrorResponse
9+
> => {
10+
try {
11+
const response = await axios.get('/services/list');
12+
13+
return {
14+
statusCode: 200,
15+
error: null,
16+
message: 'Success',
17+
payload: response.data,
18+
};
19+
} catch (error) {
20+
return ErrorResponseHandler(error as AxiosError);
21+
}
22+
};
23+
24+
export default getServiceList;
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import axios from 'api';
2+
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
3+
import { AxiosError } from 'axios';
4+
import { ErrorResponse, SuccessResponse } from 'types/api';
5+
import { PayloadProps, Props } from 'types/api/trace/getServiceOperation';
6+
7+
const getServiceOperation = async (
8+
props: Props,
9+
): Promise<SuccessResponse<PayloadProps> | ErrorResponse> => {
10+
try {
11+
const response = await axios.get(`/service/${props.service}/operations`);
12+
13+
return {
14+
statusCode: 200,
15+
error: null,
16+
message: 'Success',
17+
payload: response.data,
18+
};
19+
} catch (error) {
20+
return ErrorResponseHandler(error as AxiosError);
21+
}
22+
};
23+
24+
export default getServiceOperation;

frontend/src/api/trace/getSpan.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import axios from 'api';
2+
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
3+
import { AxiosError } from 'axios';
4+
import { ErrorResponse, SuccessResponse } from 'types/api';
5+
import { PayloadProps, Props } from 'types/api/trace/getSpans';
6+
7+
const getSpans = async (
8+
props: Props,
9+
): Promise<SuccessResponse<PayloadProps> | ErrorResponse> => {
10+
try {
11+
const response = await axios.get(
12+
`/spans?&start=${props.start}&end=${props.end}&kind=${props.kind}&lookback=${props.lookback}&maxDuration=${props.maxDuration}&minDuration=${props.minDuration}&operation=${props.operation}&service=${props.service}&limit=${props.limit}&tags=${props.tags}`,
13+
);
14+
15+
return {
16+
statusCode: 200,
17+
error: null,
18+
message: 'Success',
19+
payload: response.data,
20+
};
21+
} catch (error) {
22+
return ErrorResponseHandler(error as AxiosError);
23+
}
24+
};
25+
26+
export default getSpans;
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import axios from 'api';
2+
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
3+
import { AxiosError } from 'axios';
4+
import { ErrorResponse, SuccessResponse } from 'types/api';
5+
import { PayloadProps, Props } from 'types/api/trace/getSpanAggregate';
6+
7+
const getSpansAggregate = async (
8+
props: Props,
9+
): Promise<SuccessResponse<PayloadProps> | ErrorResponse> => {
10+
try {
11+
const response = await axios.get(
12+
`/spans/aggregates?start=${props.start}&end=${props.end}&aggregation_option=${props.aggregation_option}&dimension=${props.dimension}&kind=${props.kind}&maxDuration=${props.maxDuration}&minDuration=${props.minDuration}&operation=${props.operation}&service=${props.service}&step=${props.step}&tags=${props.tags}`,
13+
);
14+
15+
return {
16+
statusCode: 200,
17+
error: null,
18+
message: 'Success',
19+
payload: response.data,
20+
};
21+
} catch (error) {
22+
return ErrorResponseHandler(error as AxiosError);
23+
}
24+
};
25+
26+
export default getSpansAggregate;

frontend/src/api/trace/getTags.ts

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import axios from 'api';
2+
import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
3+
import { AxiosError } from 'axios';
4+
import { ErrorResponse, SuccessResponse } from 'types/api';
5+
import { PayloadProps, Props } from 'types/api/trace/getTags';
6+
7+
const getTags = async (
8+
props: Props,
9+
): Promise<SuccessResponse<PayloadProps> | ErrorResponse> => {
10+
try {
11+
const response = await axios.get(`/tags?service=${props.service}`);
12+
13+
return {
14+
statusCode: 200,
15+
error: null,
16+
message: 'Success',
17+
payload: response.data,
18+
};
19+
} catch (error) {
20+
return ErrorResponseHandler(error as AxiosError);
21+
}
22+
};
23+
24+
export default getTags;

frontend/src/constants/query.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,9 @@ export enum METRICS_PAGE_QUERY_PARAM {
66
error = 'error',
77
operation = 'operation',
88
kind = 'kind',
9+
latencyMax = 'latencyMax',
10+
latencyMin = 'latencyMin',
11+
selectedTags = 'selectedTags',
12+
aggregationOption = 'aggregationOption',
13+
entity = 'entity',
914
}

frontend/src/constants/routes.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ const ROUTES = {
33
SERVICE_METRICS: '/application/:servicename',
44
SERVICE_MAP: '/service-map',
55
TRACES: '/traces',
6+
TRACE: '/trace',
67
TRACE_GRAPH: '/traces/:id',
78
SETTINGS: '/settings',
89
INSTRUMENTATION: '/add-instrumentation',

0 commit comments

Comments
 (0)