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.
TypeScript apmapplication-monitoringdistributed-tracinggogood-first-issuejaegerloglogsmetricsmonitoringnextjsobservabilityopen-sourceopentelemetryprometheusreactreactjsself-hostedtracingtypescript
feat: PR review changes
Pranshu Chittora7f3d9e2e35b5
diff --git a/frontend/src/components/Styled/index.ts b/frontend/src/components/Styled/index.tsindex 45b53896d1..bff30f653e 100644--- a/frontend/src/components/Styled/index.ts+++ b/frontend/src/components/Styled/index.ts@@ -3,10 +3,7 @@ import { TextProps } from 'antd/lib/typography/Text';import { TitleProps } from 'antd/lib/typography/Title';import React from 'react';import styled, {- css,- DefaultTheme,FlattenSimpleInterpolation,- ThemedCssFunction,} from 'styled-components';import { IStyledClass } from './types';@@ -14,52 +11,50 @@ import { IStyledClass } from './types';const styledClass = (props: IStyledClass): FlattenSimpleInterpolation =>props.styledclass;-interface IStyledCol extends AntD.ColProps, IStyledClass {}-const StyledCol = styled(AntD.Col)<IStyledCol>`+type TStyledCol = AntD.ColProps & IStyledClass;+const StyledCol = styled(AntD.Col)<TStyledCol>`${styledClass}`;-interface IStyledRow extends AntD.RowProps, IStyledClass {}-const StyledRow = styled(AntD.Row)<IStyledRow>`+type TStyledRow = AntD.RowProps & IStyledClass;+const StyledRow = styled(AntD.Row)<TStyledRow>`${styledClass}`;-interface IStyledDivider extends AntD.DividerProps, IStyledClass {}-const StyledDivider = styled(AntD.Divider)<IStyledDivider>`+type TStyledDivider = AntD.DividerProps & IStyledClass;+const StyledDivider = styled(AntD.Divider)<TStyledDivider>`${styledClass}`;-interface IStyledSpace extends AntD.SpaceProps, IStyledClass {}-const StyledSpace = styled(AntD.Space)<IStyledSpace>`+type TStyledSpace = AntD.SpaceProps & IStyledClass;+const StyledSpace = styled(AntD.Space)<TStyledSpace>`${styledClass}`;-interface IStyledTabs extends AntD.TabsProps, IStyledClass {}-const StyledTabs = styled(AntD.Divider)<IStyledTabs>`+type TStyledTabs = AntD.TabsProps & IStyledClass;+const StyledTabs = styled(AntD.Divider)<TStyledTabs>`${styledClass}`;-interface IStyledButton extends AntD.ButtonProps, IStyledClass {}-const StyledButton = styled(AntD.Button)<IStyledButton>`+type TStyledButton = AntD.ButtonProps & IStyledClass;+const StyledButton = styled(AntD.Button)<TStyledButton>`${styledClass}`;const { Text } = AntD.Typography;-interface IStyledTypographyText extends TextProps, IStyledClass {}-const StyledTypographyText = styled(Text)<IStyledTypographyText>`+type TStyledTypographyText = TextProps & IStyledClass;+const StyledTypographyText = styled(Text)<TStyledTypographyText>`${styledClass}`;const { Title } = AntD.Typography;-interface IStyledTypographyTitle extends TitleProps, IStyledClass {}-const StyledTypographyTitle = styled(Title)<IStyledTypographyTitle>`+type TStyledTypographyTitle = TitleProps & IStyledClass;+const StyledTypographyTitle = styled(Title)<TStyledTypographyTitle>`${styledClass}`;-interface IStyledDiv- extends React.HTMLAttributes<HTMLDivElement>,- IStyledClass {}-const StyledDiv = styled.div<IStyledDiv>`+type TStyledDiv = React.HTMLAttributes<HTMLDivElement> & IStyledClass;+const StyledDiv = styled.div<TStyledDiv>`${styledClass}`;diff --git a/frontend/src/components/Styled/styles.ts b/frontend/src/components/Styled/styles.tsindex 153ef27a94..8425beae07 100644--- a/frontend/src/components/Styled/styles.ts+++ b/frontend/src/components/Styled/styles.ts@@ -1,6 +1,6 @@import { css, FlattenSimpleInterpolation } from 'styled-components';-const cssProprty = (key: string, value: any): FlattenSimpleInterpolation =>+const cssProprty = (key: string, value): FlattenSimpleInterpolation =>key &&value &&css`diff --git a/frontend/src/container/Timeline/index.tsx b/frontend/src/container/Timeline/index.tsxindex 2e3fbd2053..6458b8a5a3 100644--- a/frontend/src/container/Timeline/index.tsx+++ b/frontend/src/container/Timeline/index.tsx@@ -1,5 +1,5 @@import { StyledDiv } from 'components/Styled';-import { INTERVAL_UNITS } from 'container/TraceDetail/utils';+import { IIntervalUnit, INTERVAL_UNITS } from 'container/TraceDetail/utils';import useThemeMode from 'hooks/useThemeMode';import React, { useEffect, useState } from 'react';import { useMeasure } from 'react-use';@@ -68,10 +68,9 @@ const Timeline = ({{intervals &&intervals.map((interval, index) => (<TimelineInterval- transform={`translate(${- Timeline_H_Spacing ++ transform={`translate(${Timeline_H_Spacing +(interval.percentage * (width - 2 * Timeline_H_Spacing)) / 100- },0)`}+ },0)`}key={`${interval.label + interval.percentage + index}`}><text y={13} fill={isDarkMode ? 'white' : 'black'}>@@ -93,7 +92,7 @@ const Timeline = ({interface TimelineProps {traceMetaData: object;globalTraceMetadata: object;- intervalUnit: object;+ intervalUnit: IIntervalUnit;setIntervalUnit: any;}diff --git a/frontend/src/container/TraceDetail/index.tsx b/frontend/src/container/TraceDetail/index.tsxindex 553f4f292b..e89d78530a 100644--- a/frontend/src/container/TraceDetail/index.tsx+++ b/frontend/src/container/TraceDetail/index.tsx@@ -25,8 +25,7 @@ import { spanToTreeUtil } from 'utils/spanToTree';import SelectedSpanDetails from './SelectedSpanDetails';import * as styles from './styles';-import { getSortedData } from './utils';-import { INTERVAL_UNITS } from './utils';+import { getSortedData, IIntervalUnit, INTERVAL_UNITS } from './utils';const TraceDetail = ({ response }: TraceDetailProps): JSX.Element => {const spanServiceColors = useMemo(@@ -37,7 +36,9 @@ const TraceDetail = ({ response }: TraceDetailProps): JSX.Element => {const urlQuery = useUrlQuery();const [spanId] = useState<string | null>(urlQuery.get('spanId'));- const [intervalUnit, setIntervalUnit] = useState(INTERVAL_UNITS[0]);+ const [intervalUnit, setIntervalUnit] = useState<IIntervalUnit>(+ INTERVAL_UNITS[0],+ );// const [searchSpanString, setSearchSpanString] = useState('');const [activeHoverId, setActiveHoverId] = useState<string>('');const [activeSelectedId, setActiveSelectedId] = useState<string>(spanId || '');diff --git a/frontend/src/container/TraceFlameGraph/index.tsx b/frontend/src/container/TraceFlameGraph/index.tsxindex bbf35b9fce..344098624f 100644--- a/frontend/src/container/TraceFlameGraph/index.tsx+++ b/frontend/src/container/TraceFlameGraph/index.tsx@@ -5,7 +5,6 @@ import {} from 'container/TraceDetail/utils';import useThemeMode from 'hooks/useThemeMode';import React, { useLayoutEffect, useMemo, useState } from 'react';-import { pushDStree } from 'store/actions';import { ITraceTree } from 'types/api/trace/getTraceItem';import { toFixed } from 'utils/toFixed';