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.

chore: getTagValue api is added

Palash gupta225a345baa29
diff --git a/frontend/src/api/trace/getTagValue.ts b/frontend/src/api/trace/getTagValue.ts
new file mode 100644
index 0000000000..25156d32ef
--- /dev/null
+++ b/frontend/src/api/trace/getTagValue.ts
@@ -0,0 +1,28 @@
+import axios from 'api';
+import { ErrorResponseHandler } from 'api/ErrorResponseHandler';
+import { AxiosError } from 'axios';
+import { ErrorResponse, SuccessResponse } from 'types/api';
+import { PayloadProps, Props } from 'types/api/trace/getTagValue';
+
+const getTagValue = async (
+ props: Props,
+): Promise<SuccessResponse<PayloadProps> | ErrorResponse> => {
+ try {
+ const response = await axios.post<PayloadProps>(`/getTagValues`, {
+ start: props.start.toString(),
+ end: props.end.toString(),
+ tagKey: props.tagKey,
+ });
+
+ return {
+ statusCode: 200,
+ error: null,
+ message: 'Success',
+ payload: response.data,
+ };
+ } catch (error) {
+ return ErrorResponseHandler(error as AxiosError);
+ }
+};
+
+export default getTagValue;