From 1d1ec09a06ff5497bb9659af7672ef3ccf48e2f1 Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Tue, 28 Jan 2025 18:54:33 +0100 Subject: [PATCH 1/4] Update insight icons --- .../components/common/InsightIcon/types.ts | 1 + .../components/common/InsightIcon/utils.ts | 9 ++++++-- .../src/components/common/icons/PulseIcon.tsx | 22 +++++++++++++++++++ .../components/common/icons/SoundWaveIcon.tsx | 22 +++++++++++++++++++ .../icons/TwoHorizontalEndpointsIcon.tsx | 20 ----------------- 5 files changed, 52 insertions(+), 22 deletions(-) create mode 100644 packages/jaeger-ui/src/components/common/icons/PulseIcon.tsx create mode 100644 packages/jaeger-ui/src/components/common/icons/SoundWaveIcon.tsx delete mode 100644 packages/jaeger-ui/src/components/common/icons/TwoHorizontalEndpointsIcon.tsx diff --git a/packages/jaeger-ui/src/components/common/InsightIcon/types.ts b/packages/jaeger-ui/src/components/common/InsightIcon/types.ts index ff94be7d8f..ab94f9a6c7 100644 --- a/packages/jaeger-ui/src/components/common/InsightIcon/types.ts +++ b/packages/jaeger-ui/src/components/common/InsightIcon/types.ts @@ -32,4 +32,5 @@ export enum InsightType { EndpointQueryOptimization = 'EndpointQueryOptimization', EndpointQueryOptimizationV2 = 'EndpointQueryOptimizationV2', EndpointSlowdownSource = 'EndpointSlowdownSource', + SpanPerformanceAnomaly = 'SpanPerformanceAnomaly', } diff --git a/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts b/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts index 65b700525e..a8d7478620 100644 --- a/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts +++ b/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts @@ -14,7 +14,8 @@ import { IIconProps } from '../icons/types'; import { InsightType } from './types'; import ClockWithTicksIcon from '../icons/ClockWithTicksIcon'; import PieChartIcon from '../icons/PieChartIcon'; -import TwoHorizontalEndpointsIcon from '../icons/TwoHorizontalEndpointsIcon'; +import PulseIcon from '../icons/PulseIcon'; +import SoundWaveIcon from '../icons/SoundWaveIcon'; export const getInsightTypeInfo = ( type: InsightType @@ -100,7 +101,7 @@ export const getInsightTypeInfo = ( label: 'Session in View Query Detected', }, [InsightType.EndpointChattyApiV2]: { - icon: TwoHorizontalEndpointsIcon, + icon: SoundWaveIcon, label: 'Excessive API Calls Detected', }, [InsightType.EndpointHighNumberOfQueries]: { @@ -119,6 +120,10 @@ export const getInsightTypeInfo = ( icon: SQLDatabaseIcon, label: 'Inefficient Query', }, + [InsightType.SpanPerformanceAnomaly]: { + icon: PulseIcon, + label: 'Performance Anomaly', + }, }; return insightInfoMap[type]; diff --git a/packages/jaeger-ui/src/components/common/icons/PulseIcon.tsx b/packages/jaeger-ui/src/components/common/icons/PulseIcon.tsx new file mode 100644 index 0000000000..bbf22b2e8c --- /dev/null +++ b/packages/jaeger-ui/src/components/common/icons/PulseIcon.tsx @@ -0,0 +1,22 @@ +import React from 'react'; +import { useIconProps } from './hooks'; +import { IIconProps } from './types'; + +const PulseIconComponent = (props: IIconProps) => { + const { size, color } = useIconProps(props); + + return ( + + + + ); +}; + +const PulseIcon = React.memo(PulseIconComponent); + +export default PulseIcon; diff --git a/packages/jaeger-ui/src/components/common/icons/SoundWaveIcon.tsx b/packages/jaeger-ui/src/components/common/icons/SoundWaveIcon.tsx new file mode 100644 index 0000000000..ab570f02c7 --- /dev/null +++ b/packages/jaeger-ui/src/components/common/icons/SoundWaveIcon.tsx @@ -0,0 +1,22 @@ +import React from 'react'; +import { useIconProps } from './hooks'; +import { IIconProps } from './types'; + +const SoundWaveIconComponent = (props: IIconProps) => { + const { size, color } = useIconProps(props); + + return ( + + + + ); +}; + +const SoundWaveIcon = React.memo(SoundWaveIconComponent); + +export default SoundWaveIcon; diff --git a/packages/jaeger-ui/src/components/common/icons/TwoHorizontalEndpointsIcon.tsx b/packages/jaeger-ui/src/components/common/icons/TwoHorizontalEndpointsIcon.tsx deleted file mode 100644 index 6d4701831f..0000000000 --- a/packages/jaeger-ui/src/components/common/icons/TwoHorizontalEndpointsIcon.tsx +++ /dev/null @@ -1,20 +0,0 @@ -import React from 'react'; -import { useIconProps } from './hooks'; -import { IIconProps } from './types'; - -const TwoHorizontalEndpointsIconComponent = (props: IIconProps) => { - const { size, color } = useIconProps(props); - - return ( - - - - ); -}; - -const TwoHorizontalEndpointsIcon = React.memo(TwoHorizontalEndpointsIconComponent); - -export default TwoHorizontalEndpointsIcon; From 5bfed354962f0b65b4eb6ed515a8db950ec14833 Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Tue, 28 Jan 2025 20:27:30 +0100 Subject: [PATCH 2/4] Improve digma version bump action --- .github/workflows/digma-bump.yml | 34 +++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/.github/workflows/digma-bump.yml b/.github/workflows/digma-bump.yml index bee8fa5139..ba817e7af7 100644 --- a/.github/workflows/digma-bump.yml +++ b/.github/workflows/digma-bump.yml @@ -3,9 +3,18 @@ name: Bump Digma Jaeger UI version and push git tag on: workflow_dispatch: inputs: - version: - description: 'Version to set (e.g., 1.2.3)' + version_type: + description: 'Type of version bump' required: true + type: choice + options: + - major + - minor + - patch + - premajor + - preminor + - prepatch + - prerelease jobs: bump: @@ -24,14 +33,29 @@ jobs: VERSION=$(jq -r '.version' ./packages/jaeger-ui/package.json) echo "VERSION=$VERSION" >> $GITHUB_ENV + - name: Get current digma-jaeger-ui version + id: get-version + run: | + CURRENT_DIGMA_JAEGER_UI_VERSION=$(jq -r '.["digma-jaeger-ui-version"]' ./packages/jaeger-ui/package.json) + echo "CURRENT_DIGMA_JAEGER_UI_VERSION=$CURRENT_DIGMA_JAEGER_UI_VERSION" >> $GITHUB_ENV + + - name: Calculate next digma-jaeger-ui version + run: | + if [[ "${{ inputs.version_type }}" == "prerelease" || "${{ inputs.version_type }}" == "premajor" || "${{ inputs.version_type }}" == "preminor" || "${{ inputs.version_type }}" == "prepatch" ]]; then + NEXT_DIGMA_JAEGER_UI_VERSION=$(npx semver $CURRENT_DIGMA_JAEGER_UI_VERSION -i ${{ inputs.version_type }} --preid alpha) + else + NEXT_DIGMA_JAEGER_UI_VERSION=$(npx semver $CURRENT_DIGMA_JAEGER_UI_VERSION -i ${{ inputs.version_type }}) + fi + echo "NEXT_DIGMA_JAEGER_UI_VERSION=$NEXT_DIGMA_JAEGER_UI_VERSION" >> $GITHUB_ENV + - name: Update digma-jaeger-ui version run: | - jq '.["digma-jaeger-ui-version"] = "${{ inputs.version }}"' ./packages/jaeger-ui/package.json > tmp.$$.json && mv tmp.$$.json ./packages/jaeger-ui/package.json + jq '.["digma-jaeger-ui-version"] = "${{ env.NEXT_DIGMA_JAEGER_UI_VERSION }}"' ./packages/jaeger-ui/package.json > tmp.$$.json && mv tmp.$$.json ./packages/jaeger-ui/package.json - run: | - TAG="v${{ env.VERSION }}-digma.${{ inputs.version }}" + TAG="v${{ env.VERSION }}-digma.${{ env.NEXT_DIGMA_JAEGER_UI_VERSION }}" git add packages/jaeger-ui/package.json - git commit -m "Bump Digma Jaeger UI version to ${{ inputs.version }} [skip ci]" + git commit -m "Bump Digma Jaeger UI version to ${{ env.NEXT_DIGMA_JAEGER_UI_VERSION }} [skip ci]" git tag $TAG git push git push origin $TAG From 2c6e7222f5042ceb1fb683047c04ecfd77eefdf3 Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Tue, 28 Jan 2025 20:35:38 +0100 Subject: [PATCH 3/4] Revert icon changes --- .../components/common/InsightIcon/utils.ts | 3 ++- .../icons/TwoHorizontalEndpointsIcon.tsx | 20 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 packages/jaeger-ui/src/components/common/icons/TwoHorizontalEndpointsIcon.tsx diff --git a/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts b/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts index a8d7478620..6a88fd2197 100644 --- a/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts +++ b/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts @@ -16,6 +16,7 @@ import ClockWithTicksIcon from '../icons/ClockWithTicksIcon'; import PieChartIcon from '../icons/PieChartIcon'; import PulseIcon from '../icons/PulseIcon'; import SoundWaveIcon from '../icons/SoundWaveIcon'; +import TwoHorizontalEndpointsIcon from '../icons/TwoHorizontalEndpointsIcon'; export const getInsightTypeInfo = ( type: InsightType @@ -101,7 +102,7 @@ export const getInsightTypeInfo = ( label: 'Session in View Query Detected', }, [InsightType.EndpointChattyApiV2]: { - icon: SoundWaveIcon, + icon: TwoHorizontalEndpointsIcon, label: 'Excessive API Calls Detected', }, [InsightType.EndpointHighNumberOfQueries]: { diff --git a/packages/jaeger-ui/src/components/common/icons/TwoHorizontalEndpointsIcon.tsx b/packages/jaeger-ui/src/components/common/icons/TwoHorizontalEndpointsIcon.tsx new file mode 100644 index 0000000000..6d4701831f --- /dev/null +++ b/packages/jaeger-ui/src/components/common/icons/TwoHorizontalEndpointsIcon.tsx @@ -0,0 +1,20 @@ +import React from 'react'; +import { useIconProps } from './hooks'; +import { IIconProps } from './types'; + +const TwoHorizontalEndpointsIconComponent = (props: IIconProps) => { + const { size, color } = useIconProps(props); + + return ( + + + + ); +}; + +const TwoHorizontalEndpointsIcon = React.memo(TwoHorizontalEndpointsIconComponent); + +export default TwoHorizontalEndpointsIcon; From 845edadf834f28a6563a8d32199e50a27ae51723 Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Tue, 28 Jan 2025 20:36:36 +0100 Subject: [PATCH 4/4] Remove unused import --- packages/jaeger-ui/src/components/common/InsightIcon/utils.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts b/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts index 6a88fd2197..a3ee7b9b2c 100644 --- a/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts +++ b/packages/jaeger-ui/src/components/common/InsightIcon/utils.ts @@ -15,7 +15,6 @@ import { InsightType } from './types'; import ClockWithTicksIcon from '../icons/ClockWithTicksIcon'; import PieChartIcon from '../icons/PieChartIcon'; import PulseIcon from '../icons/PulseIcon'; -import SoundWaveIcon from '../icons/SoundWaveIcon'; import TwoHorizontalEndpointsIcon from '../icons/TwoHorizontalEndpointsIcon'; export const getInsightTypeInfo = (