Skip to content

SigNoz is an open-source, OpenTelemetry-native observability platform for your team and their AI agents. Get logs, metrics, and traces in one tool with features like APM, distributed tracing, log management, infra monitoring, etc. Combined with SigNoz MCP and a native AI teammate (in SigNoz Cloud) it helps you build more resilient apps.

removes hardcoding

dhrubesh45f1c2ec1110
diff --git a/frontend/src/store/actions/serviceMap.ts b/frontend/src/store/actions/serviceMap.ts
index d8706fecda..a8a660d423 100644
--- a/frontend/src/store/actions/serviceMap.ts
+++ b/frontend/src/store/actions/serviceMap.ts
@@ -44,36 +44,8 @@ export const getServiceMapItems = (globalTime: GlobalTime) => {
"&end=" +
globalTime.maxTime;
- // const response = await api.get<servicesMapItem[]>(apiV1 + request_string);
- const response = {
- data: [
- {
- parent: "driver",
- child: "redisredisredisredisredisredisredisredisre",
- callCount: 17050,
- },
- {
- parent: "frontend",
- child: "driver",
- callCount: 1263,
- },
- {
- parent: "customer",
- child: "mysql",
- callCount: 1262,
- },
- {
- parent: "frontend",
- child: "customer",
- callCount: 1262,
- },
- {
- parent: "frontend",
- child: "route",
- callCount: 12636,
- },
- ],
- };
+ const response = await api.get<servicesMapItem[]>(apiV1 + request_string);
+
dispatch<serviceMapItemAction>({
type: ActionTypes.getServiceMapItems,
payload: response.data,
@@ -86,77 +58,8 @@ export const getDetailedServiceMapItems = (globalTime: GlobalTime) => {
let request_string =
"/services?start=" + globalTime.minTime + "&end=" + globalTime.maxTime;
- // const response = await api.get<servicesItem[]>(apiV1 + request_string);
- const response = {
- data: [
- {
- serviceName: "redisredisredisredisredisredisredisredisre",
- p99: 1179518000,
- avgDuration: 742158850,
- numCalls: 1898,
- callRate: 0.019097411,
- numErrors: 0,
- errorRate: 3,
- num4XX: 0,
- fourXXRate: 0,
- },
- {
- serviceName: "mysql",
- p99: 1179518000,
- avgDuration: 742158850,
- numCalls: 1898,
- callRate: 0.019097411,
- numErrors: 0,
- errorRate: 0,
- num4XX: 0,
- fourXXRate: 0,
- },
- {
- serviceName: "frontend",
- p99: 1179518000,
- avgDuration: 742158850,
- numCalls: 1898,
- callRate: 0.000019097411,
- numErrors: 0,
- errorRate: 0,
- num4XX: 0,
- fourXXRate: 0,
- },
- {
- serviceName: "customer",
- p99: 728385000,
- avgDuration: 342475680,
- numCalls: 1897,
- callRate: 0.000019087349,
- numErrors: 0,
- errorRate: 0,
- num4XX: 0,
- fourXXRate: 0.6325778,
- },
- {
- serviceName: "driver",
- p99: 243808000,
- avgDuration: 204640670,
- numCalls: 1898,
- callRate: 0.000019097411,
- numErrors: 0,
- errorRate: 0,
- num4XX: 0,
- fourXXRate: 0.63224447,
- },
- {
- serviceName: "route",
- p99: 79419000,
- avgDuration: 50748804,
- numCalls: 18979,
- callRate: 0.00019096404,
- numErrors: 0,
- errorRate: 3,
- num4XX: 0,
- fourXXRate: 0,
- },
- ],
- };
+ const response = await api.get<servicesItem[]>(apiV1 + request_string);
+
dispatch<servicesAction>({
type: ActionTypes.getServices,
payload: response.data,