Skip to content

Commit

Permalink
chore: directly use deployment.environment, rather than converting re…
Browse files Browse the repository at this point in the history
…source_deployment_environment
  • Loading branch information
ahmadshaheer committed Sep 6, 2024
1 parent 9a9b22d commit 8cb2bd5
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions frontend/src/pages/TracesExplorer/Filter/filterUtils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable react-hooks/exhaustive-deps */
import { getAttributesValues } from 'api/queryBuilder/getAttributesValues';
import { convertMetricKeyToTrace } from 'hooks/useResourceAttribute/utils';
import { Dispatch, SetStateAction, useEffect, useState } from 'react';
import {
BaseAutocompleteData,
Expand All @@ -9,14 +8,11 @@ import {
import { TagFilterItem } from 'types/api/queryBuilder/queryBuilderData';
import { DataSource } from 'types/common/queryBuilder';

const RESOURCE_DEPLOYMENT_ENVIRONMENT = convertMetricKeyToTrace(
'resource_deployment_environment',
);
export const AllTraceFilterKeyValue: Record<string, string> = {
durationNanoMin: 'Duration',
durationNano: 'Duration',
durationNanoMax: 'Duration',
[RESOURCE_DEPLOYMENT_ENVIRONMENT]: 'Environment',
'deployment.environment': 'Environment',
hasError: 'Status',
serviceName: 'Service Name',
name: 'Operation / Name',
Expand Down Expand Up @@ -208,13 +204,13 @@ export const traceFilterKeys: Record<
id: 'serviceName--string--tag--true',
},

[RESOURCE_DEPLOYMENT_ENVIRONMENT]: {
key: RESOURCE_DEPLOYMENT_ENVIRONMENT,
'deployment.environment': {
key: 'deployment.environment',
dataType: DataTypes.String,
type: 'resource',
isColumn: false,
isJSON: false,
id: `${RESOURCE_DEPLOYMENT_ENVIRONMENT}--string--resource--false`,
id: 'deployment.environment--string--resource--false',
},
name: {
key: 'name',
Expand Down

0 comments on commit 8cb2bd5

Please sign in to comment.