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.

feat: tag value suggestion is updated

Palash gupta5556d1d6fc8f
diff --git a/frontend/src/container/Trace/Search/AllTags/Tag/DebounceSelect/index.tsx b/frontend/src/container/Trace/Search/AllTags/Tag/DebounceSelect/index.tsx
index 1971947820..2576e782e0 100644
--- a/frontend/src/container/Trace/Search/AllTags/Tag/DebounceSelect/index.tsx
+++ b/frontend/src/container/Trace/Search/AllTags/Tag/DebounceSelect/index.tsx
@@ -51,7 +51,7 @@ function DebounceSelect<
filterOption={false}
onSearch={debounceFetcher}
notFoundContent={fetching ? <Spin size="small" /> : null}
- style={{ minWidth: '170px' }}
+ style={{ width: '170px' }}
// as all other props are from SelectProps only
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
diff --git a/frontend/src/container/Trace/Search/AllTags/Tag/config.ts b/frontend/src/container/Trace/Search/AllTags/Tag/config.ts
index 07ee042621..ce414a5f15 100644
--- a/frontend/src/container/Trace/Search/AllTags/Tag/config.ts
+++ b/frontend/src/container/Trace/Search/AllTags/Tag/config.ts
@@ -21,12 +21,8 @@ export async function fetchTag(
return [];
}
- console.log(response.payload);
-
- return [
- {
- label: 'asd',
- value: 'asd',
- },
- ];
+ return response.payload.map((e) => ({
+ label: e.tagValues,
+ value: e.tagValues,
+ }));
}
diff --git a/frontend/src/container/Trace/Search/AllTags/Tag/index.tsx b/frontend/src/container/Trace/Search/AllTags/Tag/index.tsx
index 8bcf15757a..37b42347a1 100644
--- a/frontend/src/container/Trace/Search/AllTags/Tag/index.tsx
+++ b/frontend/src/container/Trace/Search/AllTags/Tag/index.tsx
@@ -83,27 +83,22 @@ function SingleTags(props: AllTagsProps): JSX.Element {
<DebounceSelect
fetchOptions={(): Promise<TagValue[]> =>
- fetchTag(globalReducer.minTime, globalReducer.maxTime, selectedKey[0])
+ fetchTag(globalReducer.minTime, globalReducer.maxTime, selectedKey[index])
}
debounceTimeout={300}
- mode="tags"
- />
-
- {/* <ValueSelect
- value={selectedValues}
- onChange={(value): void => {
+ onSelect={(value: Value): void => {
setLocalSelectedTags((tags) => [
...tags.slice(0, index),
{
Key: selectedKey,
Operator: selectedOperator,
- Values: value as string[],
+ Values: [...selectedValues, value.value],
},
...tags.slice(index + 1, tags.length),
]);
}}
- mode="tags"
- /> */}
+ mode="multiple"
+ />
<IconContainer role="button" onClick={(): void => onDeleteTagHandler(index)}>
<CloseOutlined />
@@ -121,4 +116,10 @@ interface AllTagsProps {
>;
}
+interface Value {
+ key: string;
+ label: string;
+ value: string;
+}
+
export default SingleTags;
diff --git a/frontend/src/types/api/trace/getTagValue.ts b/frontend/src/types/api/trace/getTagValue.ts
index 221be8dfba..e90975d1d5 100644
--- a/frontend/src/types/api/trace/getTagValue.ts
+++ b/frontend/src/types/api/trace/getTagValue.ts
@@ -6,6 +6,8 @@ export interface Props {
tagKey: string;
}
-export interface PayloadProps {
- key: string;
+interface Value {
+ tagValues: string;
}
+
+export type PayloadProps = Value[];