From 1e1946a63f1ba0066fce442bf579ee8b6fe5b659 Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Mon, 23 Oct 2023 20:54:43 +0200 Subject: [PATCH 1/6] Add pagination to Assets --- src/actions.ts | 3 +- .../AssetEntry/AssetEntry.stories.tsx | 77 +- .../Assets/AssetList/AssetEntry/index.tsx | 9 +- .../Assets/AssetList/AssetEntry/styles.ts | 7 +- .../Assets/AssetList/AssetEntry/types.ts | 7 +- .../Assets/AssetList/AssetList.stories.tsx | 812 +++ src/components/Assets/AssetList/index.tsx | 430 +- src/components/Assets/AssetList/styles.ts | 33 + src/components/Assets/AssetList/types.ts | 50 +- .../AssetTypeList/AssetList.stories.tsx | 51 + src/components/Assets/AssetTypeList/index.tsx | 119 +- src/components/Assets/AssetTypeList/styles.ts | 36 + src/components/Assets/AssetTypeList/types.ts | 13 +- src/components/Assets/Assets.stories.tsx | 22 - src/components/Assets/actions.ts | 12 + src/components/Assets/index.tsx | 174 +- src/components/Assets/mockData.ts | 6183 ----------------- src/components/Assets/styles.ts | 36 - src/components/Assets/types.ts | 73 - src/components/Dashboard/index.tsx | 3 +- src/components/Dashboard/types.ts | 3 - src/components/common/App/ConfigContext.ts | 3 +- src/components/common/App/index.tsx | 14 + src/components/common/App/types.ts | 1 + src/globals.d.ts | 1 + 25 files changed, 1408 insertions(+), 6764 deletions(-) create mode 100644 src/components/Assets/AssetList/AssetList.stories.tsx create mode 100644 src/components/Assets/AssetTypeList/AssetList.stories.tsx delete mode 100644 src/components/Assets/Assets.stories.tsx create mode 100644 src/components/Assets/actions.ts delete mode 100644 src/components/Assets/mockData.ts delete mode 100644 src/components/Assets/types.ts delete mode 100644 src/components/Dashboard/types.ts diff --git a/src/actions.ts b/src/actions.ts index 41663fd92..fa07a6d16 100644 --- a/src/actions.ts +++ b/src/actions.ts @@ -18,5 +18,6 @@ export const actions = addPrefix(ACTION_PREFIX, { OPEN_TROUBLESHOOTING_GUIDE: "OPEN_TROUBLESHOOTING_GUIDE", OPEN_DOCUMENTATION: "OPEN_DOCUMENTATION", SET_DIGMA_API_URL: "SET_DIGMA_API_URL", - SET_USER_EMAIL: "SET_USER_EMAIL" + SET_USER_EMAIL: "SET_USER_EMAIL", + SET_ENVIRONMENT: "SET_ENVIRONMENT" }); diff --git a/src/components/Assets/AssetList/AssetEntry/AssetEntry.stories.tsx b/src/components/Assets/AssetList/AssetEntry/AssetEntry.stories.tsx index 97e7cc3a7..29cd9c287 100644 --- a/src/components/Assets/AssetList/AssetEntry/AssetEntry.stories.tsx +++ b/src/components/Assets/AssetList/AssetEntry/AssetEntry.stories.tsx @@ -19,26 +19,12 @@ type Story = StoryObj; export const Default: Story = { args: { entry: { - id: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/ErrorRecordedOnLocalRootSpan", relatedServices: ["service1", "service2"], - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /SampleInsights/ErrorRecordedOnLocalRootSpan", - displayName: "HTTP GET /SampleInsights/ErrorRecordedOnLocalRootSpan", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/ErrorRecordedOnLocalRootSpan", - methodCodeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genErrorRecordedOnLocalRootSpan", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genErrorRecordedOnLocalRootSpan" - }, + displayName: "HTTP GET /SampleInsights/ErrorRecordedOnLocalRootSpan", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/ErrorRecordedOnLocalRootSpan", assetType: "Endpoint", - serviceName: "PetClinicWithAgent", - endpointCodeObjectId: - "endpoint:epHTTP:HTTP GET /SampleInsights/ErrorRecordedOnLocalRootSpan", + service: "PetClinicWithAgent", p50: { value: 804.65, unit: "μs", @@ -49,24 +35,7 @@ export const Default: Story = { unit: "ms", raw: 62466300.59999996 }, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { - value: 804.65, - unit: "μs", - raw: 804649.5 - } - }, - { - percentile: 0.95, - currentDuration: { - value: 62.47, - unit: "ms", - raw: 62466300.59999996 - } - } - ], + impactScores: { ScoreExp25: 0, ScoreExp1000: 0 @@ -74,46 +43,18 @@ export const Default: Story = { insights: [ { type: "Errors", - importance: 5, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } + importance: 5 }, { type: "HotSpot", - importance: 2, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } + importance: 2 }, { type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } + importance: 6 } ], - lastSpanInstanceInfo: { - traceId: "3142058FA4A9494F082AE685002B0EA7", - spanId: "833B31BB84D62E80", - startTime: "2023-02-20T14:36:03.480951Z", - duration: { - value: 1.28, - unit: "ms", - raw: 1285000 - } - }, - firstDataSeenTime: "2023-01-23T09:20:43.102392Z" + latestSpanTimestamp: "2023-02-20T14:36:03.480951Z" } } }; diff --git a/src/components/Assets/AssetList/AssetEntry/index.tsx b/src/components/Assets/AssetList/AssetEntry/index.tsx index 9d6b30639..2cd79fe85 100644 --- a/src/components/Assets/AssetList/AssetEntry/index.tsx +++ b/src/components/Assets/AssetList/AssetEntry/index.tsx @@ -57,12 +57,11 @@ export const AssetEntry = (props: AssetEntryProps) => { props.onAssetLinkClick(props.entry); }; - const name = props.entry.span.displayName; + const name = props.entry.displayName; const otherServices = props.entry.relatedServices.slice(1); const performanceDuration = props.entry.p50; const slowestFivePercentDuration = props.entry.p95; - - const lastSeenDateTime = props.entry.lastSpanInstanceInfo.startTime; + const lastSeenDateTime = props.entry.latestSpanTimestamp; // Do not show unimplemented insights const filteredInsights = props.entry.insights.filter( @@ -129,7 +128,9 @@ export const AssetEntry = (props: AssetEntryProps) => { Services - + + + {props.entry.relatedServices[0]} {otherServices.length > 0 && ( +{otherServices.length} diff --git a/src/components/Assets/AssetList/AssetEntry/styles.ts b/src/components/Assets/AssetList/AssetEntry/styles.ts index f0a4199cc..8660f7ed0 100644 --- a/src/components/Assets/AssetList/AssetEntry/styles.ts +++ b/src/components/Assets/AssetList/AssetEntry/styles.ts @@ -82,7 +82,7 @@ export const Stats = styled.div` display: flex; flex-direction: column; gap: 8px; - width: 120px; + width: 140px; `; export const StatsColumn = styled.div` @@ -97,6 +97,11 @@ export const ServicesContainer = styled.div` align-items: center; `; +export const IconContainer = styled.div` + display: flex; + align-items: center; +`; + export const ServiceName = styled.div` overflow: hidden; text-overflow: ellipsis; diff --git a/src/components/Assets/AssetList/AssetEntry/types.ts b/src/components/Assets/AssetList/AssetEntry/types.ts index 964757e2e..a3b0e4b6e 100644 --- a/src/components/Assets/AssetList/AssetEntry/types.ts +++ b/src/components/Assets/AssetList/AssetEntry/types.ts @@ -1,8 +1,7 @@ -import { ExtendedAssetEntryWithServices } from "../../types"; -import { SORTING_CRITERION } from "../types"; +import { AssetEntryWithServices, SORTING_CRITERION } from "../types"; export interface AssetEntryProps { - entry: ExtendedAssetEntryWithServices; - onAssetLinkClick: (entry: ExtendedAssetEntryWithServices) => void; + entry: AssetEntryWithServices; + onAssetLinkClick: (entry: AssetEntryWithServices) => void; sortingCriterion: SORTING_CRITERION; } diff --git a/src/components/Assets/AssetList/AssetList.stories.tsx b/src/components/Assets/AssetList/AssetList.stories.tsx new file mode 100644 index 000000000..e3b2f4a74 --- /dev/null +++ b/src/components/Assets/AssetList/AssetList.stories.tsx @@ -0,0 +1,812 @@ +import { Meta, StoryObj } from "@storybook/react"; + +import { AssetList } from "."; + +// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction +const meta: Meta = { + title: "Assets/AssetList", + component: AssetList, + parameters: { + // More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout + layout: "fullscreen" + } +}; + +export default meta; + +type Story = StoryObj; + +// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args +export const Default: Story = { + args: { + assetTypeId: "Endpoint", + data: { + data: [ + { + service: "PetClinic", + displayName: "HTTP GET /owners/new", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /owners/new", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:25:05.821874Z", + p50: { + value: 2.03, + unit: "sec", + raw: 2029855700.0 + }, + p95: { + value: 2.42, + unit: "sec", + raw: 2423157300.0 + }, + insights: [ + { + type: "SlowestSpans", + importance: 2 + }, + { + type: "SlowEndpoint", + importance: 2 + }, + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "EndpointBreakdown", + importance: 6 + }, + { + type: "LowUsage", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 0.3521035689991816, + ScoreExp1000: 0.3386358571779296 + } + }, + { + service: "PetClinic", + displayName: "HTTP GET /owners/{ownerId}", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /owners/{ownerId}", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:24:48.612988Z", + p50: { + value: 22.71, + unit: "ms", + raw: 22705900.0 + }, + p95: { + value: 99.36, + unit: "ms", + raw: 99365000.0 + }, + insights: [ + { + type: "HotSpot", + importance: 2 + }, + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "HighUsage", + importance: 5 + }, + { + type: "Errors", + importance: 5 + }, + { + type: "EndpointBreakdown", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 0.0, + ScoreExp1000: 0.0 + } + }, + { + service: "PetClinic", + displayName: "HTTP GET /oups", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /oups", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:24:47.16926Z", + p50: { + value: 3.89, + unit: "ms", + raw: 3889300.0 + }, + p95: { + value: 4.21, + unit: "ms", + raw: 4207600.0 + }, + insights: [ + { + type: "HotSpot", + importance: 2 + }, + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "Errors", + importance: 5 + }, + { + type: "LowUsage", + importance: 6 + }, + { + type: "EndpointBreakdown", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 0.0, + ScoreExp1000: 0.0 + } + }, + { + service: "PetClinic", + displayName: "HTTP GET /SampleInsights/ErrorHotspot", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/ErrorHotspot", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:25:14.968188Z", + p50: { + value: 50.99, + unit: "ms", + raw: 50989900.0 + }, + p95: { + value: 55.16, + unit: "ms", + raw: 55161800.0 + }, + insights: [ + { + type: "HotSpot", + importance: 2 + }, + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "Errors", + importance: 5 + }, + { + type: "LowUsage", + importance: 6 + }, + { + type: "EndpointBreakdown", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 0.0, + ScoreExp1000: 0.0 + } + }, + { + service: "PetClinic", + displayName: "HTTP GET /SampleInsights/ErrorRecordedOnLocalRootSpan", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/ErrorRecordedOnLocalRootSpan", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:25:19.219654Z", + p50: { + value: 1.36, + unit: "ms", + raw: 1363200.0 + }, + p95: { + value: 1.47, + unit: "ms", + raw: 1474700.0 + }, + insights: [ + { + type: "HotSpot", + importance: 2 + }, + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "Errors", + importance: 5 + }, + { + type: "LowUsage", + importance: 6 + }, + { + type: "EndpointBreakdown", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 0.0, + ScoreExp1000: 0.0 + } + }, + { + service: "PetClinic", + displayName: "HTTP GET /owners/{ownerId}/pets/new", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /owners/{ownerId}/pets/new", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:25:08.728395Z", + p50: { + value: 94.44, + unit: "ms", + raw: 94437800.0 + }, + p95: { + value: 128.43, + unit: "ms", + raw: 128429300.0 + }, + insights: [ + { + type: "SlowestSpans", + importance: 2 + }, + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "EndpointBreakdown", + importance: 6 + }, + { + type: "LowUsage", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 0.8314664295667409, + ScoreExp1000: 0.8645342516094802 + } + }, + { + service: "PetClinic", + displayName: "HTTP GET /SampleInsights/SpanBottleneck", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/SpanBottleneck", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:25:14.363144Z", + p50: { + value: 283.5, + unit: "ms", + raw: 283500100.0 + }, + p95: { + value: 306.7, + unit: "ms", + raw: 306695500.0 + }, + insights: [ + { + type: "SlowestSpans", + importance: 2 + }, + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "LowUsage", + importance: 6 + }, + { + type: "EndpointBreakdown", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 0.0, + ScoreExp1000: 0.0 + } + }, + { + service: "PetClinic", + displayName: "HTTP GET /SampleInsights/NPlusOneWithInternalSpan", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/NPlusOneWithInternalSpan", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:25:15.093935Z", + p50: { + value: 31.66, + unit: "ms", + raw: 31660700.0 + }, + p95: { + value: 34.25, + unit: "ms", + raw: 34251100.0 + }, + insights: [ + { + type: "EndpointSpaNPlusOne", + importance: 3 + }, + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "LowUsage", + importance: 6 + }, + { + type: "EndpointBreakdown", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 0.0, + ScoreExp1000: 0.0 + } + }, + { + service: "PetClinic", + displayName: "HTTP GET /SampleInsights/NPlusOneWithoutInternalSpan", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/NPlusOneWithoutInternalSpan", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:25:15.130839Z", + p50: { + value: 26.17, + unit: "ms", + raw: 26165900.0 + }, + p95: { + value: 28.31, + unit: "ms", + raw: 28306700.0 + }, + insights: [ + { + type: "EndpointSpaNPlusOne", + importance: 3 + }, + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "LowUsage", + importance: 6 + }, + { + type: "EndpointBreakdown", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 0.0, + ScoreExp1000: 0.0 + } + }, + { + service: "PetClinic", + displayName: "HTTP GET /SampleInsights/ErrorRecordedOnCurrentSpan", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/ErrorRecordedOnCurrentSpan", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:25:19.224037Z", + p50: { + value: 1.65, + unit: "ms", + raw: 1649400.0 + }, + p95: { + value: 1.78, + unit: "ms", + raw: 1784400.0 + }, + insights: [ + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "Errors", + importance: 5 + }, + { + type: "LowUsage", + importance: 6 + }, + { + type: "EndpointBreakdown", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 0.0, + ScoreExp1000: 0.0 + } + }, + { + service: "PetClinic", + displayName: + "HTTP GET /SampleInsights/ErrorRecordedOnDeeplyNestedSpan", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/ErrorRecordedOnDeeplyNestedSpan", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:25:19.212544Z", + p50: { + value: 1.65, + unit: "ms", + raw: 1649400.0 + }, + p95: { + value: 1.78, + unit: "ms", + raw: 1784400.0 + }, + insights: [ + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "Errors", + importance: 5 + }, + { + type: "LowUsage", + importance: 6 + }, + { + type: "EndpointBreakdown", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 0.0, + ScoreExp1000: 0.0 + } + }, + { + service: "PetClinic", + displayName: "HTTP GET /", + spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:24:47.675037Z", + p50: { + value: 4.94, + unit: "ms", + raw: 4941400.0 + }, + p95: { + value: 16.84, + unit: "ms", + raw: 16837700.0 + }, + insights: [ + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "EndpointBreakdown", + importance: 6 + }, + { + type: "LowUsage", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 0.7208595047530149, + ScoreExp1000: 0.6627975469849793 + } + }, + { + service: "PetClinic", + displayName: "HTTP GET /**", + spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /**", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:24:47.662761Z", + p50: { + value: 9.86, + unit: "ms", + raw: 9858800.0 + }, + p95: { + value: 18.93, + unit: "ms", + raw: 18927700.0 + }, + insights: [ + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "EndpointBreakdown", + importance: 6 + }, + { + type: "LowUsage", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 0.0, + ScoreExp1000: 0.0 + } + }, + { + service: "PetClinic", + displayName: "HTTP GET /owners", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /owners", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:24:48.798657Z", + p50: { + value: 8.34, + unit: "ms", + raw: 8337200.0 + }, + p95: { + value: 13.67, + unit: "ms", + raw: 13671300.0 + }, + insights: [ + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "EndpointBreakdown", + importance: 6 + }, + { + type: "LowUsage", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 0.0, + ScoreExp1000: 0.0 + } + }, + { + service: "PetClinic", + displayName: "HTTP GET /owners/{ownerId}/edit", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /owners/{ownerId}/edit", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:25:08.60984Z", + p50: { + value: 30.09, + unit: "ms", + raw: 30090800.0 + }, + p95: { + value: 106.14, + unit: "ms", + raw: 106139900.0 + }, + insights: [ + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "EndpointBreakdown", + importance: 6 + }, + { + type: "LowUsage", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 1.0, + ScoreExp1000: 1.0 + } + }, + { + service: "PetClinic", + displayName: "HTTP GET /owners/find", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /owners/find", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:24:47.759516Z", + p50: { + value: 3.7, + unit: "ms", + raw: 3696500.0 + }, + p95: { + value: 18.93, + unit: "ms", + raw: 18927700.0 + }, + insights: [ + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "LowUsage", + importance: 6 + }, + { + type: "EndpointBreakdown", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 0.0, + ScoreExp1000: 0.0 + } + }, + { + service: "PetClinic", + displayName: "HTTP GET /SampleInsights/HighUsage", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/HighUsage", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:25:19.187797Z", + p50: { + value: 7.11, + unit: "ms", + raw: 7112000.0 + }, + p95: { + value: 16.52, + unit: "ms", + raw: 16517700.0 + }, + insights: [ + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "LowUsage", + importance: 6 + }, + { + type: "EndpointBreakdown", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 0.0, + ScoreExp1000: 0.0 + } + }, + { + service: "PetClinic", + displayName: "HTTP GET /SampleInsights/req-map-get", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/req-map-get", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:25:19.198821Z", + p50: { + value: 2.2, + unit: "ms", + raw: 2195400.0 + }, + p95: { + value: 2.38, + unit: "ms", + raw: 2375000.0 + }, + insights: [ + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "EndpointBreakdown", + importance: 6 + }, + { + type: "LowUsage", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 0.0, + ScoreExp1000: 0.0 + } + }, + { + service: "PetClinic", + displayName: "HTTP GET /SampleInsights/SlowEndpoint", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/SlowEndpoint", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:25:11.491062Z", + p50: { + value: 2.42, + unit: "sec", + raw: 2423157300.0 + }, + p95: { + value: 2.53, + unit: "sec", + raw: 2527006900.0 + }, + insights: [ + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "LowUsage", + importance: 6 + }, + { + type: "EndpointBreakdown", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 0.0, + ScoreExp1000: 0.0 + } + }, + { + service: "PetClinic", + displayName: "HTTP GET /vets.html", + spanCodeObjectId: + "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /vets.html", + assetType: "Endpoint", + latestSpanTimestamp: "2023-10-23T15:24:46.980123Z", + p50: { + value: 10.55, + unit: "ms", + raw: 10546600.0 + }, + p95: { + value: 25.41, + unit: "ms", + raw: 25409000.0 + }, + insights: [ + { + type: "SpanScalingInsufficientData", + importance: 5 + }, + { + type: "EndpointBreakdown", + importance: 6 + }, + { + type: "LowUsage", + importance: 6 + } + ], + impactScores: { + ScoreExp25: 0.0, + ScoreExp1000: 0.0 + } + } + ], + totalCount: 20 + } + } +}; diff --git a/src/components/Assets/AssetList/index.tsx b/src/components/Assets/AssetList/index.tsx index 4b1cf0f6e..d5f821518 100644 --- a/src/components/Assets/AssetList/index.tsx +++ b/src/components/Assets/AssetList/index.tsx @@ -1,8 +1,16 @@ -import { ChangeEvent, useMemo, useState } from "react"; +import { ChangeEvent, useContext, useEffect, useRef, useState } from "react"; import { DefaultTheme, useTheme } from "styled-components"; +import { dispatcher } from "../../../dispatcher"; +import { useDebounce } from "../../../hooks/useDebounce"; +import { usePrevious } from "../../../hooks/usePrevious"; import { isNumber } from "../../../typeGuards/isNumber"; -import { getPercentileKey } from "../../../utils/getPercentileKey"; +import { isString } from "../../../typeGuards/isString"; +import { groupBy } from "../../../utils/groupBy"; +import { ConfigContext } from "../../common/App/ConfigContext"; +import { EmptyState } from "../../common/EmptyState"; import { Menu } from "../../common/Menu"; +import { NewCircleLoader } from "../../common/NewCircleLoader"; +import { Pagination } from "../../common/Pagination"; import { Popover } from "../../common/Popover"; import { PopoverContent } from "../../common/Popover/PopoverContent"; import { PopoverTrigger } from "../../common/Popover/PopoverTrigger"; @@ -10,135 +18,24 @@ import { ChevronIcon } from "../../common/icons/ChevronIcon"; import { MagnifierIcon } from "../../common/icons/MagnifierIcon"; import { SortIcon } from "../../common/icons/SortIcon"; import { Direction } from "../../common/icons/types"; -import { ExtendedAssetEntryWithServices, ImpactScores } from "../types"; +import { actions } from "../actions"; import { getAssetTypeInfo } from "../utils"; import { AssetEntry as AssetEntryComponent } from "./AssetEntry"; import * as s from "./styles"; import { + AssetEntry, + AssetEntryWithServices, AssetListProps, + AssetsData, SORTING_CRITERION, SORTING_ORDER, Sorting } from "./types"; -const sortEntries = ( - entries: ExtendedAssetEntryWithServices[], - sorting: Sorting -): ExtendedAssetEntryWithServices[] => { - entries = [...entries]; - - const isDesc = sorting.order === SORTING_ORDER.DESC; - - const sortByName = ( - a: ExtendedAssetEntryWithServices, - b: ExtendedAssetEntryWithServices, - isDesc: boolean - ) => - isDesc - ? b.span.displayName.localeCompare(a.span.displayName) - : a.span.displayName.localeCompare(b.span.displayName); - - const sortByPercentile = ( - a: ExtendedAssetEntryWithServices, - b: ExtendedAssetEntryWithServices, - percentile: number, - isDesc: boolean - ) => { - const aPercentile = getPercentileKey(percentile); - const aDuration = aPercentile && a[aPercentile]?.raw; - - const bPercentile = getPercentileKey(percentile); - const bDuration = bPercentile && b[bPercentile]?.raw; - - if (!aDuration && !bDuration) { - return 0; - } - - if (!isNumber(aDuration)) { - return isDesc ? 1 : -1; - } - - if (!isNumber(bDuration)) { - return isDesc ? -1 : 1; - } - - return ( - (isDesc ? bDuration - aDuration : aDuration - bDuration) || - sortByName(a, b, isDesc) - ); - }; - - const sortByScore = ( - a: ExtendedAssetEntryWithServices, - b: ExtendedAssetEntryWithServices, - scoreName: keyof ImpactScores, - isDesc: boolean - ) => { - if (!a.impactScores || !b.impactScores) { - return 0; - } - - const aScore = a.impactScores[scoreName]; - const bScore = b.impactScores[scoreName]; - - return ( - (isDesc ? bScore - aScore : aScore - bScore) || sortByName(a, b, isDesc) - ); - }; - - switch (sorting.criterion) { - case SORTING_CRITERION.CRITICAL_INSIGHTS: - return entries.sort((a, b) => { - const aHighestImportance = - a.insights.length > 0 - ? Math.min(...a.insights.map((x) => x.importance)) - : Infinity; - const bHighestImportance = - b.insights.length > 0 - ? Math.min(...b.insights.map((x) => x.importance)) - : Infinity; - - const aMostImportantInsightCount = a.insights.filter( - (x) => x.importance === aHighestImportance - ).length; - const bMostImportantInsightCount = b.insights.filter( - (x) => x.importance === bHighestImportance - ).length; - - return ( - (isDesc - ? aHighestImportance - bHighestImportance - : bHighestImportance - aHighestImportance) || - (isDesc - ? bMostImportantInsightCount - aMostImportantInsightCount - : aMostImportantInsightCount - bMostImportantInsightCount) || - sortByName(a, b, isDesc) - ); - }); - case SORTING_CRITERION.PERFORMANCE: - return entries.sort((a, b) => sortByPercentile(a, b, 0.5, isDesc)); - case SORTING_CRITERION.SLOWEST_FIVE_PERCENT: - return entries.sort((a, b) => sortByPercentile(a, b, 0.95, isDesc)); - case SORTING_CRITERION.LATEST: - return entries.sort((a, b) => { - const aDateTime = new Date(a.lastSpanInstanceInfo.startTime).valueOf(); - const bDateTime = new Date(b.lastSpanInstanceInfo.startTime).valueOf(); - - return ( - (isDesc ? bDateTime - aDateTime : aDateTime - bDateTime) || - sortByName(a, b, isDesc) - ); - }); - case SORTING_CRITERION.PERFORMANCE_IMPACT: - return entries.sort((a, b) => sortByScore(a, b, "ScoreExp25", isDesc)); - case SORTING_CRITERION.OVERALL_IMPACT: - return entries.sort((a, b) => sortByScore(a, b, "ScoreExp1000", isDesc)); - case SORTING_CRITERION.NAME: - return entries.sort((a, b) => sortByName(a, b, isDesc)); - default: - return entries; - } -}; +const PAGE_SIZE = 10; +const REFRESH_INTERVAL = isNumber(window.assetsRefreshInterval) + ? window.assetsRefreshInterval + : 10 * 1000; // in milliseconds const getBackIconColor = (theme: DefaultTheme) => { switch (theme.mode) { @@ -189,26 +86,47 @@ const getSortIconColor = (theme: DefaultTheme, selected: boolean) => { } }; -const getDefaultSortingOrder = ( - criterion: SORTING_CRITERION -): SORTING_ORDER => { - switch (criterion) { - case SORTING_CRITERION.NAME: - return SORTING_ORDER.ASC; - case SORTING_CRITERION.PERFORMANCE: - case SORTING_CRITERION.SLOWEST_FIVE_PERCENT: - case SORTING_CRITERION.CRITICAL_INSIGHTS: - case SORTING_CRITERION.LATEST: - case SORTING_CRITERION.OVERALL_IMPACT: - case SORTING_CRITERION.PERFORMANCE_IMPACT: - default: - return SORTING_ORDER.DESC; - } +const getSortingCriterionInfo = ( + sortingCriterion: SORTING_CRITERION +): { + label: string; + defaultOrder: SORTING_ORDER; +} => { + const sortingCriterionInfoMap = { + [SORTING_CRITERION.CRITICAL_INSIGHTS]: { + label: "Critical insights", + defaultOrder: SORTING_ORDER.DESC + }, + [SORTING_CRITERION.PERFORMANCE]: { + label: "Performance", + defaultOrder: SORTING_ORDER.DESC + }, + [SORTING_CRITERION.SLOWEST_FIVE_PERCENT]: { + label: "Slowest 5%", + defaultOrder: SORTING_ORDER.DESC + }, + [SORTING_CRITERION.LATEST]: { + label: "Latest", + defaultOrder: SORTING_ORDER.DESC + }, + [SORTING_CRITERION.NAME]: { + label: "Name", + defaultOrder: SORTING_ORDER.ASC + }, + [SORTING_CRITERION.PERFORMANCE_IMPACT]: { + label: "Performance impact", + defaultOrder: SORTING_ORDER.DESC + }, + [SORTING_CRITERION.OVERALL_IMPACT]: { + label: "Overall impact", + defaultOrder: SORTING_ORDER.DESC + } + }; + + return sortingCriterionInfoMap[sortingCriterion]; }; -const getAvailableSortingCriterions = ( - assets: ExtendedAssetEntryWithServices[] -) => { +const getAvailableSortingCriterions = (assets: AssetEntryWithServices[]) => { const criterions = [ SORTING_CRITERION.CRITICAL_INSIGHTS, SORTING_CRITERION.PERFORMANCE, @@ -227,19 +145,160 @@ const getAvailableSortingCriterions = ( return criterions; }; +// Keep only the latest entry for every spanCodeObjectId across all services +const removeDuplicatedEntries = ( + data: AssetEntry[] +): AssetEntryWithServices[] => { + const groupedEntries = groupBy(data, (x) => x.spanCodeObjectId); + + const uniqueEntries: AssetEntryWithServices[] = []; + + Object.values(groupedEntries).forEach((entries) => { + const latestEntry = entries.reduce( + (acc, cur) => + new Date(cur.latestSpanTimestamp).valueOf() > + new Date(acc.latestSpanTimestamp).valueOf() + ? cur + : acc, + entries[0] + ); + + const relatedServices = entries.map((entry) => entry.service).sort(); + + uniqueEntries.push({ + ...latestEntry, + relatedServices + }); + }); + + return uniqueEntries; +}; + export const AssetList = (props: AssetListProps) => { + const [data, setData] = useState(); + const previousData = usePrevious(data); + const [isInitialLoading, setIsInitialLoading] = useState(false); + const [lastSetDataTimeStamp, setLastSetDataTimeStamp] = useState(); const [sorting, setSorting] = useState({ criterion: SORTING_CRITERION.CRITICAL_INSIGHTS, order: SORTING_ORDER.DESC }); + const previousSorting = usePrevious(sorting); const [isSortingMenuOpen, setIsSortingMenuOpen] = useState(false); const [searchInputValue, setSearchInputValue] = useState(""); - + const debouncedSearchInputValue = useDebounce(searchInputValue, 1000); + const previousDebouncedSearchInputValue = usePrevious( + debouncedSearchInputValue + ); const theme = useTheme(); const backIconColor = getBackIconColor(theme); const assetTypeIconColor = getAssetTypeIconColor(theme); const sortingMenuChevronColor = getSortingMenuChevronColor(theme); const searchInputIconColor = sortingMenuChevronColor; + const [page, setPage] = useState(0); + const previousPage = usePrevious(page); + const totalCount = data?.totalCount || 0; + const pageStartItemNumber = page * PAGE_SIZE + 1; + const pageEndItemNumber = Math.min( + pageStartItemNumber + PAGE_SIZE - 1, + totalCount + ); + const listRef = useRef(null); + const config = useContext(ConfigContext); + + const entries = data ? removeDuplicatedEntries(data.data) : []; + + const assetTypeInfo = getAssetTypeInfo(props.assetTypeId); + + const sortingCriterions = getAvailableSortingCriterions(entries); + + useEffect(() => { + window.sendMessageToDigma({ + action: actions.GET_DATA, + payload: { + query: { + assetType: props.assetTypeId + } + } + }); + setIsInitialLoading(true); + }, [props.assetTypeId]); + + useEffect(() => { + if ( + (isNumber(previousPage) && previousPage !== page) || + (previousSorting && previousSorting !== sorting) || + (isString(previousDebouncedSearchInputValue) && + previousDebouncedSearchInputValue !== debouncedSearchInputValue) + ) { + window.sendMessageToDigma({ + action: actions.GET_DATA, + payload: { + query: { + assetType: props.assetTypeId, + page, + pageSize: PAGE_SIZE, + sortBy: sorting.criterion, + sortOrder: sorting.order, + ...(debouncedSearchInputValue.length > 0 + ? { displayName: debouncedSearchInputValue } + : {}) + } + } + }); + } + + const handleAssetsData = (data: unknown, timeStamp: number) => { + setData(data as AssetsData); + setLastSetDataTimeStamp(timeStamp); + }; + + dispatcher.addActionListener(actions.SET_DATA, handleAssetsData); + + return () => { + dispatcher.removeActionListener(actions.SET_DATA, handleAssetsData); + }; + }, [ + props.assetTypeId, + previousDebouncedSearchInputValue, + debouncedSearchInputValue, + previousSorting, + sorting, + previousPage, + page + ]); + + useEffect(() => { + const timerId = window.setTimeout(() => { + window.sendMessageToDigma({ + action: actions.GET_DATA + }); + }, REFRESH_INTERVAL); + + return () => { + window.clearTimeout(timerId); + }; + }, [lastSetDataTimeStamp]); + + useEffect(() => { + if (props.data) { + setData(props.data); + } + }, [props.data]); + + useEffect(() => { + if (!previousData && data) { + setIsInitialLoading(false); + } + }, [previousData, data]); + + useEffect(() => { + setPage(0); + }, [config.environment, debouncedSearchInputValue, sorting]); + + useEffect(() => { + listRef.current?.scrollTo(0, 0); + }, [config.environment, debouncedSearchInputValue, sorting, page]); const handleBackButtonClick = () => { props.onBackButtonClick(); @@ -265,14 +324,17 @@ export const AssetList = (props: AssetListProps) => { } else { setSorting({ criterion: value as SORTING_CRITERION, - order: getDefaultSortingOrder(value as SORTING_CRITERION) + order: getSortingCriterionInfo(value as SORTING_CRITERION).defaultOrder }); } handleSortingMenuToggle(); }; - const handleAssetLinkClick = (entry: ExtendedAssetEntryWithServices) => { - props.onAssetLinkClick(entry); + const handleAssetLinkClick = (entry: AssetEntry) => { + window.sendMessageToDigma({ + action: actions.GO_TO_ASSET, + payload: { spanCodeObjectId: entry.spanCodeObjectId } + }); }; const handleSortingOrderToggleOptionButtonClick = (order: SORTING_ORDER) => { @@ -282,19 +344,51 @@ export const AssetList = (props: AssetListProps) => { }); }; - const assetTypeInfo = getAssetTypeInfo(props.assetTypeId); + const renderContent = () => { + if (isInitialLoading) { + return } />; + } - const sortingCriterions = getAvailableSortingCriterions(props.entries); + return entries.length > 0 ? ( + <> + + {entries.map((entry) => { + const id = entry.spanCodeObjectId; - const sortedEntries = useMemo(() => { - const filteredEntries = props.entries.filter((x) => - x.span.displayName - .toLocaleLowerCase() - .includes(searchInputValue.toLowerCase()) + return ( + + ); + })} + + + + Showing{" "} + + {pageStartItemNumber} - {pageEndItemNumber} + {" "} + of {totalCount} + + + + + ) : ( + + Not seeing your data here? Maybe you're missing some + instrumentation! + ); - - return sortEntries(filteredEntries, sorting); - }, [props.entries, sorting, searchInputValue]); + }; return ( @@ -310,7 +404,7 @@ export const AssetList = (props: AssetListProps) => { )} {assetTypeInfo?.label || props.assetTypeId} - {props.entries.length} + {data && {data.totalCount}} {window.assetsSearch === true && ( @@ -333,7 +427,9 @@ export const AssetList = (props: AssetListProps) => { Sort by - {sorting.criterion} + + {getSortingCriterionInfo(sorting.criterion).label} + { title={"Sort by"} items={sortingCriterions.map((x) => ({ value: x, - label: x + label: getSortingCriterionInfo(x).label }))} onSelect={handleSortingMenuItemSelect} /> @@ -371,27 +467,7 @@ export const AssetList = (props: AssetListProps) => { })} - {sortedEntries.length > 0 ? ( - - {sortedEntries.map((entry) => { - const id = entry.id; - - return ( - - ); - })} - - ) : ( - - Not seeing your data here? Maybe you're missing some - instrumentation! - - )} + {renderContent()} ); }; diff --git a/src/components/Assets/AssetList/styles.ts b/src/components/Assets/AssetList/styles.ts index da9e3400b..fb50eb495 100644 --- a/src/components/Assets/AssetList/styles.ts +++ b/src/components/Assets/AssetList/styles.ts @@ -264,6 +264,7 @@ export const List = styled.ul` gap: 8px; margin: 0; overflow: auto; + height: 100%; `; export const ListItem = styled.li` @@ -300,3 +301,35 @@ export const InsightIconContainer = styled.span` width: 20px; height: 20px; `; + +export const Footer = styled.div` + display: flex; + justify-content: space-between; + padding: 8px; + font-size: 14px; +`; + +export const FooterItemsCount = styled.span` + font-weight: 500; + color: ${({ theme }) => { + switch (theme.mode) { + case "light": + return "#818594"; + case "dark": + case "dark-jetbrains": + return "#b4b8bf"; + } + }}; +`; + +export const FooterPageItemsCount = styled.span` + color: ${({ theme }) => { + switch (theme.mode) { + case "light": + return "#494b57"; + case "dark": + case "dark-jetbrains": + return "#dfe1e5"; + } + }}; +`; diff --git a/src/components/Assets/AssetList/types.ts b/src/components/Assets/AssetList/types.ts index d93013747..05c9ad907 100644 --- a/src/components/Assets/AssetList/types.ts +++ b/src/components/Assets/AssetList/types.ts @@ -1,20 +1,19 @@ -import { ExtendedAssetEntryWithServices } from "../types"; +import { Duration } from "../../../globals"; export interface AssetListProps { + data?: AssetsData; onBackButtonClick: () => void; assetTypeId: string; - entries: ExtendedAssetEntryWithServices[]; - onAssetLinkClick: (entry: ExtendedAssetEntryWithServices) => void; } export enum SORTING_CRITERION { - CRITICAL_INSIGHTS = "Critical insights", - PERFORMANCE = "Performance", - SLOWEST_FIVE_PERCENT = "Slowest 5%", - LATEST = "Latest", - NAME = "Name", - PERFORMANCE_IMPACT = "Performance impact", - OVERALL_IMPACT = "Overall impact" + CRITICAL_INSIGHTS = "criticalinsights", + PERFORMANCE = "p50", + SLOWEST_FIVE_PERCENT = "p95", + LATEST = "latest", + NAME = "displayname", + PERFORMANCE_IMPACT = "performanceimpact", + OVERALL_IMPACT = "overallimpact" } export enum SORTING_ORDER { @@ -34,3 +33,34 @@ export interface SortingMenuButtonProps { export interface SortingOrderOptionProps { selected: boolean; } + +export interface Insight { + type: string; + importance: number; +} + +export interface ImpactScores { + ScoreExp25: number; + ScoreExp1000: number; +} + +export interface AssetEntry { + assetType: string; + p50: Duration | null; + p95: Duration | null; + displayName: string; + insights: Insight[]; + latestSpanTimestamp: string; + impactScores?: ImpactScores; + service: string; + spanCodeObjectId: string; +} + +export interface AssetEntryWithServices extends AssetEntry { + relatedServices: string[]; +} + +export type AssetsData = { + data: AssetEntry[]; + totalCount: number; +}; diff --git a/src/components/Assets/AssetTypeList/AssetList.stories.tsx b/src/components/Assets/AssetTypeList/AssetList.stories.tsx new file mode 100644 index 000000000..0953f9d2b --- /dev/null +++ b/src/components/Assets/AssetTypeList/AssetList.stories.tsx @@ -0,0 +1,51 @@ +import { Meta, StoryObj } from "@storybook/react"; + +import { AssetTypeList } from "."; + +// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction +const meta: Meta = { + title: "Assets/AssetTypeList", + component: AssetTypeList, + parameters: { + // More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout + layout: "fullscreen" + } +}; + +export default meta; + +type Story = StoryObj; + +// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args +export const Default: Story = { + args: { + data: { + assetCategories: [ + { + name: "Other", + count: 11 + }, + { + name: "Endpoint", + count: 20 + }, + { + name: "EndpointClient", + count: 20 + }, + { + name: "DatabaseQueries", + count: 7 + }, + { + name: "CodeLocation", + count: 13 + }, + { + name: "Consumer", + count: 0 + } + ] + } + } +}; diff --git a/src/components/Assets/AssetTypeList/index.tsx b/src/components/Assets/AssetTypeList/index.tsx index e8205febe..3b6221729 100644 --- a/src/components/Assets/AssetTypeList/index.tsx +++ b/src/components/Assets/AssetTypeList/index.tsx @@ -1,7 +1,22 @@ +import { useEffect, useState } from "react"; +import { actions as globalActions } from "../../../actions"; +import { dispatcher } from "../../../dispatcher"; +import { usePrevious } from "../../../hooks/usePrevious"; +import { trackingEvents as globalTrackingEvents } from "../../../trackingEvents"; +import { isNumber } from "../../../typeGuards/isNumber"; +import { sendTrackingEvent } from "../../../utils/sendTrackingEvent"; +import { EmptyState } from "../../common/EmptyState"; +import { NewCircleLoader } from "../../common/NewCircleLoader"; +import { CardsIcon } from "../../common/icons/CardsIcon"; +import { actions } from "../actions"; import { getAssetTypeInfo } from "../utils"; import { AssetTypeListItem } from "./AssetTypeListItem"; import * as s from "./styles"; -import { AssetListProps } from "./types"; +import { AssetCategoriesData, AssetTypeListProps } from "./types"; + +const REFRESH_INTERVAL = isNumber(window.assetsRefreshInterval) + ? window.assetsRefreshInterval + : 10 * 1000; // in milliseconds const ASSET_TYPE_IDS = [ "Endpoint", @@ -12,18 +27,112 @@ const ASSET_TYPE_IDS = [ "Other" ]; -export const AssetTypeList = (props: AssetListProps) => { +export const AssetTypeList = (props: AssetTypeListProps) => { + const [data, setData] = useState(); + const previousData = usePrevious(data); + const [lastSetDataTimeStamp, setLastSetDataTimeStamp] = useState(); + const [isInitialLoading, setIsInitialLoading] = useState(false); + + useEffect(() => { + window.sendMessageToDigma({ + action: actions.GET_CATEGORIES_DATA + }); + setIsInitialLoading(true); + + const handleCategoriesData = (data: unknown, timeStamp: number) => { + setData(data as AssetCategoriesData); + setLastSetDataTimeStamp(timeStamp); + }; + + dispatcher.addActionListener( + actions.SET_CATEGORIES_DATA, + handleCategoriesData + ); + + return () => { + dispatcher.removeActionListener( + actions.SET_CATEGORIES_DATA, + handleCategoriesData + ); + }; + }, []); + + useEffect(() => { + const timerId = window.setTimeout(() => { + window.sendMessageToDigma({ + action: actions.GET_CATEGORIES_DATA + }); + }, REFRESH_INTERVAL); + + return () => { + window.clearTimeout(timerId); + }; + }, [lastSetDataTimeStamp]); + + useEffect(() => { + if (props.data) { + setData(props.data); + } + }, [props.data]); + + useEffect(() => { + if (!previousData && data) { + setIsInitialLoading(false); + } + }, [previousData, data]); + const handleAssetTypeClick = (assetTypeId: string) => { props.onAssetTypeSelect(assetTypeId); }; + const handleTroubleshootingLinkClick = () => { + sendTrackingEvent(globalTrackingEvents.TROUBLESHOOTING_LINK_CLICKED, { + origin: "assets" + }); + + window.sendMessageToDigma({ + action: globalActions.OPEN_TROUBLESHOOTING_GUIDE + }); + }; + + if (isInitialLoading) { + return ( + + } />; + + ); + } + + if (data?.assetCategories.every((x) => x.count === 0)) { + return ( + + + + Trigger actions that call this application to learn more about + its runtime behavior + + + Not seeing your application data? + + + } + /> + + ); + } + return ( {ASSET_TYPE_IDS.map((assetTypeId) => { + const assetTypeData = data?.assetCategories.find( + (x) => x.name === assetTypeId + ); const assetTypeInfo = getAssetTypeInfo(assetTypeId); - const entryCount = props.data[assetTypeId] - ? Object.values(props.data[assetTypeId]).length - : 0; + const entryCount = assetTypeData?.count || 0; return ( { + switch (theme.mode) { + case "light": + return "#788ca9"; + case "dark": + case "dark-jetbrains": + return "#7c7c94"; + } + }}; +`; + +export const TroubleshootingLink = styled(Link)` + color: ${({ theme }) => { + switch (theme.mode) { + case "light": + return "#7891d0"; + case "dark": + case "dark-jetbrains": + return "#92affa"; + } + }}; +`; diff --git a/src/components/Assets/AssetTypeList/types.ts b/src/components/Assets/AssetTypeList/types.ts index 1e0394f2f..80b830464 100644 --- a/src/components/Assets/AssetTypeList/types.ts +++ b/src/components/Assets/AssetTypeList/types.ts @@ -1,6 +1,11 @@ -import { ExtendedAssetEntryWithServices } from "../types"; - -export interface AssetListProps { - data: { [key: string]: ExtendedAssetEntryWithServices[] }; +export interface AssetTypeListProps { + data?: AssetCategoriesData; onAssetTypeSelect: (assetTypeId: string) => void; } + +export interface AssetCategoriesData { + assetCategories: { + name: string; + count: number; + }[]; +} diff --git a/src/components/Assets/Assets.stories.tsx b/src/components/Assets/Assets.stories.tsx deleted file mode 100644 index c807ba45e..000000000 --- a/src/components/Assets/Assets.stories.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { Meta, StoryObj } from "@storybook/react"; - -import { Assets } from "."; -import { data } from "./mockData"; - -// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction -const meta: Meta = { - title: "Assets/Assets", - component: Assets, - parameters: { - // More on how to position stories at: https://storybook.js.org/docs/react/configure/story-layout - layout: "fullscreen" - } -}; - -export default meta; - -type Story = StoryObj; - -export const NoData: Story = {}; - -export const WithData: Story = { args: { data } }; diff --git a/src/components/Assets/actions.ts b/src/components/Assets/actions.ts new file mode 100644 index 000000000..1c97d004d --- /dev/null +++ b/src/components/Assets/actions.ts @@ -0,0 +1,12 @@ +import { addPrefix } from "../../utils/addPrefix"; + +const ACTION_PREFIX = "ASSETS"; + +export const actions = addPrefix(ACTION_PREFIX, { + INITIALIZE: "INITIALIZE", + GET_DATA: "GET_DATA", + SET_DATA: "SET_DATA", + GO_TO_ASSET: "GO_TO_ASSET", + GET_CATEGORIES_DATA: "GET_CATEGORIES_DATA", + SET_CATEGORIES_DATA: "SET_CATEGORIES_DATA" +}); diff --git a/src/components/Assets/index.tsx b/src/components/Assets/index.tsx index c898f5329..6b57d76b4 100644 --- a/src/components/Assets/index.tsx +++ b/src/components/Assets/index.tsx @@ -1,133 +1,12 @@ -import { useEffect, useMemo, useState } from "react"; -import { actions as globalActions } from "../../actions"; -import { dispatcher } from "../../dispatcher"; -import { trackingEvents as globalTrackingEvents } from "../../trackingEvents"; -import { isNumber } from "../../typeGuards/isNumber"; -import { addPrefix } from "../../utils/addPrefix"; -import { groupBy } from "../../utils/groupBy"; -import { sendTrackingEvent } from "../../utils/sendTrackingEvent"; -import { EmptyState } from "../common/EmptyState"; -import { CardsIcon } from "../common/icons/CardsIcon"; +import { useMemo, useState } from "react"; import { AssetList } from "./AssetList"; import { AssetTypeList } from "./AssetTypeList"; import * as s from "./styles"; -import { - AssetEntry, - AssetsData, - AssetsProps, - ExtendedAssetEntry, - ExtendedAssetEntryWithServices, - GroupedAssetEntries, - ServiceAssetsEntry -} from "./types"; -const REFRESH_INTERVAL = isNumber(window.assetsRefreshInterval) - ? window.assetsRefreshInterval - : 10 * 1000; // in milliseconds - -const ACTION_PREFIX = "ASSETS"; - -const actions = addPrefix(ACTION_PREFIX, { - INITIALIZE: "INITIALIZE", - GET_DATA: "GET_DATA", - SET_DATA: "SET_DATA", - GO_TO_ASSET: "GO_TO_ASSET" -}); - -const dedupeEntries = (groupedEntries: { - [key: string]: ExtendedAssetEntry[]; -}): ExtendedAssetEntryWithServices[] => - Object.keys(groupedEntries).map((entryId) => { - const entries = groupedEntries[entryId]; - - const latestEntry = entries.reduce( - (acc, cur) => - new Date(cur.lastSpanInstanceInfo.startTime).valueOf() > - new Date(acc.lastSpanInstanceInfo.startTime).valueOf() - ? cur - : acc, - entries[0] - ); - - const relatedServices = entries.map((entry) => entry.serviceName).sort(); - - return { - ...latestEntry, - relatedServices - }; - }); - -const groupEntries = (data: ServiceAssetsEntry[]): GroupedAssetEntries => { - const assetEntries: ExtendedAssetEntry[] = data - .flat() - .map((entry) => - entry.assetEntries.map((entry) => ({ - ...entry, - id: entry.span.spanCodeObjectId - })) - ) - .flat(); - - const assetTypes = groupBy(assetEntries, (x) => x.assetType); - - const groupedAssetEntries: GroupedAssetEntries = {}; - - Object.keys(assetTypes).forEach((assetType) => { - groupedAssetEntries[assetType] = dedupeEntries( - groupBy(assetTypes[assetType], (x) => x.id) - ); - }); - - return groupedAssetEntries; -}; - -export const Assets = (props: AssetsProps) => { +export const Assets = () => { const [selectedAssetTypeId, setSelectedAssetTypeId] = useState( null ); - const [data, setData] = useState(); - const [lastSetDataTimeStamp, setLastSetDataTimeStamp] = useState(); - - useEffect(() => { - window.sendMessageToDigma({ - action: actions.INITIALIZE - }); - - window.sendMessageToDigma({ - action: actions.GET_DATA - }); - - const handleAssetsData = (data: unknown, timeStamp: number) => { - const entries = (data as AssetsData | null)?.serviceAssetsEntries; - setData(entries ? groupEntries(entries) : undefined); - setLastSetDataTimeStamp(timeStamp); - }; - - dispatcher.addActionListener(actions.SET_DATA, handleAssetsData); - - return () => { - dispatcher.removeActionListener(actions.SET_DATA, handleAssetsData); - }; - }, []); - - useEffect(() => { - const timerId = window.setTimeout(() => { - window.sendMessageToDigma({ - action: actions.GET_DATA - }); - }, REFRESH_INTERVAL); - - return () => { - window.clearTimeout(timerId); - }; - }, [lastSetDataTimeStamp]); - - useEffect(() => { - if (props.data) { - const groupedAssetEntries = groupEntries(props.data.serviceAssetsEntries); - setData(groupedAssetEntries); - } - }, [props.data]); const handleBackButtonClick = () => { setSelectedAssetTypeId(null); @@ -137,63 +16,18 @@ export const Assets = (props: AssetsProps) => { setSelectedAssetTypeId(assetTypeId); }; - const handleAssetLinkClick = (entry: AssetEntry) => { - window.sendMessageToDigma({ - action: actions.GO_TO_ASSET, - payload: { entry } - }); - }; - - const handleTroubleshootingLinkClick = () => { - sendTrackingEvent(globalTrackingEvents.TROUBLESHOOTING_LINK_CLICKED, { - origin: "assets" - }); - - window.sendMessageToDigma({ - action: globalActions.OPEN_TROUBLESHOOTING_GUIDE - }); - }; - const renderContent = useMemo((): JSX.Element => { - if (!data || Object.keys(data).length === 0) { - return ( - - - - Trigger actions that call this application to learn more about - its runtime behavior - - - Not seeing your application data? - - - } - /> - - ); - } - if (!selectedAssetTypeId) { - return ( - - ); + return ; } - const selectedAssetTypeEntries = data[selectedAssetTypeId] || []; - return ( ); - }, [data, selectedAssetTypeId]); + }, [selectedAssetTypeId]); return {renderContent}; }; diff --git a/src/components/Assets/mockData.ts b/src/components/Assets/mockData.ts deleted file mode 100644 index e324c3491..000000000 --- a/src/components/Assets/mockData.ts +++ /dev/null @@ -1,6183 +0,0 @@ -import { AssetsData } from "./types"; - -export const data: AssetsData = { - accountId: "00000000-0000-0000-0000-000000000000", - environment: "BOB-LAPTOP[LOCAL]", - serviceAssetsEntries: [ - { - itemType: "SpanAssets", - assetEntries: [ - { - span: { - classification: "Unknown", - role: "Internal", - name: "SELECT org.springframework.samples.petclinic.owner.PetType", - displayName: - "SELECT org.springframework.samples.petclinic.owner.PetType", - instrumentationLibrary: "io.opentelemetry.hibernate-6.0", - spanCodeObjectId: - "span:io.opentelemetry.hibernate-6.0$_$SELECT org.springframework.samples.petclinic.owner.PetType", - methodCodeObjectId: "", - kind: "Internal", - codeObjectId: "" - }, - assetType: "Other", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 442.04, unit: "μs", raw: 442042 } - }, - { - percentile: 0.95, - currentDuration: { - value: 2.06, - unit: "ms", - raw: 2063332.9999999993 - } - } - ], - impactScores: { ScoreExp25: -1, ScoreExp1000: -1 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "9316AB9977582858CF8486458925BB4A", - spanId: "04F731D0409E792A", - startTime: "2023-08-03T15:03:10.033838Z", - duration: { value: 118.79, unit: "μs", raw: 118791 } - }, - firstDataSeenTime: "2023-08-03T15:03:17.92583Z", - p50: { value: 442.04, unit: "μs", raw: 442042 }, - p95: { value: 2.06, unit: "ms", raw: 2063332.9999999993 } - }, - { - span: { - classification: "Unknown", - role: "Internal", - name: "SELECT org.springframework.samples.petclinic.vet.Vet", - displayName: "SELECT org.springframework.samples.petclinic.vet.Vet", - instrumentationLibrary: "io.opentelemetry.hibernate-6.0", - spanCodeObjectId: - "span:io.opentelemetry.hibernate-6.0$_$SELECT org.springframework.samples.petclinic.vet.Vet", - methodCodeObjectId: "", - kind: "Internal", - codeObjectId: "" - }, - assetType: "Other", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 163.88, unit: "ms", raw: 163878333 } - }, - { - percentile: 0.95, - currentDuration: { value: 163.88, unit: "ms", raw: 163878333 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanEndpointBottleneck", - importance: 2, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "4D38B1BF14B7D13C45CF7C58B76E2E17", - spanId: "F17FE0AFEE441259", - startTime: "2023-08-03T15:02:51.294666Z", - duration: { value: 5.03, unit: "ms", raw: 5034583 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.942604Z", - p50: { value: 163.88, unit: "ms", raw: 163878333 }, - p95: { value: 163.88, unit: "ms", raw: 163878333 } - }, - { - span: { - classification: "Unknown", - role: "Internal", - name: "Transaction.commit", - displayName: "Transaction.commit", - instrumentationLibrary: "io.opentelemetry.hibernate-6.0", - spanCodeObjectId: - "span:io.opentelemetry.hibernate-6.0$_$Transaction.commit", - methodCodeObjectId: "", - kind: "Internal", - codeObjectId: "" - }, - assetType: "Other", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 46.79, unit: "μs", raw: 46792 } - }, - { - percentile: 0.95, - currentDuration: { - value: 108.84, - unit: "μs", - raw: 108843.79999999999 - } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingWell", - importance: 5, - shortDisplayInfo: { - title: "No Scaling Issue Detected", - targetDisplayName: "", - subtitle: "", - description: - "This code is scaling well at concurrent executions" - } - } - ], - lastSpanInstanceInfo: { - traceId: "9316AB9977582858CF8486458925BB4A", - spanId: "AA6A59110CCDEC7D", - startTime: "2023-08-03T15:03:10.033996Z", - duration: { value: 20.04, unit: "μs", raw: 20042 } - }, - firstDataSeenTime: "2023-08-03T15:03:17.92863Z", - p50: { value: 46.79, unit: "μs", raw: 46792 }, - p95: { value: 108.84, unit: "μs", raw: 108843.79999999999 } - }, - { - span: { - classification: "Rendering", - role: "Internal", - name: "Render owners/createOrUpdateOwnerForm", - displayName: "Render owners/createOrUpdateOwnerForm", - instrumentationLibrary: "io.opentelemetry.spring-webmvc-6.0", - spanCodeObjectId: - "span:io.opentelemetry.spring-webmvc-6.0$_$Render owners/createOrUpdateOwnerForm", - methodCodeObjectId: "", - kind: "Internal", - codeObjectId: "" - }, - assetType: "Other", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 3.57, unit: "ms", raw: 3569646 } - }, - { - percentile: 0.95, - currentDuration: { - value: 34.51, - unit: "ms", - raw: 34514016.79999999 - } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "A5B2C18C7F88BF17381ED1FD7B57A3C3", - spanId: "CE24F4630310BE97", - startTime: "2023-08-03T15:03:10.022954Z", - duration: { value: 1.61, unit: "ms", raw: 1609333 } - }, - firstDataSeenTime: "2023-08-03T15:03:17.900691Z", - p50: { value: 3.57, unit: "ms", raw: 3569646 }, - p95: { value: 34.51, unit: "ms", raw: 34514016.79999999 } - }, - { - span: { - classification: "Rendering", - role: "Internal", - name: "Render owners/findOwners", - displayName: "Render owners/findOwners", - instrumentationLibrary: "io.opentelemetry.spring-webmvc-6.0", - spanCodeObjectId: - "span:io.opentelemetry.spring-webmvc-6.0$_$Render owners/findOwners", - methodCodeObjectId: "", - kind: "Internal", - codeObjectId: "" - }, - assetType: "Other", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 627.17, unit: "μs", raw: 627167 } - }, - { - percentile: 0.95, - currentDuration: { - value: 8.25, - unit: "ms", - raw: 8252414.349999995 - } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "9D767B5368F97B6C6349C45D5EE82AE8", - spanId: "51B38C21E4F11C69", - startTime: "2023-08-03T15:02:51.72937Z", - duration: { value: 641.33, unit: "μs", raw: 641333 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.973588Z", - p50: { value: 627.17, unit: "μs", raw: 627167 }, - p95: { value: 8.25, unit: "ms", raw: 8252414.349999995 } - }, - { - span: { - classification: "Rendering", - role: "Internal", - name: "Render owners/ownerDetails", - displayName: "Render owners/ownerDetails", - instrumentationLibrary: "io.opentelemetry.spring-webmvc-6.0", - spanCodeObjectId: - "span:io.opentelemetry.spring-webmvc-6.0$_$Render owners/ownerDetails", - methodCodeObjectId: "", - kind: "Internal", - codeObjectId: "" - }, - assetType: "Other", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 1.28, unit: "ms", raw: 1275917 } - }, - { - percentile: 0.95, - currentDuration: { - value: 10.42, - unit: "ms", - raw: 10419499.999999996 - } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "974ADBA5DCC1E662F4832D54D4D5C6C9", - spanId: "5840D7194838F6FD", - startTime: "2023-08-03T15:02:51.580973Z", - duration: { value: 2.85, unit: "ms", raw: 2850750 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.97477Z", - p50: { value: 1.28, unit: "ms", raw: 1275917 }, - p95: { value: 10.42, unit: "ms", raw: 10419499.999999996 } - }, - { - span: { - classification: "Rendering", - role: "Internal", - name: "Render owners/ownersList", - displayName: "Render owners/ownersList", - instrumentationLibrary: "io.opentelemetry.spring-webmvc-6.0", - spanCodeObjectId: - "span:io.opentelemetry.spring-webmvc-6.0$_$Render owners/ownersList", - methodCodeObjectId: "", - kind: "Internal", - codeObjectId: "" - }, - assetType: "Other", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 1.03, unit: "ms", raw: 1026604 } - }, - { - percentile: 0.95, - currentDuration: { value: 8.84, unit: "ms", raw: 8836250 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "327F1AF74124C7044B7DB1022B5E77FD", - spanId: "BEC12D7D553A900E", - startTime: "2023-08-03T15:02:51.708697Z", - duration: { value: 781.29, unit: "μs", raw: 781291 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.99183Z", - p50: { value: 1.03, unit: "ms", raw: 1026604 }, - p95: { value: 8.84, unit: "ms", raw: 8836250 } - }, - { - span: { - classification: "Rendering", - role: "Internal", - name: "Render pets/createOrUpdatePetForm", - displayName: "Render pets/createOrUpdatePetForm", - instrumentationLibrary: "io.opentelemetry.spring-webmvc-6.0", - spanCodeObjectId: - "span:io.opentelemetry.spring-webmvc-6.0$_$Render pets/createOrUpdatePetForm", - methodCodeObjectId: "", - kind: "Internal", - codeObjectId: "" - }, - assetType: "Other", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 4.06, unit: "ms", raw: 4059917 } - }, - { - percentile: 0.95, - currentDuration: { value: 18.48, unit: "ms", raw: 18478625 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "9316AB9977582858CF8486458925BB4A", - spanId: "7A4212ADDBC89608", - startTime: "2023-08-03T15:03:10.030119Z", - duration: { value: 4.06, unit: "ms", raw: 4059917 } - }, - firstDataSeenTime: "2023-08-03T15:03:17.907205Z", - p50: { value: 4.06, unit: "ms", raw: 4059917 }, - p95: { value: 18.48, unit: "ms", raw: 18478625 } - }, - { - span: { - classification: "Rendering", - role: "Internal", - name: "Render vets/vetList", - displayName: "Render vets/vetList", - instrumentationLibrary: "io.opentelemetry.spring-webmvc-6.0", - spanCodeObjectId: - "span:io.opentelemetry.spring-webmvc-6.0$_$Render vets/vetList", - methodCodeObjectId: "", - kind: "Internal", - codeObjectId: "" - }, - assetType: "Other", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 1.45, unit: "ms", raw: 1445792 } - }, - { - percentile: 0.95, - currentDuration: { value: 23.13, unit: "ms", raw: 23128875 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "E4A02B938FEB0DB76132BDF0F452F48A", - spanId: "DCD0B23F13AE577C", - startTime: "2023-08-03T15:02:51.347746Z", - duration: { value: 936.38, unit: "μs", raw: 936375 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.98249Z", - p50: { value: 1.45, unit: "ms", raw: 1445792 }, - p95: { value: 23.13, unit: "ms", raw: 23128875 } - }, - { - span: { - classification: "Rendering", - role: "Internal", - name: "Render welcome", - displayName: "Render welcome", - instrumentationLibrary: "io.opentelemetry.spring-webmvc-6.0", - spanCodeObjectId: - "span:io.opentelemetry.spring-webmvc-6.0$_$Render welcome", - methodCodeObjectId: "", - kind: "Internal", - codeObjectId: "" - }, - assetType: "Other", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 1.04, unit: "ms", raw: 1043333 } - }, - { - percentile: 0.95, - currentDuration: { - value: 7.32, - unit: "ms", - raw: 7317791.999999999 - } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "5E374DCAC4131F844AF870B6EF58F11D", - spanId: "A6AAF26C32FB1A40", - startTime: "2023-08-03T15:05:55.953559Z", - duration: { value: 1.04, unit: "ms", raw: 1043333 } - }, - firstDataSeenTime: "2023-08-03T14:18:06.952074Z", - p50: { value: 1.04, unit: "ms", raw: 1043333 }, - p95: { value: 7.32, unit: "ms", raw: 7317791.999999999 } - }, - { - span: { - classification: "Unknown", - role: "Internal", - name: "db_access_01", - displayName: "db_access_01", - instrumentationLibrary: "SampleInsightsController", - spanCodeObjectId: "span:SampleInsightsController$_$db_access_01", - methodCodeObjectId: "", - kind: "Internal", - codeObjectId: "" - }, - assetType: "Other", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 1.45, unit: "ms", raw: 1449167 } - }, - { - percentile: 0.95, - currentDuration: { value: 1.45, unit: "ms", raw: 1449167 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "C33B2D4E684D00C5", - startTime: "2023-08-03T15:03:15.617662Z", - duration: { value: 244.46, unit: "μs", raw: 244458 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.966613Z", - p50: { value: 1.45, unit: "ms", raw: 1449167 }, - p95: { value: 1.45, unit: "ms", raw: 1449167 } - }, - { - span: { - classification: "Unknown", - role: "Internal", - name: "going-to-record-error", - displayName: "going-to-record-error", - instrumentationLibrary: "SampleInsightsController", - spanCodeObjectId: - "span:SampleInsightsController$_$going-to-record-error", - methodCodeObjectId: "", - kind: "Internal", - codeObjectId: "" - }, - assetType: "Other", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 867.42, unit: "μs", raw: 867417 } - }, - { - percentile: 0.95, - currentDuration: { value: 867.42, unit: "μs", raw: 867417 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "47C7C36FD7F32792", - startTime: "2023-08-03T15:03:18.311232Z", - duration: { value: 21.12, unit: "μs", raw: 21125 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.991072Z", - p50: { value: 867.42, unit: "μs", raw: 867417 }, - p95: { value: 867.42, unit: "μs", raw: 867417 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "0423CF71E944C630050ECAEACB2F0C", - displayName: - "select s1_0.vet_id,s1_1.id,s1_1.name from vet_specialties s1_0 join specialties s1_1 on s1_1.id=s1_0.specialty_id where s1_0.vet_id=?", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$0423CF71E944C630050ECAEACB2F0C", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 222.71, unit: "μs", raw: 222709 } - }, - { - percentile: 0.95, - currentDuration: { value: 222.71, unit: "μs", raw: 222709 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "4D38B1BF14B7D13C45CF7C58B76E2E17", - spanId: "E1FC6231ED5D0B1A", - startTime: "2023-08-03T15:02:51.292223Z", - duration: { value: 69.12, unit: "μs", raw: 69125 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.940226Z", - p50: { value: 222.71, unit: "μs", raw: 222709 }, - p95: { value: 222.71, unit: "μs", raw: 222709 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "0432A12BBE1BB6839A0A1E4F1CAFC7", - displayName: "CREATE INDEX specialties_name ON specialties (name)", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$0432A12BBE1BB6839A0A1E4F1CAFC7", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 207.79, unit: "μs", raw: 207792 } - }, - { - percentile: 0.95, - currentDuration: { value: 207.79, unit: "μs", raw: 207792 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "1D54BCB0F538EE13C259F5529B9A45CE", - spanId: "523D2451AD4E7CC4", - startTime: "2023-08-03T14:17:27.624452Z", - duration: { value: 207.79, unit: "μs", raw: 207792 } - }, - firstDataSeenTime: "2023-08-03T14:17:38.041911Z", - p50: { value: 207.79, unit: "μs", raw: 207792 }, - p95: { value: 207.79, unit: "μs", raw: 207792 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "062DB0F76E94C36D73CB5A6B280BE6", - displayName: - "select distinct o1_0.id,o1_0.address,o1_0.city,o1_0.first_name,o1_0.last_name,o1_0.telephone from owners o1_0 left join pets p1_0 on o1_0.id=p1_0.owner_id where o1_0.last_name like ? escape ? offset ? rows fetch first ? rows only", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$062DB0F76E94C36D73CB5A6B280BE6", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 304.02, unit: "μs", raw: 304021 } - }, - { - percentile: 0.95, - currentDuration: { - value: 782.08, - unit: "μs", - raw: 782083.3999999998 - } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "9D767B5368F97B6C6349C45D5EE82AE8", - spanId: "1E12EF1A6392E7AD", - startTime: "2023-08-03T15:02:51.728956Z", - duration: { value: 220, unit: "μs", raw: 220000 } - }, - firstDataSeenTime: "2023-08-03T15:03:08.01632Z", - p50: { value: 304.02, unit: "μs", raw: 304021 }, - p95: { value: 782.08, unit: "μs", raw: 782083.3999999998 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "0C74510D2F23C8FDB53BFE886B9283", - displayName: "select count(v1_0.id) from vets v1_0", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$0C74510D2F23C8FDB53BFE886B9283", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 90.75, unit: "μs", raw: 90750 } - }, - { - percentile: 0.95, - currentDuration: { value: 90.75, unit: "μs", raw: 90750 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "4D38B1BF14B7D13C45CF7C58B76E2E17", - spanId: "A48191E4344D6071", - startTime: "2023-08-03T15:02:51.299524Z", - duration: { value: 90.75, unit: "μs", raw: 90750 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.929329Z", - p50: { value: 90.75, unit: "μs", raw: 90750 }, - p95: { value: 90.75, unit: "μs", raw: 90750 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "1CDB3F92CD86C7C9383F926B863880", - displayName: "CREATE INDEX visits_pet_id ON visits (pet_id)", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$1CDB3F92CD86C7C9383F926B863880", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 161.38, unit: "μs", raw: 161375 } - }, - { - percentile: 0.95, - currentDuration: { value: 161.38, unit: "μs", raw: 161375 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "383CFDFB7B8F65E805AB2B45FEB2411C", - spanId: "D77D5BB346E4EA1D", - startTime: "2023-08-03T14:17:27.635069Z", - duration: { value: 161.38, unit: "μs", raw: 161375 } - }, - firstDataSeenTime: "2023-08-03T14:17:38.133815Z", - p50: { value: 161.38, unit: "μs", raw: 161375 }, - p95: { value: 161.38, unit: "μs", raw: 161375 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "2326FF593BC7C6464A016ED4131F0A", - displayName: "INSERT INTO pets VALUES (default, ?, ?, ?, ?)", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$2326FF593BC7C6464A016ED4131F0A", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 156.96, unit: "μs", raw: 156958 } - }, - { - percentile: 0.95, - currentDuration: { - value: 394.16, - unit: "μs", - raw: 394159.7499999999 - } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "FD4E5DA878CC59F552DE3A3BC0DB59D6", - spanId: "903EF594E1849B37", - startTime: "2023-08-03T14:17:27.645178Z", - duration: { value: 154.08, unit: "μs", raw: 154083 } - }, - firstDataSeenTime: "2023-08-03T14:17:37.981216Z", - p50: { value: 156.96, unit: "μs", raw: 156958 }, - p95: { value: 394.16, unit: "μs", raw: 394159.7499999999 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "2E769F001C399E53055039F0088C0D", - displayName: - "select p1_0.id,p1_0.name from types p1_0 order by p1_0.name", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$2E769F001C399E53055039F0088C0D", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 55.62, unit: "μs", raw: 55625 } - }, - { - percentile: 0.95, - currentDuration: { - value: 146.46, - unit: "μs", - raw: 146457.99999999997 - } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "9316AB9977582858CF8486458925BB4A", - spanId: "0C8450B4C29649E7", - startTime: "2023-08-03T15:03:10.033896Z", - duration: { value: 15.75, unit: "μs", raw: 15750 } - }, - firstDataSeenTime: "2023-08-03T15:03:17.92238Z", - p50: { value: 55.62, unit: "μs", raw: 55625 }, - p95: { value: 146.46, unit: "μs", raw: 146457.99999999997 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "39EEDC331DB240E757E8F6C63A516D", - displayName: "DROP TABLE types IF EXISTS", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$39EEDC331DB240E757E8F6C63A516D", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 68.79, unit: "μs", raw: 68792 } - }, - { - percentile: 0.95, - currentDuration: { value: 68.79, unit: "μs", raw: 68792 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "78C9AB4436CF9B86EEFD0A8C75DF641D", - spanId: "A2671193E8CE75A5", - startTime: "2023-08-03T14:17:27.619715Z", - duration: { value: 68.79, unit: "μs", raw: 68792 } - }, - firstDataSeenTime: "2023-08-03T14:17:38.074041Z", - p50: { value: 68.79, unit: "μs", raw: 68792 }, - p95: { value: 68.79, unit: "μs", raw: 68792 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "405F6BDE23A3D82CAFB7A47BC0B4BC", - displayName: - "CREATE TABLE types ( id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, name VARCHAR(?) )", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$405F6BDE23A3D82CAFB7A47BC0B4BC", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 340.92, unit: "μs", raw: 340917 } - }, - { - percentile: 0.95, - currentDuration: { value: 340.92, unit: "μs", raw: 340917 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "C9468D9B8085EB7D4FBC81C496A4B1C8", - spanId: "0CB14677A7CE7BF4", - startTime: "2023-08-03T14:17:27.630597Z", - duration: { value: 340.92, unit: "μs", raw: 340917 } - }, - firstDataSeenTime: "2023-08-03T14:17:37.995539Z", - p50: { value: 340.92, unit: "μs", raw: 340917 }, - p95: { value: 340.92, unit: "μs", raw: 340917 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "46DDF2BB2D097FFB7E1F8035D0FAE1", - displayName: - "CREATE TABLE vet_specialties ( vet_id INTEGER NOT NULL, specialty_id INTEGER NOT NULL )", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$46DDF2BB2D097FFB7E1F8035D0FAE1", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 197.12, unit: "μs", raw: 197125 } - }, - { - percentile: 0.95, - currentDuration: { value: 197.12, unit: "μs", raw: 197125 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "CDEE0D19C14CBD8B61F1CDEC066230FD", - spanId: "1D2151B8C6FB40CF", - startTime: "2023-08-03T14:17:27.624708Z", - duration: { value: 197.12, unit: "μs", raw: 197125 } - }, - firstDataSeenTime: "2023-08-03T14:17:37.935399Z", - p50: { value: 197.12, unit: "μs", raw: 197125 }, - p95: { value: 197.12, unit: "μs", raw: 197125 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "534C0FDAF3DB4EB83CBD1D5DDF0B5F", - displayName: - "CREATE TABLE specialties ( id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, name VARCHAR(?) )", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$534C0FDAF3DB4EB83CBD1D5DDF0B5F", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 419.29, unit: "μs", raw: 419292 } - }, - { - percentile: 0.95, - currentDuration: { value: 419.29, unit: "μs", raw: 419292 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "5EEF271B121A3184D4B3D95303398247", - spanId: "91B7C4849A85AA9A", - startTime: "2023-08-03T14:17:27.623981Z", - duration: { value: 419.29, unit: "μs", raw: 419292 } - }, - firstDataSeenTime: "2023-08-03T14:17:37.820406Z", - p50: { value: 419.29, unit: "μs", raw: 419292 }, - p95: { value: 419.29, unit: "μs", raw: 419292 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "5C4D22A699D3A551E2AFFA4FA0B3BF", - displayName: - "select p1_0.owner_id,p1_0.id,p1_0.birth_date,p1_0.name,t1_0.id,t1_0.name,v1_0.pet_id,v1_0.id,v1_0.visit_date,v1_0.description from pets p1_0 left join types t1_0 on t1_0.id=p1_0.type_id left join visits v1_0 on p1_0.id=v1_0.pet_id where p1_0.owner_id=? order by v1_0.visit_date asc,p1_0.name", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$5C4D22A699D3A551E2AFFA4FA0B3BF", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 76.15, unit: "μs", raw: 76145.5 } - }, - { - percentile: 0.95, - currentDuration: { value: 115.17, unit: "μs", raw: 115166 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "327F1AF74124C7044B7DB1022B5E77FD", - spanId: "F5A70B0D6F8DBD54", - startTime: "2023-08-03T15:02:51.708232Z", - duration: { value: 72.79, unit: "μs", raw: 72792 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.991984Z", - p50: { value: 76.15, unit: "μs", raw: 76145.5 }, - p95: { value: 115.17, unit: "μs", raw: 115166 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "5EC8CCD0FC2253EF7C5A3CCB0FA544", - displayName: "DROP TABLE pets IF EXISTS", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$5EC8CCD0FC2253EF7C5A3CCB0FA544", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 48.54, unit: "μs", raw: 48542 } - }, - { - percentile: 0.95, - currentDuration: { value: 48.54, unit: "μs", raw: 48542 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "972193204A5C7B134D7A023321EBA2F0", - spanId: "13784E040C19DE6A", - startTime: "2023-08-03T14:17:27.619626Z", - duration: { value: 48.54, unit: "μs", raw: 48542 } - }, - firstDataSeenTime: "2023-08-03T14:17:37.826511Z", - p50: { value: 48.54, unit: "μs", raw: 48542 }, - p95: { value: 48.54, unit: "μs", raw: 48542 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "63FCDB29701D42FA5ED4CE0ACCBA7C", - displayName: - "CREATE TABLE pets ( id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, name VARCHAR(?), birth_date DATE, type_id INTEGER NOT NULL, owner_id INTEGER )", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$63FCDB29701D42FA5ED4CE0ACCBA7C", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 340.46, unit: "μs", raw: 340458 } - }, - { - percentile: 0.95, - currentDuration: { value: 340.46, unit: "μs", raw: 340458 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "6F750907BF7EC0B7BB46117D7FC6EFEF", - spanId: "2194EAC4B1DD8938", - startTime: "2023-08-03T14:17:27.631933Z", - duration: { value: 340.46, unit: "μs", raw: 340458 } - }, - firstDataSeenTime: "2023-08-03T14:17:37.882855Z", - p50: { value: 340.46, unit: "μs", raw: 340458 }, - p95: { value: 340.46, unit: "μs", raw: 340458 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "6664475742328A7BB3EA941976CD4F", - displayName: "CREATE INDEX types_name ON types (name)", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$6664475742328A7BB3EA941976CD4F", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 190.71, unit: "μs", raw: 190709 } - }, - { - percentile: 0.95, - currentDuration: { value: 190.71, unit: "μs", raw: 190709 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "671AAFCFD34FB15DB3C35B1704B4560A", - spanId: "0523147E2A4F259C", - startTime: "2023-08-03T14:17:27.63098Z", - duration: { value: 190.71, unit: "μs", raw: 190709 } - }, - firstDataSeenTime: "2023-08-03T14:17:38.169938Z", - p50: { value: 190.71, unit: "μs", raw: 190709 }, - p95: { value: 190.71, unit: "μs", raw: 190709 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "6BBFBC487B6029B9331BD223881F34", - displayName: "INSERT INTO types VALUES (default, ?)", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$6BBFBC487B6029B9331BD223881F34", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 110.94, unit: "μs", raw: 110937.5 } - }, - { - percentile: 0.95, - currentDuration: { value: 170, unit: "μs", raw: 170000 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "6912D6AA41D92B88CDED509D1B87482D", - spanId: "29929DBE0657587B", - startTime: "2023-08-03T14:17:27.640519Z", - duration: { value: 112.12, unit: "μs", raw: 112125 } - }, - firstDataSeenTime: "2023-08-03T14:17:37.997529Z", - p50: { value: 110.94, unit: "μs", raw: 110937.5 }, - p95: { value: 170, unit: "μs", raw: 170000 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "6DB2586E1A35458782A00DEF682492", - displayName: - "select v1_0.id,v1_0.first_name,v1_0.last_name from vets v1_0 offset ? rows fetch first ? rows only", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$6DB2586E1A35458782A00DEF682492", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 4.62, unit: "ms", raw: 4618041 } - }, - { - percentile: 0.95, - currentDuration: { value: 4.62, unit: "ms", raw: 4618041 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "4D38B1BF14B7D13C45CF7C58B76E2E17", - spanId: "B4A84364A5FB65D8", - startTime: "2023-08-03T15:02:51.253293Z", - duration: { value: 4.62, unit: "ms", raw: 4618041 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.9406Z", - p50: { value: 4.62, unit: "ms", raw: 4618041 }, - p95: { value: 4.62, unit: "ms", raw: 4618041 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "7A599FA10F9EC97FD50716618CFBE7", - displayName: "INSERT INTO vet_specialties VALUES (?, ?)", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$7A599FA10F9EC97FD50716618CFBE7", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 138.17, unit: "μs", raw: 138167 } - }, - { - percentile: 0.95, - currentDuration: { value: 175.38, unit: "μs", raw: 175375 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "593C490C243751ECB9C69EA33440F68D", - spanId: "B709DE84149B3DBB", - startTime: "2023-08-03T14:17:27.639681Z", - duration: { value: 138.17, unit: "μs", raw: 138167 } - }, - firstDataSeenTime: "2023-08-03T14:17:37.885077Z", - p50: { value: 138.17, unit: "μs", raw: 138167 }, - p95: { value: 175.38, unit: "μs", raw: 175375 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "7B0B154FB4B1FAEAC04DBE3D6DEFAF", - displayName: "INSERT INTO owners VALUES (default, ?, ?, ?, ?, ?)", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$7B0B154FB4B1FAEAC04DBE3D6DEFAF", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 148.08, unit: "μs", raw: 148083.5 } - }, - { - percentile: 0.95, - currentDuration: { value: 217.79, unit: "μs", raw: 217791 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "FEAF905C81650A2484125F29E0B3A49E", - spanId: "613DED7D14981617", - startTime: "2023-08-03T14:17:27.641544Z", - duration: { value: 159.71, unit: "μs", raw: 159708 } - }, - firstDataSeenTime: "2023-08-03T14:17:37.971044Z", - p50: { value: 148.08, unit: "μs", raw: 148083.5 }, - p95: { value: 217.79, unit: "μs", raw: 217791 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "7E34FB5601C39128B59EC54140D4C7", - displayName: - "CREATE TABLE visits ( id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, pet_id INTEGER, visit_date DATE, description VARCHAR(?) )", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$7E34FB5601C39128B59EC54140D4C7", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 567.54, unit: "μs", raw: 567541 } - }, - { - percentile: 0.95, - currentDuration: { value: 567.54, unit: "μs", raw: 567541 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "CCF2DB1909BA03BA419999D9CB1607AE", - spanId: "25A740251B76B1A4", - startTime: "2023-08-03T14:17:27.633899Z", - duration: { value: 567.54, unit: "μs", raw: 567541 } - }, - firstDataSeenTime: "2023-08-03T14:17:38.080574Z", - p50: { value: 567.54, unit: "μs", raw: 567541 }, - p95: { value: 567.54, unit: "μs", raw: 567541 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "8012B6C9D3C8DC4768F13DBE99A978", - displayName: "CREATE INDEX vets_last_name ON vets (last_name)", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$8012B6C9D3C8DC4768F13DBE99A978", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 494.08, unit: "μs", raw: 494084 } - }, - { - percentile: 0.95, - currentDuration: { value: 494.08, unit: "μs", raw: 494084 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "45EA1AA311940A3CC828C3882635DEE1", - spanId: "4E22C497EBDE038F", - startTime: "2023-08-03T14:17:27.623428Z", - duration: { value: 494.08, unit: "μs", raw: 494084 } - }, - firstDataSeenTime: "2023-08-03T14:17:38.139932Z", - p50: { value: 494.08, unit: "μs", raw: 494084 }, - p95: { value: 494.08, unit: "μs", raw: 494084 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "82FADA337BB4E30E37DD044119D180", - displayName: - "select p1_0.id,p1_0.name from types p1_0 where p1_0.id=?", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$82FADA337BB4E30E37DD044119D180", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 46.88, unit: "μs", raw: 46875 } - }, - { - percentile: 0.95, - currentDuration: { value: 91.35, unit: "μs", raw: 91354.25 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "A5B2C18C7F88BF17381ED1FD7B57A3C3", - spanId: "DD9F8D79CE45AC10", - startTime: "2023-08-03T15:03:10.020894Z", - duration: { value: 46.88, unit: "μs", raw: 46875 } - }, - firstDataSeenTime: "2023-08-03T15:03:17.890981Z", - p50: { value: 46.88, unit: "μs", raw: 46875 }, - p95: { value: 91.35, unit: "μs", raw: 91354.25 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "87EA9B43C2BD4BA688918C267FDD19", - displayName: - "select v1_0.pet_id,v1_0.id,v1_0.visit_date,v1_0.description from visits v1_0 where v1_0.pet_id=? order by v1_0.visit_date asc", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$87EA9B43C2BD4BA688918C267FDD19", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 56.21, unit: "μs", raw: 56208.5 } - }, - { - percentile: 0.95, - currentDuration: { - value: 105.23, - unit: "μs", - raw: 105228.99999999997 - } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "9316AB9977582858CF8486458925BB4A", - spanId: "C164200EDD5483B4", - startTime: "2023-08-03T15:03:10.029498Z", - duration: { value: 68.04, unit: "μs", raw: 68042 } - }, - firstDataSeenTime: "2023-08-03T15:03:17.921681Z", - p50: { value: 56.21, unit: "μs", raw: 56208.5 }, - p95: { value: 105.23, unit: "μs", raw: 105228.99999999997 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "9008891AB1E0E7DF60DE9889D42015", - displayName: "INSERT INTO vets VALUES (default, ?, ?)", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$9008891AB1E0E7DF60DE9889D42015", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 134.83, unit: "μs", raw: 134833.5 } - }, - { - percentile: 0.95, - currentDuration: { value: 1.03, unit: "ms", raw: 1026291 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "73B4FDF439EB772ABA164D02A0DEE2E9", - spanId: "F0AC28FC53003E82", - startTime: "2023-08-03T14:17:27.638102Z", - duration: { value: 125.12, unit: "μs", raw: 125125 } - }, - firstDataSeenTime: "2023-08-03T14:17:37.826711Z", - p50: { value: 134.83, unit: "μs", raw: 134833.5 }, - p95: { value: 1.03, unit: "ms", raw: 1026291 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "942E5E90812B5BE36D3B51A3887A33", - displayName: - "select o1_0.id,o1_0.address,o1_0.city,o1_0.first_name,o1_0.last_name,p1_0.owner_id,p1_0.id,p1_0.birth_date,p1_0.name,p1_0.type_id,o1_0.telephone from owners o1_0 left join pets p1_0 on o1_0.id=p1_0.owner_id where o1_0.id=? order by p1_0.name", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$942E5E90812B5BE36D3B51A3887A33", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 100.17, unit: "μs", raw: 100166.5 } - }, - { - percentile: 0.95, - currentDuration: { - value: 304.96, - unit: "μs", - raw: 304957.99999999994 - } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "9316AB9977582858CF8486458925BB4A", - spanId: "C8A8F26FCB84CB6C", - startTime: "2023-08-03T15:03:10.028836Z", - duration: { value: 33, unit: "μs", raw: 33000 } - }, - firstDataSeenTime: "2023-08-03T15:03:17.912946Z", - p50: { value: 100.17, unit: "μs", raw: 100166.5 }, - p95: { value: 304.96, unit: "μs", raw: 304957.99999999994 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "9C57490BD751486F81056AE517F536", - displayName: - "ALTER TABLE pets ADD CONSTRAINT fk_pets_types FOREIGN KEY (type_id) REFERENCES types (id)", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$9C57490BD751486F81056AE517F536", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 542.58, unit: "μs", raw: 542584 } - }, - { - percentile: 0.95, - currentDuration: { value: 542.58, unit: "μs", raw: 542584 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "4F8A6264CFA0804BE71A65AE9D327D35", - spanId: "1AAF9C2078703CC6", - startTime: "2023-08-03T14:17:27.6331Z", - duration: { value: 542.58, unit: "μs", raw: 542584 } - }, - firstDataSeenTime: "2023-08-03T14:17:38.093788Z", - p50: { value: 542.58, unit: "μs", raw: 542584 }, - p95: { value: 542.58, unit: "μs", raw: 542584 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "9EBF772F0F1D7D00AF9F718C67B317", - displayName: - "CREATE TABLE owners ( id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, first_name VARCHAR(?), last_name VARCHAR_IGNORECASE(?), address VARCHAR(?), city VARCHAR(?), telephone VARCHAR(?) )", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$9EBF772F0F1D7D00AF9F718C67B317", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 397.83, unit: "μs", raw: 397833 } - }, - { - percentile: 0.95, - currentDuration: { value: 397.83, unit: "μs", raw: 397833 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "0B96DDC7979A36B18CA3B33A7ACD2EBF", - spanId: "CEB6110C6C116F40", - startTime: "2023-08-03T14:17:27.631233Z", - duration: { value: 397.83, unit: "μs", raw: 397833 } - }, - firstDataSeenTime: "2023-08-03T14:17:37.981161Z", - p50: { value: 397.83, unit: "μs", raw: 397833 }, - p95: { value: 397.83, unit: "μs", raw: 397833 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "9F4267312FADBA7A49F52B199EEB87", - displayName: - "ALTER TABLE visits ADD CONSTRAINT fk_visits_pets FOREIGN KEY (pet_id) REFERENCES pets (id)", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$9F4267312FADBA7A49F52B199EEB87", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 495.04, unit: "μs", raw: 495042 } - }, - { - percentile: 0.95, - currentDuration: { value: 495.04, unit: "μs", raw: 495042 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "717AFE3701BEA2149B28C963B56C1374", - spanId: "58A3C3BC6E5E4707", - startTime: "2023-08-03T14:17:27.634518Z", - duration: { value: 495.04, unit: "μs", raw: 495042 } - }, - firstDataSeenTime: "2023-08-03T14:17:38.16309Z", - p50: { value: 495.04, unit: "μs", raw: 495042 }, - p95: { value: 495.04, unit: "μs", raw: 495042 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "A566DCDDB5DCBCE5BACF031A8E4F61", - displayName: "INSERT INTO visits VALUES (default, ?, ?, ?)", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$A566DCDDB5DCBCE5BACF031A8E4F61", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 139.08, unit: "μs", raw: 139083.5 } - }, - { - percentile: 0.95, - currentDuration: { value: 176.04, unit: "μs", raw: 176042 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "0084F37650072074A3F8390137D42B27", - spanId: "05D1F3C9A4AEF95F", - startTime: "2023-08-03T14:17:27.646363Z", - duration: { value: 121.88, unit: "μs", raw: 121875 } - }, - firstDataSeenTime: "2023-08-03T14:17:38.173262Z", - p50: { value: 139.08, unit: "μs", raw: 139083.5 }, - p95: { value: 176.04, unit: "μs", raw: 176042 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "AFF8D4B5E9785551A0C4D47C3D17C3", - displayName: - "ALTER TABLE vet_specialties ADD CONSTRAINT fk_vet_specialties_vets FOREIGN KEY (vet_id) REFERENCES vets (id)", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$AFF8D4B5E9785551A0C4D47C3D17C3", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 4.84, unit: "ms", raw: 4837916 } - }, - { - percentile: 0.95, - currentDuration: { value: 4.84, unit: "ms", raw: 4837916 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "FEA0145AAD602B3E9A0BECE8337B420C", - spanId: "9BF21E63E15BCBA0", - startTime: "2023-08-03T14:17:27.624955Z", - duration: { value: 4.84, unit: "ms", raw: 4837916 } - }, - firstDataSeenTime: "2023-08-03T14:17:38.114511Z", - p50: { value: 4.84, unit: "ms", raw: 4837916 }, - p95: { value: 4.84, unit: "ms", raw: 4837916 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "B619F03CA9BAC9A52A1C65DCB3ABD0", - displayName: "INSERT INTO specialties VALUES (default, ?)", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$B619F03CA9BAC9A52A1C65DCB3ABD0", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 133.96, unit: "μs", raw: 133958 } - }, - { - percentile: 0.95, - currentDuration: { value: 237.29, unit: "μs", raw: 237291 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "23F298CD6B2D7AA59DB6A38EC0429DB8", - spanId: "B991F49604344C4E", - startTime: "2023-08-03T14:17:27.638757Z", - duration: { value: 121, unit: "μs", raw: 121000 } - }, - firstDataSeenTime: "2023-08-03T14:17:37.947691Z", - p50: { value: 133.96, unit: "μs", raw: 133958 }, - p95: { value: 237.29, unit: "μs", raw: 237291 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "BE994B2106E5E5F829CDFA69374C6D", - displayName: "DROP TABLE visits IF EXISTS", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$BE994B2106E5E5F829CDFA69374C6D", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 47.38, unit: "μs", raw: 47375 } - }, - { - percentile: 0.95, - currentDuration: { value: 47.38, unit: "μs", raw: 47375 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "44A3F5D45E84F23DF4C6ED2F008CFF5E", - spanId: "BD5A7FB77FC990C0", - startTime: "2023-08-03T14:17:27.619537Z", - duration: { value: 47.38, unit: "μs", raw: 47375 } - }, - firstDataSeenTime: "2023-08-03T14:17:37.916407Z", - p50: { value: 47.38, unit: "μs", raw: 47375 }, - p95: { value: 47.38, unit: "μs", raw: 47375 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "D1A12EF36AAB8E9700D9451D78C517", - displayName: "DROP TABLE owners IF EXISTS", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$D1A12EF36AAB8E9700D9451D78C517", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 58.54, unit: "μs", raw: 58541 } - }, - { - percentile: 0.95, - currentDuration: { value: 58.54, unit: "μs", raw: 58541 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "9D5D2BE9098EA27DF44BCF79F2E0BEE9", - spanId: "423CC0F62D75BF69", - startTime: "2023-08-03T14:17:27.619836Z", - duration: { value: 58.54, unit: "μs", raw: 58541 } - }, - firstDataSeenTime: "2023-08-03T14:17:38.080324Z", - p50: { value: 58.54, unit: "μs", raw: 58541 }, - p95: { value: 58.54, unit: "μs", raw: 58541 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "D35C1B1F41BE8E627E3E9887259324", - displayName: "DROP TABLE vets IF EXISTS", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$D35C1B1F41BE8E627E3E9887259324", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 60.79, unit: "μs", raw: 60791 } - }, - { - percentile: 0.95, - currentDuration: { value: 60.79, unit: "μs", raw: 60791 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "42FD3EC797C4783F205756A0E595337C", - spanId: "F6459AF51497F5B9", - startTime: "2023-08-03T14:17:27.619334Z", - duration: { value: 60.79, unit: "μs", raw: 60791 } - }, - firstDataSeenTime: "2023-08-03T14:17:38.135248Z", - p50: { value: 60.79, unit: "μs", raw: 60791 }, - p95: { value: 60.79, unit: "μs", raw: 60791 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "E3F7F8128144D40720E422FE3AB1AB", - displayName: - "ALTER TABLE pets ADD CONSTRAINT fk_pets_owners FOREIGN KEY (owner_id) REFERENCES owners (id)", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$E3F7F8128144D40720E422FE3AB1AB", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 714.67, unit: "μs", raw: 714667 } - }, - { - percentile: 0.95, - currentDuration: { value: 714.67, unit: "μs", raw: 714667 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "B3AA50AC8F88D1F45FE2E8BC0A2546BB", - spanId: "4924762CA30BA9BC", - startTime: "2023-08-03T14:17:27.632323Z", - duration: { value: 714.67, unit: "μs", raw: 714667 } - }, - firstDataSeenTime: "2023-08-03T14:17:38.017748Z", - p50: { value: 714.67, unit: "μs", raw: 714667 }, - p95: { value: 714.67, unit: "μs", raw: 714667 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "E7282CAD9F8070ED0A44B5DBEB75CC", - displayName: "DROP TABLE vet_specialties IF EXISTS", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$E7282CAD9F8070ED0A44B5DBEB75CC", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 956.96, unit: "μs", raw: 956958 } - }, - { - percentile: 0.95, - currentDuration: { value: 956.96, unit: "μs", raw: 956958 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "FFD7F21A177B9539711921A9012660CE", - spanId: "97AF3FEB176DFBE1", - startTime: "2023-08-03T14:17:27.618245Z", - duration: { value: 956.96, unit: "μs", raw: 956958 } - }, - firstDataSeenTime: "2023-08-03T14:17:37.936082Z", - p50: { value: 956.96, unit: "μs", raw: 956958 }, - p95: { value: 956.96, unit: "μs", raw: 956958 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "EB8BFCC7CCBFFEB53DE556C5BD7076", - displayName: - "CREATE TABLE vets ( id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, first_name VARCHAR(?), last_name VARCHAR(?) )", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$EB8BFCC7CCBFFEB53DE556C5BD7076", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 3.38, unit: "ms", raw: 3378791 } - }, - { - percentile: 0.95, - currentDuration: { value: 3.38, unit: "ms", raw: 3378791 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "2057C4C0A0B3BFC857C263A389005708", - spanId: "EF49E7CE30E4CC7F", - startTime: "2023-08-03T14:17:27.619978Z", - duration: { value: 3.38, unit: "ms", raw: 3378791 } - }, - firstDataSeenTime: "2023-08-03T14:17:38.046151Z", - p50: { value: 3.38, unit: "ms", raw: 3378791 }, - p95: { value: 3.38, unit: "ms", raw: 3378791 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "EBF619A98C2449717BC3386FB93A94", - displayName: "CREATE INDEX owners_last_name ON owners (last_name)", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$EBF619A98C2449717BC3386FB93A94", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 174.96, unit: "μs", raw: 174959 } - }, - { - percentile: 0.95, - currentDuration: { value: 174.96, unit: "μs", raw: 174959 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "7BF1C4AB05EF85A30C7D2EC4936D5274", - spanId: "301BE4772E61CA47", - startTime: "2023-08-03T14:17:27.631674Z", - duration: { value: 174.96, unit: "μs", raw: 174959 } - }, - firstDataSeenTime: "2023-08-03T14:17:37.930442Z", - p50: { value: 174.96, unit: "μs", raw: 174959 }, - p95: { value: 174.96, unit: "μs", raw: 174959 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "ECC3AE695CC19155977D358A24E31A", - displayName: "DROP TABLE specialties IF EXISTS", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$ECC3AE695CC19155977D358A24E31A", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 51.96, unit: "μs", raw: 51959 } - }, - { - percentile: 0.95, - currentDuration: { value: 51.96, unit: "μs", raw: 51959 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "E726A325ED3BA9B3C3CBB8FEA0EEC5B3", - spanId: "954FDE1FB211E4E4", - startTime: "2023-08-03T14:17:27.619443Z", - duration: { value: 51.96, unit: "μs", raw: 51959 } - }, - firstDataSeenTime: "2023-08-03T14:17:37.883655Z", - p50: { value: 51.96, unit: "μs", raw: 51959 }, - p95: { value: 51.96, unit: "μs", raw: 51959 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "EDA669B44BCCB522F76062FEED2462", - displayName: - "ALTER TABLE vet_specialties ADD CONSTRAINT fk_vet_specialties_specialties FOREIGN KEY (specialty_id) REFERENCES specialties (id)", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$EDA669B44BCCB522F76062FEED2462", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 675.38, unit: "μs", raw: 675375 } - }, - { - percentile: 0.95, - currentDuration: { value: 675.38, unit: "μs", raw: 675375 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "55B7808FEE2AFA0CBC6026026C12B524", - spanId: "13D4FFBECD9C106A", - startTime: "2023-08-03T14:17:27.629862Z", - duration: { value: 675.38, unit: "μs", raw: 675375 } - }, - firstDataSeenTime: "2023-08-03T14:17:37.827419Z", - p50: { value: 675.38, unit: "μs", raw: 675375 }, - p95: { value: 675.38, unit: "μs", raw: 675375 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "F81A2EC938494A2134C7C7C5FDF421", - displayName: "CREATE INDEX pets_name ON pets (name)", - instrumentationLibrary: "io.opentelemetry.jdbc", - spanCodeObjectId: - "span:io.opentelemetry.jdbc$_$F81A2EC938494A2134C7C7C5FDF421", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 156.67, unit: "μs", raw: 156666 } - }, - { - percentile: 0.95, - currentDuration: { value: 156.67, unit: "μs", raw: 156666 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "2753FA8A3E7E6C600AFEF874F6273234", - spanId: "4E5A5EB9A27B0CB0", - startTime: "2023-08-03T14:17:27.633683Z", - duration: { value: 156.67, unit: "μs", raw: 156666 } - }, - firstDataSeenTime: "2023-08-03T14:17:37.897115Z", - p50: { value: 156.67, unit: "μs", raw: 156666 }, - p95: { value: 156.67, unit: "μs", raw: 156666 } - }, - { - span: { - classification: "DatabaseClient", - role: "Internal", - name: "1D138649EB4FFA92C0E3C8103404F2", - displayName: "select * from users where id = :id", - instrumentationLibrary: "SampleInsightsController", - spanCodeObjectId: - "span:SampleInsightsController$_$1D138649EB4FFA92C0E3C8103404F2", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "DatabaseQueries", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 4.79, unit: "μs", raw: 4791.5 } - }, - { - percentile: 0.95, - currentDuration: { value: 8.38, unit: "μs", raw: 8375 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "B98E9DC02FD25EFD", - startTime: "2023-08-03T15:03:15.619948Z", - duration: { value: 208, unit: "ns", raw: 208 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.973516Z", - p50: { value: 4.79, unit: "μs", raw: 4791.5 }, - p95: { value: 8.38, unit: "μs", raw: 8375 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 1.52, unit: "ms", raw: 1524583.5 } - }, - { - percentile: 0.95, - currentDuration: { value: 1.66, unit: "ms", raw: 1655125 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "DE0FFBC0598B5328C676FF694F4D39D8", - spanId: "CCAB5DC8ADD7A48F", - startTime: "2023-08-03T15:02:51.469005Z", - duration: { value: 1.66, unit: "ms", raw: 1655125 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.954681Z", - p50: { value: 1.52, unit: "ms", raw: 1524583.5 }, - p95: { value: 1.66, unit: "ms", raw: 1655125 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /**", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /**", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 2.17, unit: "ms", raw: 2165833 } - }, - { - percentile: 0.95, - currentDuration: { value: 41.08, unit: "ms", raw: 41084250 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "D4E6C460133C68CE7B718A587A335F0B", - spanId: "7550F4686CCA9E5B", - startTime: "2023-08-03T15:02:51.464518Z", - duration: { value: 2.17, unit: "ms", raw: 2165833 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.962432Z", - p50: { value: 2.17, unit: "ms", raw: 2165833 }, - p95: { value: 41.08, unit: "ms", raw: 41084250 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /oups", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /oups", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 31.35, unit: "ms", raw: 31351833.5 } - }, - { - percentile: 0.95, - currentDuration: { value: 58.44, unit: "ms", raw: 58441750 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "100DE1ECF252299A366B1FDD1567974F", - spanId: "861C30FCB79D65DF", - startTime: "2023-08-03T15:02:51.408498Z", - duration: { value: 4.26, unit: "ms", raw: 4261917 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.931716Z", - p50: { value: 31.35, unit: "ms", raw: 31351833.5 }, - p95: { value: 58.44, unit: "ms", raw: 58441750 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /owners", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /owners", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 3.9, unit: "ms", raw: 3895625 } - }, - { - percentile: 0.95, - currentDuration: { - value: 26.15, - unit: "ms", - raw: 26153599.699999988 - } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "9D767B5368F97B6C6349C45D5EE82AE8", - spanId: "02C35DE40091E40E", - startTime: "2023-08-03T15:02:51.727341Z", - duration: { value: 3.14, unit: "ms", raw: 3136333 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.993182Z", - p50: { value: 3.9, unit: "ms", raw: 3895625 }, - p95: { value: 26.15, unit: "ms", raw: 26153599.699999988 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /owners/find", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /owners/find", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 2.48, unit: "ms", raw: 2483917 } - }, - { - percentile: 0.95, - currentDuration: { value: 14.3, unit: "ms", raw: 14296334 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "84571EC8F94A546279BAA4B4F9D455A2", - spanId: "C6D8C5AF551B1741", - startTime: "2023-08-03T15:02:51.499536Z", - duration: { value: 1.98, unit: "ms", raw: 1983959 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.954491Z", - p50: { value: 2.48, unit: "ms", raw: 2483917 }, - p95: { value: 14.3, unit: "ms", raw: 14296334 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /owners/new", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /owners/new", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 2.01, unit: "sec", raw: 2014992543 } - }, - { - percentile: 0.95, - currentDuration: { value: 2.05, unit: "sec", raw: 2046338917 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "954EB94F06A76B6A7376BAB6AEAD26E3", - spanId: "B5CBAC96801B85E3", - startTime: "2023-08-03T15:03:05.893497Z", - duration: { value: 2.01, unit: "sec", raw: 2005051293 } - }, - firstDataSeenTime: "2023-08-03T15:03:08.005988Z", - p50: { value: 2.01, unit: "sec", raw: 2014992543 }, - p95: { value: 2.05, unit: "sec", raw: 2046338917 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /owners/{ownerId}", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /owners/{ownerId}", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 5.04, unit: "ms", raw: 5039208.5 } - }, - { - percentile: 0.95, - currentDuration: { - value: 29.02, - unit: "ms", - raw: 29018749.49999996 - } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "B8D8219E439656DD91DCEA7785AB40C4", - spanId: "A055072AD9E71718", - startTime: "2023-08-03T15:02:51.650539Z", - duration: { value: 4.37, unit: "ms", raw: 4373375 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.982383Z", - p50: { value: 5.04, unit: "ms", raw: 5039208.5 }, - p95: { value: 29.02, unit: "ms", raw: 29018749.49999996 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /owners/{ownerId}/edit", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /owners/{ownerId}/edit", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 8.66, unit: "ms", raw: 8660417 } - }, - { - percentile: 0.95, - currentDuration: { value: 14.46, unit: "ms", raw: 14459209 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "A5B2C18C7F88BF17381ED1FD7B57A3C3", - spanId: "62EAA95B58D13F90", - startTime: "2023-08-03T15:03:10.015594Z", - duration: { value: 10, unit: "ms", raw: 10004291 } - }, - firstDataSeenTime: "2023-08-03T15:03:17.912744Z", - p50: { value: 8.66, unit: "ms", raw: 8660417 }, - p95: { value: 14.46, unit: "ms", raw: 14459209 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /owners/{ownerId}/pets/new", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /owners/{ownerId}/pets/new", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 8.9, unit: "ms", raw: 8899208 } - }, - { - percentile: 0.95, - currentDuration: { value: 33.25, unit: "ms", raw: 33253500 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "9316AB9977582858CF8486458925BB4A", - spanId: "DC164996503152F6", - startTime: "2023-08-03T15:03:10.025806Z", - duration: { value: 8.9, unit: "ms", raw: 8899208 } - }, - firstDataSeenTime: "2023-08-03T15:03:17.903451Z", - p50: { value: 8.9, unit: "ms", raw: 8899208 }, - p95: { value: 33.25, unit: "ms", raw: 33253500 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /SampleInsights/ErrorHotspot", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /SampleInsights/ErrorHotspot", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 5.72, unit: "ms", raw: 5716208 } - }, - { - percentile: 0.95, - currentDuration: { value: 5.72, unit: "ms", raw: 5716208 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "DF682BEA15DA0737", - startTime: "2023-08-03T15:03:15.601645Z", - duration: { value: 5.06, unit: "ms", raw: 5063084 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.933137Z", - p50: { value: 5.72, unit: "ms", raw: 5716208 }, - p95: { value: 5.72, unit: "ms", raw: 5716208 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /SampleInsights/ErrorRecordedOnCurrentSpan", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /SampleInsights/ErrorRecordedOnCurrentSpan", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 1.38, unit: "ms", raw: 1375125 } - }, - { - percentile: 0.95, - currentDuration: { value: 1.38, unit: "ms", raw: 1375125 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "D6CA7DCB818CE309", - startTime: "2023-08-03T15:03:18.335509Z", - duration: { value: 1.19, unit: "ms", raw: 1187209 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.993433Z", - p50: { value: 1.38, unit: "ms", raw: 1375125 }, - p95: { value: 1.38, unit: "ms", raw: 1375125 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /SampleInsights/ErrorRecordedOnDeeplyNestedSpan", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /SampleInsights/ErrorRecordedOnDeeplyNestedSpan", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 1.94, unit: "ms", raw: 1936875 } - }, - { - percentile: 0.95, - currentDuration: { value: 1.94, unit: "ms", raw: 1936875 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "AFF6725266841889", - startTime: "2023-08-03T15:03:18.310698Z", - duration: { value: 1.1, unit: "ms", raw: 1095209 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.994975Z", - p50: { value: 1.94, unit: "ms", raw: 1936875 }, - p95: { value: 1.94, unit: "ms", raw: 1936875 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /SampleInsights/ErrorRecordedOnLocalRootSpan", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /SampleInsights/ErrorRecordedOnLocalRootSpan", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 19.89, unit: "ms", raw: 19887125 } - }, - { - percentile: 0.95, - currentDuration: { value: 19.89, unit: "ms", raw: 19887125 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "9BAD5FC34D41D178", - startTime: "2023-08-03T15:03:18.332075Z", - duration: { value: 1.61, unit: "ms", raw: 1611041 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.984199Z", - p50: { value: 19.89, unit: "ms", raw: 19887125 }, - p95: { value: 19.89, unit: "ms", raw: 19887125 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /SampleInsights/HighUsage", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /SampleInsights/HighUsage", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 8.25, unit: "ms", raw: 8245042 } - }, - { - percentile: 0.95, - currentDuration: { value: 8.25, unit: "ms", raw: 8245042 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "A6CBD202A10DB50F", - startTime: "2023-08-03T15:03:18.298969Z", - duration: { value: 6.57, unit: "ms", raw: 6571416 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.976204Z", - p50: { value: 8.25, unit: "ms", raw: 8245042 }, - p95: { value: 8.25, unit: "ms", raw: 8245042 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /SampleInsights/NPlusOneWithInternalSpan", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /SampleInsights/NPlusOneWithInternalSpan", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 7.07, unit: "ms", raw: 7067166 } - }, - { - percentile: 0.95, - currentDuration: { value: 7.07, unit: "ms", raw: 7067166 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "40A3E82F211885ED", - startTime: "2023-08-03T15:03:15.616734Z", - duration: { value: 1.89, unit: "ms", raw: 1886417 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.943745Z", - p50: { value: 7.07, unit: "ms", raw: 7067166 }, - p95: { value: 7.07, unit: "ms", raw: 7067166 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /SampleInsights/NPlusOneWithoutInternalSpan", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /SampleInsights/NPlusOneWithoutInternalSpan", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 2.21, unit: "ms", raw: 2214875 } - }, - { - percentile: 0.95, - currentDuration: { value: 2.21, unit: "ms", raw: 2214875 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "E829D61C69EE9128", - startTime: "2023-08-03T15:03:15.618729Z", - duration: { value: 1.91, unit: "ms", raw: 1911167 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.960793Z", - p50: { value: 2.21, unit: "ms", raw: 2214875 }, - p95: { value: 2.21, unit: "ms", raw: 2214875 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /SampleInsights/req-map-get", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /SampleInsights/req-map-get", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 1.62, unit: "ms", raw: 1618042 } - }, - { - percentile: 0.95, - currentDuration: { value: 1.62, unit: "ms", raw: 1618042 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "1F45660470992C92", - startTime: "2023-08-03T15:03:18.307371Z", - duration: { value: 1.03, unit: "ms", raw: 1032792 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.978286Z", - p50: { value: 1.62, unit: "ms", raw: 1618042 }, - p95: { value: 1.62, unit: "ms", raw: 1618042 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /SampleInsights/SlowEndpoint", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /SampleInsights/SlowEndpoint", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 2.53, unit: "sec", raw: 2525240210 } - }, - { - percentile: 0.95, - currentDuration: { value: 2.53, unit: "sec", raw: 2525240210 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "C203D01BBBA731EC", - startTime: "2023-08-03T15:03:12.571576Z", - duration: { value: 2.51, unit: "sec", raw: 2510482792 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.962496Z", - p50: { value: 2.53, unit: "sec", raw: 2525240210 }, - p95: { value: 2.53, unit: "sec", raw: 2525240210 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /SampleInsights/SpanBottleneck", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /SampleInsights/SpanBottleneck", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 253.94, unit: "ms", raw: 253942833 } - }, - { - percentile: 0.95, - currentDuration: { value: 253.94, unit: "ms", raw: 253942833 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "46F7234DE821AA54", - startTime: "2023-08-03T15:03:15.336689Z", - duration: { value: 258.4, unit: "ms", raw: 258403834 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.927494Z", - p50: { value: 253.94, unit: "ms", raw: 253942833 }, - p95: { value: 253.94, unit: "ms", raw: 253942833 } - }, - { - span: { - classification: "EndpointClient", - role: "Unknown", - name: "GET PetClinic /vets.html", - displayName: "HTTP GET ", - instrumentationLibrary: "io.opentelemetry.okhttp-3.0", - spanCodeObjectId: - "span:io.opentelemetry.okhttp-3.0$_$GET PetClinic /vets.html", - methodCodeObjectId: "", - kind: "Client", - codeObjectId: "" - }, - assetType: "EndpointClient", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 3.35, unit: "ms", raw: 3347209 } - }, - { - percentile: 0.95, - currentDuration: { value: 351.89, unit: "ms", raw: 351893958 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "E4A02B938FEB0DB76132BDF0F452F48A", - spanId: "FBA51806DBE86D2E", - startTime: "2023-08-03T15:02:51.346784Z", - duration: { value: 2.28, unit: "ms", raw: 2275042 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.930586Z", - p50: { value: 3.35, unit: "ms", raw: 3347209 }, - p95: { value: 351.89, unit: "ms", raw: 351893958 } - }, - { - span: { - classification: "Unknown", - role: "Entry", - name: "ClientTester.generateInsightData", - displayName: "ClientTester.generateInsightData", - instrumentationLibrary: - "io.opentelemetry.opentelemetry-instrumentation-annotations-1.16", - spanCodeObjectId: - "span:io.opentelemetry.opentelemetry-instrumentation-annotations-1.16$_$ClientTester.generateInsightData", - methodCodeObjectId: - "petclinic.client.ClientTester$_$generateInsightData", - kind: "Internal", - codeObjectId: "petclinic.client.ClientTester$_$generateInsightData" - }, - assetType: "CodeLocation", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 8.29, unit: "sec", raw: 8293080046 } - }, - { - percentile: 0.95, - currentDuration: { value: 8.29, unit: "sec", raw: 8293080046 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SlowEndpoint", - importance: 2, - shortDisplayInfo: { - title: "", - targetDisplayName: "ClientTester.generateInsightData", - subtitle: "", - description: "Median duration 79.58 ms" - } - }, - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "EndpointChattyApi", - importance: 3, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "6B726C8E50E57CB7", - startTime: "2023-08-03T15:03:10.044191Z", - duration: { value: 8.29, unit: "sec", raw: 8293080046 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.958693Z", - p50: { value: 8.29, unit: "sec", raw: 8293080046 }, - p95: { value: 8.29, unit: "sec", raw: 8293080046 } - }, - { - span: { - classification: "Unknown", - role: "Internal", - name: "OwnerController.findPaginatedForOwnersLastName", - displayName: "OwnerController.findPaginatedForOwnersLastName", - instrumentationLibrary: - "io.opentelemetry.opentelemetry-instrumentation-annotations-1.16", - spanCodeObjectId: - "span:io.opentelemetry.opentelemetry-instrumentation-annotations-1.16$_$OwnerController.findPaginatedForOwnersLastName", - methodCodeObjectId: - "org.springframework.samples.petclinic.owner.OwnerController$_$findPaginatedForOwnersLastName", - kind: "Internal", - codeObjectId: - "org.springframework.samples.petclinic.owner.OwnerController$_$findPaginatedForOwnersLastName" - }, - assetType: "CodeLocation", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 1.21, unit: "ms", raw: 1213000 } - }, - { - percentile: 0.95, - currentDuration: { - value: 6.91, - unit: "ms", - raw: 6912791.8999999985 - } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "9D767B5368F97B6C6349C45D5EE82AE8", - spanId: "2411B993DB22E87E", - startTime: "2023-08-03T15:02:51.72839Z", - duration: { value: 899.92, unit: "μs", raw: 899917 } - }, - firstDataSeenTime: "2023-08-03T15:03:08.000282Z", - p50: { value: 1.21, unit: "ms", raw: 1213000 }, - p95: { value: 6.91, unit: "ms", raw: 6912791.8999999985 } - }, - { - span: { - classification: "Unknown", - role: "Internal", - name: "OwnerValidation.CommunicateWithServer", - displayName: "OwnerValidation.CommunicateWithServer", - instrumentationLibrary: - "io.opentelemetry.opentelemetry-instrumentation-annotations-1.16", - spanCodeObjectId: - "span:io.opentelemetry.opentelemetry-instrumentation-annotations-1.16$_$OwnerValidation.CommunicateWithServer", - methodCodeObjectId: - "org.springframework.samples.petclinic.domain.OwnerValidation$_$CommunicateWithServer", - kind: "Internal", - codeObjectId: - "org.springframework.samples.petclinic.domain.OwnerValidation$_$CommunicateWithServer" - }, - assetType: "CodeLocation", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 2, unit: "sec", raw: 2000510376 } - }, - { - percentile: 0.95, - currentDuration: { value: 2, unit: "sec", raw: 2003027126 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanEndpointBottleneck", - importance: 2, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "954EB94F06A76B6A7376BAB6AEAD26E3", - spanId: "78AEEF1091C25D85", - startTime: "2023-08-03T15:03:05.894775Z", - duration: { value: 2, unit: "sec", raw: 2000223834 } - }, - firstDataSeenTime: "2023-08-03T15:03:08.012358Z", - p50: { value: 2, unit: "sec", raw: 2000510376 }, - p95: { value: 2, unit: "sec", raw: 2003027126 } - }, - { - span: { - classification: "Unknown", - role: "Internal", - name: "OwnerValidation.ValidateOwnerWithExternalService", - displayName: "OwnerValidation.ValidateOwnerWithExternalService", - instrumentationLibrary: - "io.opentelemetry.opentelemetry-instrumentation-annotations-1.16", - spanCodeObjectId: - "span:io.opentelemetry.opentelemetry-instrumentation-annotations-1.16$_$OwnerValidation.ValidateOwnerWithExternalService", - methodCodeObjectId: - "org.springframework.samples.petclinic.domain.OwnerValidation$_$ValidateOwnerWithExternalService", - kind: "Internal", - codeObjectId: - "org.springframework.samples.petclinic.domain.OwnerValidation$_$ValidateOwnerWithExternalService" - }, - assetType: "CodeLocation", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 2, unit: "sec", raw: 2000643792 } - }, - { - percentile: 0.95, - currentDuration: { value: 2, unit: "sec", raw: 2003089251 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "954EB94F06A76B6A7376BAB6AEAD26E3", - spanId: "4A0C038AFB37745B", - startTime: "2023-08-03T15:03:05.894769Z", - duration: { value: 2, unit: "sec", raw: 2000238043 } - }, - firstDataSeenTime: "2023-08-03T15:03:08.010792Z", - p50: { value: 2, unit: "sec", raw: 2000643792 }, - p95: { value: 2, unit: "sec", raw: 2003089251 } - }, - { - span: { - classification: "Unknown", - role: "Internal", - name: "SampleInsightsController.method1", - displayName: "SampleInsightsController.method1", - instrumentationLibrary: - "io.opentelemetry.opentelemetry-instrumentation-annotations-1.16", - spanCodeObjectId: - "span:io.opentelemetry.opentelemetry-instrumentation-annotations-1.16$_$SampleInsightsController.method1", - methodCodeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$method1", - kind: "Internal", - codeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$method1" - }, - assetType: "CodeLocation", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 89.17, unit: "μs", raw: 89166 } - }, - { - percentile: 0.95, - currentDuration: { value: 89.17, unit: "μs", raw: 89166 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - }, - { - type: "Errors", - importance: 5, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "HotSpot", - importance: 2, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "D01CA5A988472E9A", - startTime: "2023-08-03T15:03:15.604147Z", - duration: { value: 49.67, unit: "μs", raw: 49667 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.971036Z", - p50: { value: 89.17, unit: "μs", raw: 89166 }, - p95: { value: 89.17, unit: "μs", raw: 89166 } - }, - { - span: { - classification: "Unknown", - role: "Internal", - name: "SampleInsightsController.method2", - displayName: "SampleInsightsController.method2", - instrumentationLibrary: - "io.opentelemetry.opentelemetry-instrumentation-annotations-1.16", - spanCodeObjectId: - "span:io.opentelemetry.opentelemetry-instrumentation-annotations-1.16$_$SampleInsightsController.method2", - methodCodeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$method2", - kind: "Internal", - codeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$method2" - }, - assetType: "CodeLocation", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 78.79, unit: "μs", raw: 78792 } - }, - { - percentile: 0.95, - currentDuration: { value: 78.79, unit: "μs", raw: 78792 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - }, - { - type: "Errors", - importance: 5, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "HotSpot", - importance: 2, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "6DBB5D062717E557", - startTime: "2023-08-03T15:03:15.604152Z", - duration: { value: 41.92, unit: "μs", raw: 41917 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.934715Z", - p50: { value: 78.79, unit: "μs", raw: 78792 }, - p95: { value: 78.79, unit: "μs", raw: 78792 } - }, - { - span: { - classification: "Unknown", - role: "Internal", - name: "SampleInsightsController.method3", - displayName: "SampleInsightsController.method3", - instrumentationLibrary: - "io.opentelemetry.opentelemetry-instrumentation-annotations-1.16", - spanCodeObjectId: - "span:io.opentelemetry.opentelemetry-instrumentation-annotations-1.16$_$SampleInsightsController.method3", - methodCodeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$method3", - kind: "Internal", - codeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$method3" - }, - assetType: "CodeLocation", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 68.25, unit: "μs", raw: 68250 } - }, - { - percentile: 0.95, - currentDuration: { value: 68.25, unit: "μs", raw: 68250 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - }, - { - type: "HotSpot", - importance: 2, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "Errors", - importance: 5, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "C8085B9727E6ED0B", - startTime: "2023-08-03T15:03:15.604156Z", - duration: { value: 32.79, unit: "μs", raw: 32792 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.954738Z", - p50: { value: 68.25, unit: "μs", raw: 68250 }, - p95: { value: 68.25, unit: "μs", raw: 68250 } - }, - { - span: { - classification: "Unknown", - role: "Internal", - name: "SpanBottleneck 1", - displayName: "SpanBottleneck 1", - instrumentationLibrary: - "io.opentelemetry.opentelemetry-instrumentation-annotations-1.16", - spanCodeObjectId: - "span:io.opentelemetry.opentelemetry-instrumentation-annotations-1.16$_$SpanBottleneck 1", - methodCodeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$doWorkForBottleneck1", - kind: "Internal", - codeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$doWorkForBottleneck1" - }, - assetType: "CodeLocation", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 200.16, unit: "ms", raw: 200158125 } - }, - { - percentile: 0.95, - currentDuration: { value: 200.16, unit: "ms", raw: 200158125 } - } - ], - impactScores: { ScoreExp25: 2, ScoreExp1000: 2 }, - insights: [ - { - type: "SpanEndpointBottleneck", - importance: 2, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "ABACB87C41FB8895", - startTime: "2023-08-03T15:03:15.33804Z", - duration: { value: 202.47, unit: "ms", raw: 202474792 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.949695Z", - p50: { value: 200.16, unit: "ms", raw: 200158125 }, - p95: { value: 200.16, unit: "ms", raw: 200158125 } - }, - { - span: { - classification: "Unknown", - role: "Internal", - name: "SpanBottleneck 2", - displayName: "SpanBottleneck 2", - instrumentationLibrary: - "io.opentelemetry.opentelemetry-instrumentation-annotations-1.16", - spanCodeObjectId: - "span:io.opentelemetry.opentelemetry-instrumentation-annotations-1.16$_$SpanBottleneck 2", - methodCodeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$doWorkForBottleneck2", - kind: "Internal", - codeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$doWorkForBottleneck2" - }, - assetType: "CodeLocation", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 50.5, unit: "ms", raw: 50496126 } - }, - { - percentile: 0.95, - currentDuration: { value: 50.5, unit: "ms", raw: 50496126 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "CE0512097F998CB1", - startTime: "2023-08-03T15:03:15.540576Z", - duration: { value: 52.62, unit: "ms", raw: 52621125 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.946311Z", - p50: { value: 50.5, unit: "ms", raw: 50496126 }, - p95: { value: 50.5, unit: "ms", raw: 50496126 } - }, - { - span: { - classification: "Unknown", - role: "Internal", - name: "ResponseFacade.sendError", - displayName: "ResponseFacade.sendError", - instrumentationLibrary: "io.opentelemetry.servlet-5.0", - spanCodeObjectId: - "span:io.opentelemetry.servlet-5.0$_$ResponseFacade.sendError", - methodCodeObjectId: - "org.apache.catalina.connector.ResponseFacade$_$sendError", - kind: "Internal", - codeObjectId: - "org.apache.catalina.connector.ResponseFacade$_$sendError" - }, - assetType: "CodeLocation", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 7.38, unit: "μs", raw: 7375 } - }, - { - percentile: 0.95, - currentDuration: { value: 270.96, unit: "μs", raw: 270958 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "D4E6C460133C68CE7B718A587A335F0B", - spanId: "EBFEE4AB0B0B66D4", - startTime: "2023-08-03T15:02:51.465689Z", - duration: { value: 8.21, unit: "μs", raw: 8208 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.957808Z", - p50: { value: 7.38, unit: "μs", raw: 7375 }, - p95: { value: 270.96, unit: "μs", raw: 270958 } - }, - { - span: { - classification: "Unknown", - role: "Internal", - name: "OwnerRepository.findById", - displayName: "OwnerRepository.findById", - instrumentationLibrary: "io.opentelemetry.spring-data-1.8", - spanCodeObjectId: - "span:io.opentelemetry.spring-data-1.8$_$OwnerRepository.findById", - methodCodeObjectId: - "org.springframework.samples.petclinic.owner.OwnerRepository$_$findById", - kind: "Internal", - codeObjectId: - "org.springframework.samples.petclinic.owner.OwnerRepository$_$findById" - }, - assetType: "CodeLocation", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 1.26, unit: "ms", raw: 1258979 } - }, - { - percentile: 0.95, - currentDuration: { - value: 5.13, - unit: "ms", - raw: 5131124.999999998 - } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "9316AB9977582858CF8486458925BB4A", - spanId: "00A06168C8E3F3AC", - startTime: "2023-08-03T15:03:10.028539Z", - duration: { value: 1.21, unit: "ms", raw: 1211292 } - }, - firstDataSeenTime: "2023-08-03T15:03:17.913415Z", - p50: { value: 1.26, unit: "ms", raw: 1258979 }, - p95: { value: 5.13, unit: "ms", raw: 5131124.999999998 } - }, - { - span: { - classification: "Unknown", - role: "Internal", - name: "OwnerRepository.findByLastName", - displayName: "OwnerRepository.findByLastName", - instrumentationLibrary: "io.opentelemetry.spring-data-1.8", - spanCodeObjectId: - "span:io.opentelemetry.spring-data-1.8$_$OwnerRepository.findByLastName", - methodCodeObjectId: - "org.springframework.samples.petclinic.owner.OwnerRepository$_$findByLastName", - kind: "Internal", - codeObjectId: - "org.springframework.samples.petclinic.owner.OwnerRepository$_$findByLastName" - }, - assetType: "CodeLocation", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 1.19, unit: "ms", raw: 1193729.5 } - }, - { - percentile: 0.95, - currentDuration: { - value: 6.58, - unit: "ms", - raw: 6582599.999999998 - } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "9D767B5368F97B6C6349C45D5EE82AE8", - spanId: "5C19D3077D769F94", - startTime: "2023-08-03T15:02:51.728404Z", - duration: { value: 881.58, unit: "μs", raw: 881584 } - }, - firstDataSeenTime: "2023-08-03T15:03:08.00023Z", - p50: { value: 1.19, unit: "ms", raw: 1193729.5 }, - p95: { value: 6.58, unit: "ms", raw: 6582599.999999998 } - }, - { - span: { - classification: "Unknown", - role: "Internal", - name: "OwnerRepository.findPetTypes", - displayName: "OwnerRepository.findPetTypes", - instrumentationLibrary: "io.opentelemetry.spring-data-1.8", - spanCodeObjectId: - "span:io.opentelemetry.spring-data-1.8$_$OwnerRepository.findPetTypes", - methodCodeObjectId: - "org.springframework.samples.petclinic.owner.OwnerRepository$_$findPetTypes", - kind: "Internal", - codeObjectId: - "org.springframework.samples.petclinic.owner.OwnerRepository$_$findPetTypes" - }, - assetType: "CodeLocation", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 901.98, unit: "μs", raw: 901979.5 } - }, - { - percentile: 0.95, - currentDuration: { - value: 5.93, - unit: "ms", - raw: 5928957.999999998 - } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "9316AB9977582858CF8486458925BB4A", - spanId: "4695A05B24CFD498", - startTime: "2023-08-03T15:03:10.033754Z", - duration: { value: 268.38, unit: "μs", raw: 268375 } - }, - firstDataSeenTime: "2023-08-03T15:03:17.923456Z", - p50: { value: 901.98, unit: "μs", raw: 901979.5 }, - p95: { value: 5.93, unit: "ms", raw: 5928957.999999998 } - }, - { - span: { - classification: "Unknown", - role: "Internal", - name: "VetRepository.findAll", - displayName: "VetRepository.findAll", - instrumentationLibrary: "io.opentelemetry.spring-data-1.8", - spanCodeObjectId: - "span:io.opentelemetry.spring-data-1.8$_$VetRepository.findAll", - methodCodeObjectId: - "org.springframework.samples.petclinic.vet.VetRepository$_$findAll", - kind: "Internal", - codeObjectId: - "org.springframework.samples.petclinic.vet.VetRepository$_$findAll" - }, - assetType: "CodeLocation", - serviceName: "PetClinic", - endpointCodeObjectId: null, - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 210.8, unit: "ms", raw: 210803916 } - }, - { - percentile: 0.95, - currentDuration: { value: 210.8, unit: "ms", raw: 210803916 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "4D38B1BF14B7D13C45CF7C58B76E2E17", - spanId: "A34C19D4AAE79903", - startTime: "2023-08-03T15:02:51.092723Z", - duration: { value: 210.8, unit: "ms", raw: 210803916 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.945702Z", - p50: { value: 210.8, unit: "ms", raw: 210803916 }, - p95: { value: 210.8, unit: "ms", raw: 210803916 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /**", - displayName: "HTTP GET /**", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /**", - methodCodeObjectId: "", - kind: "Server", - codeObjectId: "" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: "endpoint:epHTTP:HTTP GET /**", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 1.43, unit: "ms", raw: 1432875 } - }, - { - percentile: 0.95, - currentDuration: { value: 39.62, unit: "ms", raw: 39619666 } - } - ], - impactScores: { ScoreExp25: 0, ScoreExp1000: 0 }, - insights: [ - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "D4E6C460133C68CE7B718A587A335F0B", - spanId: "EBE0CDEFBBFE74EA", - startTime: "2023-08-03T15:02:51.465052Z", - duration: { value: 1.43, unit: "ms", raw: 1432875 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.957981Z", - p50: { value: 1.43, unit: "ms", raw: 1432875 }, - p95: { value: 39.62, unit: "ms", raw: 39619666 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /vets.html", - displayName: "HTTP GET /vets.html", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /vets.html", - methodCodeObjectId: - "org.springframework.samples.petclinic.vet.VetController$_$showVetList", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.vet.VetController$_$showVetList" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: "endpoint:epHTTP:HTTP GET /vets.html", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 2.42, unit: "ms", raw: 2418666 } - }, - { - percentile: 0.95, - currentDuration: { value: 307.67, unit: "ms", raw: 307672208 } - } - ], - impactScores: { ScoreExp25: 0.05, ScoreExp1000: 0.05 }, - insights: [ - { - type: "SlowestSpans", - importance: 2, - shortDisplayInfo: { - title: "", - targetDisplayName: "HTTP GET /vets.html", - subtitle: "1 spans", - description: - "SELECT org.springframework.samples.petclinic.vet.Vet 168.91 ms" - } - }, - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "E4A02B938FEB0DB76132BDF0F452F48A", - spanId: "46F4A1D81817E01E", - startTime: "2023-08-03T15:02:51.347316Z", - duration: { value: 1.52, unit: "ms", raw: 1519042 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.919354Z", - p50: { value: 2.42, unit: "ms", raw: 2418666 }, - p95: { value: 307.67, unit: "ms", raw: 307672208 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /oups", - displayName: "HTTP GET /oups", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /oups", - methodCodeObjectId: - "org.springframework.samples.petclinic.system.CrashController$_$triggerException", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.system.CrashController$_$triggerException" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: "endpoint:epHTTP:HTTP GET /oups", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 29.97, unit: "ms", raw: 29967187.5 } - }, - { - percentile: 0.95, - currentDuration: { value: 57.4, unit: "ms", raw: 57404750 } - } - ], - impactScores: { ScoreExp25: 0.1, ScoreExp1000: 0.1 }, - insights: [ - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - }, - { - type: "Errors", - importance: 5, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "HotSpot", - importance: 2, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - } - ], - lastSpanInstanceInfo: { - traceId: "100DE1ECF252299A366B1FDD1567974F", - spanId: "08A41626CCD6ECAC", - startTime: "2023-08-03T15:02:51.409988Z", - duration: { value: 2.53, unit: "ms", raw: 2529625 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.930173Z", - p50: { value: 29.97, unit: "ms", raw: 29967187.5 }, - p95: { value: 57.4, unit: "ms", raw: 57404750 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /owners", - displayName: "HTTP GET /owners", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /owners", - methodCodeObjectId: - "org.springframework.samples.petclinic.owner.OwnerController$_$processFindForm", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.owner.OwnerController$_$processFindForm" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: "endpoint:epHTTP:HTTP GET /owners", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 3.16, unit: "ms", raw: 3160625.5 } - }, - { - percentile: 0.95, - currentDuration: { - value: 24.62, - unit: "ms", - raw: 24616016.29999999 - } - } - ], - impactScores: { ScoreExp25: 0.15, ScoreExp1000: 0.15 }, - insights: [ - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "9D767B5368F97B6C6349C45D5EE82AE8", - spanId: "6D309B819FAFA6A3", - startTime: "2023-08-03T15:02:51.727867Z", - duration: { value: 2.32, unit: "ms", raw: 2316417 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.991742Z", - p50: { value: 3.16, unit: "ms", raw: 3160625.5 }, - p95: { value: 24.62, unit: "ms", raw: 24616016.29999999 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /SampleInsights/SlowEndpoint", - displayName: "HTTP GET /SampleInsights/SlowEndpoint", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/SlowEndpoint", - methodCodeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genSlowEndpoint", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genSlowEndpoint" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: - "endpoint:epHTTP:HTTP GET /SampleInsights/SlowEndpoint", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 2.52, unit: "sec", raw: 2515083293 } - }, - { - percentile: 0.95, - currentDuration: { value: 2.52, unit: "sec", raw: 2515083293 } - } - ], - impactScores: { ScoreExp25: 0.2, ScoreExp1000: 0.2 }, - insights: [ - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SlowEndpoint", - importance: 2, - shortDisplayInfo: { - title: "", - targetDisplayName: "HTTP GET /SampleInsights/SlowEndpoint", - subtitle: "", - description: "Median duration 25.36 ms" - } - }, - { - type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "A65337F6C32E922E", - startTime: "2023-08-03T15:03:12.576873Z", - duration: { value: 2.5, unit: "sec", raw: 2504879751 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.921587Z", - p50: { value: 2.52, unit: "sec", raw: 2515083293 }, - p95: { value: 2.52, unit: "sec", raw: 2515083293 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /owners/find", - displayName: "HTTP GET /owners/find", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /owners/find", - methodCodeObjectId: - "org.springframework.samples.petclinic.owner.OwnerController$_$initFindForm", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.owner.OwnerController$_$initFindForm" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: "endpoint:epHTTP:HTTP GET /owners/find", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 1.47, unit: "ms", raw: 1470250 } - }, - { - percentile: 0.95, - currentDuration: { value: 13.62, unit: "ms", raw: 13622875 } - } - ], - impactScores: { ScoreExp25: 0.25, ScoreExp1000: 0.25 }, - insights: [ - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - }, - { - type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - } - ], - lastSpanInstanceInfo: { - traceId: "84571EC8F94A546279BAA4B4F9D455A2", - spanId: "B8715B2ADF98BA66", - startTime: "2023-08-03T15:02:51.500086Z", - duration: { value: 1.38, unit: "ms", raw: 1376334 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.972101Z", - p50: { value: 1.47, unit: "ms", raw: 1470250 }, - p95: { value: 13.62, unit: "ms", raw: 13622875 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /owners/new", - displayName: "HTTP GET /owners/new", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /owners/new", - methodCodeObjectId: - "org.springframework.samples.petclinic.owner.OwnerController$_$initCreationForm", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.owner.OwnerController$_$initCreationForm" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: "endpoint:epHTTP:HTTP GET /owners/new", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 2.01, unit: "sec", raw: 2013787084 } - }, - { - percentile: 0.95, - currentDuration: { value: 2.05, unit: "sec", raw: 2045196501 } - } - ], - impactScores: { ScoreExp25: 0.3, ScoreExp1000: 0.3 }, - insights: [ - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SlowEndpoint", - importance: 2, - shortDisplayInfo: { - title: "", - targetDisplayName: "HTTP GET /owners/new", - subtitle: "", - description: "Median duration 20.96 ms" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - }, - { - type: "SlowestSpans", - importance: 2, - shortDisplayInfo: { - title: "", - targetDisplayName: "HTTP GET /owners/new", - subtitle: "1 spans", - description: "OwnerValidation.CommunicateWithServer 2 sec" - } - } - ], - lastSpanInstanceInfo: { - traceId: "954EB94F06A76B6A7376BAB6AEAD26E3", - spanId: "2805D91026FBE6DF", - startTime: "2023-08-03T15:03:05.894079Z", - duration: { value: 2, unit: "sec", raw: 2004276293 } - }, - firstDataSeenTime: "2023-08-03T15:03:08.007833Z", - p50: { value: 2.01, unit: "sec", raw: 2013787084 }, - p95: { value: 2.05, unit: "sec", raw: 2045196501 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /owners/{ownerId}/edit", - displayName: "HTTP GET /owners/{ownerId}/edit", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /owners/{ownerId}/edit", - methodCodeObjectId: - "org.springframework.samples.petclinic.owner.OwnerController$_$initUpdateOwnerForm", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.owner.OwnerController$_$initUpdateOwnerForm" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: - "endpoint:epHTTP:HTTP GET /owners/{ownerId}/edit", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 6.95, unit: "ms", raw: 6954291 } - }, - { - percentile: 0.95, - currentDuration: { value: 12.9, unit: "ms", raw: 12902542 } - } - ], - impactScores: { ScoreExp25: 0.35, ScoreExp1000: 0.35 }, - insights: [ - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "A5B2C18C7F88BF17381ED1FD7B57A3C3", - spanId: "BF99BA57B3FD51DF", - startTime: "2023-08-03T15:03:10.016219Z", - duration: { value: 8.77, unit: "ms", raw: 8771500 } - }, - firstDataSeenTime: "2023-08-03T15:03:17.90665Z", - p50: { value: 6.95, unit: "ms", raw: 6954291 }, - p95: { value: 12.9, unit: "ms", raw: 12902542 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /owners/{ownerId}/pets/new", - displayName: "HTTP GET /owners/{ownerId}/pets/new", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /owners/{ownerId}/pets/new", - methodCodeObjectId: - "org.springframework.samples.petclinic.owner.PetController$_$initCreationForm", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.owner.PetController$_$initCreationForm" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: - "endpoint:epHTTP:HTTP GET /owners/{ownerId}/pets/new", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 8.73, unit: "ms", raw: 8731042 } - }, - { - percentile: 0.95, - currentDuration: { value: 31.39, unit: "ms", raw: 31385666 } - } - ], - impactScores: { ScoreExp25: 0.4, ScoreExp1000: 0.4 }, - insights: [ - { - type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "9316AB9977582858CF8486458925BB4A", - spanId: "0A0D7751A50FEEB0", - startTime: "2023-08-03T15:03:10.026656Z", - duration: { value: 8.73, unit: "ms", raw: 8731042 } - }, - firstDataSeenTime: "2023-08-03T15:03:17.903065Z", - p50: { value: 8.73, unit: "ms", raw: 8731042 }, - p95: { value: 31.39, unit: "ms", raw: 31385666 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /", - displayName: "HTTP GET /", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /", - methodCodeObjectId: - "org.springframework.samples.petclinic.system.WelcomeController$_$welcome", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.system.WelcomeController$_$welcome" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: "endpoint:epHTTP:HTTP GET /", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 3.17, unit: "ms", raw: 3171187 } - }, - { - percentile: 0.95, - currentDuration: { value: 14.58, unit: "ms", raw: 14582833 } - } - ], - impactScores: { ScoreExp25: 0.45, ScoreExp1000: 0.45 }, - insights: [ - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - }, - { - type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - } - ], - lastSpanInstanceInfo: { - traceId: "5E374DCAC4131F844AF870B6EF58F11D", - spanId: "14DDF35C702BC220", - startTime: "2023-08-03T15:05:55.952739Z", - duration: { value: 2.12, unit: "ms", raw: 2117959 } - }, - firstDataSeenTime: "2023-08-03T14:18:06.945586Z", - p50: { value: 3.17, unit: "ms", raw: 3171187 }, - p95: { value: 14.58, unit: "ms", raw: 14582833 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /SampleInsights/SpanBottleneck", - displayName: "HTTP GET /SampleInsights/SpanBottleneck", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/SpanBottleneck", - methodCodeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genSpanBottleneck", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genSpanBottleneck" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: - "endpoint:epHTTP:HTTP GET /SampleInsights/SpanBottleneck", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 252.82, unit: "ms", raw: 252820334 } - }, - { - percentile: 0.95, - currentDuration: { value: 252.82, unit: "ms", raw: 252820334 } - } - ], - impactScores: { ScoreExp25: 0.5, ScoreExp1000: 0.5 }, - insights: [ - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SlowestSpans", - importance: 2, - shortDisplayInfo: { - title: "", - targetDisplayName: "HTTP GET /SampleInsights/SpanBottleneck", - subtitle: "1 spans", - description: "SpanBottleneck 1 402.63 ms" - } - }, - { - type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "92E2E59D60212533", - startTime: "2023-08-03T15:03:15.337437Z", - duration: { value: 257.51, unit: "ms", raw: 257506958 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.930177Z", - p50: { value: 252.82, unit: "ms", raw: 252820334 }, - p95: { value: 252.82, unit: "ms", raw: 252820334 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /owners/{ownerId}", - displayName: "HTTP GET /owners/{ownerId}", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /owners/{ownerId}", - methodCodeObjectId: - "org.springframework.samples.petclinic.owner.OwnerController$_$showOwner", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.owner.OwnerController$_$showOwner" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: "endpoint:epHTTP:HTTP GET /owners/{ownerId}", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 3.46, unit: "ms", raw: 3455333.5 } - }, - { - percentile: 0.95, - currentDuration: { - value: 28.38, - unit: "ms", - raw: 28375499.99999996 - } - } - ], - impactScores: { ScoreExp25: 0.55, ScoreExp1000: 0.55 }, - insights: [ - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "HighUsage", - importance: 5, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - }, - { - type: "HotSpot", - importance: 2, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "Errors", - importance: 5, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - } - ], - lastSpanInstanceInfo: { - traceId: "B8D8219E439656DD91DCEA7785AB40C4", - spanId: "E5D52CEDED04AC84", - startTime: "2023-08-03T15:02:51.651732Z", - duration: { value: 2.89, unit: "ms", raw: 2890833 } - }, - firstDataSeenTime: "2023-08-03T15:03:07.976146Z", - p50: { value: 3.46, unit: "ms", raw: 3455333.5 }, - p95: { value: 28.38, unit: "ms", raw: 28375499.99999996 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /SampleInsights/ErrorHotspot", - displayName: "HTTP GET /SampleInsights/ErrorHotspot", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/ErrorHotspot", - methodCodeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genErrorHotspot", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genErrorHotspot" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: - "endpoint:epHTTP:HTTP GET /SampleInsights/ErrorHotspot", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 4.39, unit: "ms", raw: 4392875 } - }, - { - percentile: 0.95, - currentDuration: { value: 4.39, unit: "ms", raw: 4392875 } - } - ], - impactScores: { ScoreExp25: 0.6, ScoreExp1000: 0.6 }, - insights: [ - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - }, - { - type: "Errors", - importance: 5, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "HotSpot", - importance: 2, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "7CFC34FA4BCDC48A", - startTime: "2023-08-03T15:03:15.603532Z", - duration: { value: 2.82, unit: "ms", raw: 2821666 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.919855Z", - p50: { value: 4.39, unit: "ms", raw: 4392875 }, - p95: { value: 4.39, unit: "ms", raw: 4392875 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /SampleInsights/HighUsage", - displayName: "HTTP GET /SampleInsights/HighUsage", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/HighUsage", - methodCodeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genHighUsage", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genHighUsage" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: - "endpoint:epHTTP:HTTP GET /SampleInsights/HighUsage", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 7.47, unit: "ms", raw: 7470791 } - }, - { - percentile: 0.95, - currentDuration: { value: 7.47, unit: "ms", raw: 7470791 } - } - ], - impactScores: { ScoreExp25: 0.65, ScoreExp1000: 0.65 }, - insights: [ - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - }, - { - type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "3DA527EF15B8B983", - startTime: "2023-08-03T15:03:18.299467Z", - duration: { value: 5.82, unit: "ms", raw: 5822125 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.991395Z", - p50: { value: 7.47, unit: "ms", raw: 7470791 }, - p95: { value: 7.47, unit: "ms", raw: 7470791 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /SampleInsights/NPlusOneWithoutInternalSpan", - displayName: "HTTP GET /SampleInsights/NPlusOneWithoutInternalSpan", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/NPlusOneWithoutInternalSpan", - methodCodeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genNPlusOneWithoutInternalSpan", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genNPlusOneWithoutInternalSpan" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: - "endpoint:epHTTP:HTTP GET /SampleInsights/NPlusOneWithoutInternalSpan", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 1.54, unit: "ms", raw: 1544375 } - }, - { - percentile: 0.95, - currentDuration: { value: 1.54, unit: "ms", raw: 1544375 } - } - ], - impactScores: { ScoreExp25: 0.7, ScoreExp1000: 0.7 }, - insights: [ - { - type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "EndpointSpaNPlusOne", - importance: 3, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "941F0F8E4C6C59B1", - startTime: "2023-08-03T15:03:15.619261Z", - duration: { value: 1.23, unit: "ms", raw: 1226667 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.974236Z", - p50: { value: 1.54, unit: "ms", raw: 1544375 }, - p95: { value: 1.54, unit: "ms", raw: 1544375 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /SampleInsights/req-map-get", - displayName: "HTTP GET /SampleInsights/req-map-get", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/req-map-get", - methodCodeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$reqMapOfGet", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$reqMapOfGet" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: - "endpoint:epHTTP:HTTP GET /SampleInsights/req-map-get", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 848.38, unit: "μs", raw: 848375 } - }, - { - percentile: 0.95, - currentDuration: { value: 848.38, unit: "μs", raw: 848375 } - } - ], - impactScores: { ScoreExp25: 0.75, ScoreExp1000: 0.75 }, - insights: [ - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "D63F1AAAEBD1CF29", - startTime: "2023-08-03T15:03:18.307729Z", - duration: { value: 503.79, unit: "μs", raw: 503792 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.981053Z", - p50: { value: 848.38, unit: "μs", raw: 848375 }, - p95: { value: 848.38, unit: "μs", raw: 848375 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /SampleInsights/ErrorRecordedOnCurrentSpan", - displayName: "HTTP GET /SampleInsights/ErrorRecordedOnCurrentSpan", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/ErrorRecordedOnCurrentSpan", - methodCodeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genErrorRecordedOnCurrentSpan", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genErrorRecordedOnCurrentSpan" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: - "endpoint:epHTTP:HTTP GET /SampleInsights/ErrorRecordedOnCurrentSpan", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 717.21, unit: "μs", raw: 717208 } - }, - { - percentile: 0.95, - currentDuration: { value: 717.21, unit: "μs", raw: 717208 } - } - ], - impactScores: { ScoreExp25: 0.8, ScoreExp1000: 0.8 }, - insights: [ - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - }, - { - type: "Errors", - importance: 5, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "AD4D4FE0A11A2170", - startTime: "2023-08-03T15:03:18.336006Z", - duration: { value: 443.17, unit: "μs", raw: 443166 } - }, - firstDataSeenTime: "2023-08-03T15:03:38.006345Z", - p50: { value: 717.21, unit: "μs", raw: 717208 }, - p95: { value: 717.21, unit: "μs", raw: 717208 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /SampleInsights/ErrorRecordedOnDeeplyNestedSpan", - displayName: - "HTTP GET /SampleInsights/ErrorRecordedOnDeeplyNestedSpan", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/ErrorRecordedOnDeeplyNestedSpan", - methodCodeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genErrorRecordedOnDeeplyNestedSpan", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genErrorRecordedOnDeeplyNestedSpan" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: - "endpoint:epHTTP:HTTP GET /SampleInsights/ErrorRecordedOnDeeplyNestedSpan", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 1.38, unit: "ms", raw: 1381500 } - }, - { - percentile: 0.95, - currentDuration: { value: 1.38, unit: "ms", raw: 1381500 } - } - ], - impactScores: { ScoreExp25: 0.85, ScoreExp1000: 0.85 }, - insights: [ - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - }, - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "Errors", - importance: 5, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "58BC12FDA32858AF", - startTime: "2023-08-03T15:03:18.311066Z", - duration: { value: 539, unit: "μs", raw: 539000 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.9828Z", - p50: { value: 1.38, unit: "ms", raw: 1381500 }, - p95: { value: 1.38, unit: "ms", raw: 1381500 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /SampleInsights/NPlusOneWithInternalSpan", - displayName: "HTTP GET /SampleInsights/NPlusOneWithInternalSpan", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/NPlusOneWithInternalSpan", - methodCodeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genNPlusOneWithInternalSpan", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genNPlusOneWithInternalSpan" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: - "endpoint:epHTTP:HTTP GET /SampleInsights/NPlusOneWithInternalSpan", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 5.58, unit: "ms", raw: 5584625 } - }, - { - percentile: 0.95, - currentDuration: { value: 5.58, unit: "ms", raw: 5584625 } - } - ], - impactScores: { ScoreExp25: 0.95, ScoreExp1000: 0.95 }, - insights: [ - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "EndpointSpaNPlusOne", - importance: 3, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "3871328751120A7C", - startTime: "2023-08-03T15:03:15.617267Z", - duration: { value: 1.13, unit: "ms", raw: 1128834 } - }, - firstDataSeenTime: "2023-08-03T15:03:37.946461Z", - p50: { value: 5.58, unit: "ms", raw: 5584625 }, - p95: { value: 5.58, unit: "ms", raw: 5584625 } - }, - { - span: { - classification: "Endpoint", - role: "Entry", - name: "HTTP GET /SampleInsights/ErrorRecordedOnLocalRootSpan", - displayName: - "HTTP GET /SampleInsights/ErrorRecordedOnLocalRootSpan", - instrumentationLibrary: "io.opentelemetry.tomcat-10.0", - spanCodeObjectId: - "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/ErrorRecordedOnLocalRootSpan", - methodCodeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genErrorRecordedOnLocalRootSpan", - kind: "Server", - codeObjectId: - "org.springframework.samples.petclinic.sample.SampleInsightsController$_$genErrorRecordedOnLocalRootSpan" - }, - assetType: "Endpoint", - serviceName: "PetClinic", - endpointCodeObjectId: - "endpoint:epHTTP:HTTP GET /SampleInsights/ErrorRecordedOnLocalRootSpan", - durationPercentiles: [ - { - percentile: 0.5, - currentDuration: { value: 19.55, unit: "ms", raw: 19547667 } - }, - { - percentile: 0.95, - currentDuration: { value: 19.55, unit: "ms", raw: 19547667 } - } - ], - impactScores: { ScoreExp25: 1, ScoreExp1000: 1 }, - insights: [ - { - type: "EndpointBreakdown", - importance: 6, - shortDisplayInfo: { - title: "Request Breakdown", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "LowUsage", - importance: 6, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "SpanScalingInsufficientData", - importance: 5, - shortDisplayInfo: { - title: "Scaling Data", - targetDisplayName: "", - subtitle: "", - description: "Partial scale data is available" - } - }, - { - type: "HotSpot", - importance: 2, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - }, - { - type: "Errors", - importance: 5, - shortDisplayInfo: { - title: "", - targetDisplayName: "", - subtitle: "", - description: "" - } - } - ], - lastSpanInstanceInfo: { - traceId: "3A3D10C8C5C6B499DAB699B7DB310E7A", - spanId: "BF20230D9EE14707", - startTime: "2023-08-03T15:03:18.33264Z", - duration: { value: 918.67, unit: "μs", raw: 918667 } - }, - firstDataSeenTime: "2023-08-03T15:03:38.006385Z", - p50: { value: 19.55, unit: "ms", raw: 19547667 }, - p95: { value: 19.55, unit: "ms", raw: 19547667 } - } - ], - accountId: "00000000-0000-0000-0000-000000000000", - environment: "SAMPLE_ENV", - serviceName: "PetClinic" - } - ] -}; diff --git a/src/components/Assets/styles.ts b/src/components/Assets/styles.ts index 30df80e62..34a9dc207 100644 --- a/src/components/Assets/styles.ts +++ b/src/components/Assets/styles.ts @@ -1,5 +1,4 @@ import styled from "styled-components"; -import { Link as CommonLink } from "../common/Link"; export const Container = styled.div` min-height: 100vh; @@ -13,38 +12,3 @@ export const Container = styled.div` } }}; `; - -export const NoDataContainer = styled.div` - min-height: 100vh; - display: flex; - flex-direction: column; - align-items: center; -`; - -export const EmptyStateDescription = styled.span` - font-size: 14px; - font-weight: 500; - margin-bottom: 4px; - text-align: center; - color: ${({ theme }) => { - switch (theme.mode) { - case "light": - return "#788ca9"; - case "dark": - case "dark-jetbrains": - return "#7c7c94"; - } - }}; -`; - -export const TroubleshootingLink = styled(CommonLink)` - color: ${({ theme }) => { - switch (theme.mode) { - case "light": - return "#7891d0"; - case "dark": - case "dark-jetbrains": - return "#92affa"; - } - }}; -`; diff --git a/src/components/Assets/types.ts b/src/components/Assets/types.ts deleted file mode 100644 index 91d6269e8..000000000 --- a/src/components/Assets/types.ts +++ /dev/null @@ -1,73 +0,0 @@ -import { Duration } from "../../globals"; -import { SpanInfo, SpanInstanceInfo } from "../../types"; - -export interface AssetsProps { - data?: AssetsData; -} - -export interface ExtendedAssetEntry extends AssetEntry { - id: string; -} - -export interface ExtendedAssetEntryWithServices extends ExtendedAssetEntry { - relatedServices: string[]; -} - -export interface GroupedAssetEntries { - [key: string]: ExtendedAssetEntryWithServices[]; -} - -export interface Insight { - type: string; - importance: number; - shortDisplayInfo: { - title: string; - targetDisplayName: string; - subtitle: string; - description: string; - }; -} - -export interface AssetEntrySpanInfo extends SpanInfo { - classification: string; - role: string; -} - -export interface ImpactScores { - ScoreExp25: number; - ScoreExp1000: number; -} - -export interface AssetEntry { - span: AssetEntrySpanInfo; - assetType: string; - serviceName: string; - endpointCodeObjectId: string | null; - p50: Duration | null; - p95: Duration | null; - /** - * @deprecated - */ - durationPercentiles: { - percentile: number; - currentDuration: Duration | null; - }[]; - insights: Insight[]; - lastSpanInstanceInfo: SpanInstanceInfo; - firstDataSeenTime: string; - impactScores?: ImpactScores; -} - -export interface AssetsData { - accountId: string; - environment: string; - serviceAssetsEntries: ServiceAssetsEntry[]; -} - -export interface ServiceAssetsEntry { - itemType: string; - assetEntries: AssetEntry[]; - accountId: string; - environment: string; - serviceName: string; -} diff --git a/src/components/Dashboard/index.tsx b/src/components/Dashboard/index.tsx index b7925eead..1b0e3400d 100644 --- a/src/components/Dashboard/index.tsx +++ b/src/components/Dashboard/index.tsx @@ -11,7 +11,6 @@ import { OpenLinkIcon } from "../common/icons/OpenLinkIcon"; import { SlowQueries } from "./SlowQueries"; import { actions } from "./actions"; import * as s from "./styles"; -import { DashboardProps } from "./types"; const DIGMA_UI_DEFAULT_PORT = 5280; @@ -19,7 +18,7 @@ const environment = isString(window.dashboardEnvironment) ? window.dashboardEnvironment : new URLSearchParams(window.location.search).get("environment") || ""; -export const Dashboard = (props: DashboardProps) => { +export const Dashboard = () => { const config = useContext(ConfigContext); const theme = useTheme(); const themeKind = getThemeKind(theme); diff --git a/src/components/Dashboard/types.ts b/src/components/Dashboard/types.ts deleted file mode 100644 index 619d34658..000000000 --- a/src/components/Dashboard/types.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface DashboardProps { - data?: any; -} diff --git a/src/components/common/App/ConfigContext.ts b/src/components/common/App/ConfigContext.ts index a4ccbf631..730a10bf5 100644 --- a/src/components/common/App/ConfigContext.ts +++ b/src/components/common/App/ConfigContext.ts @@ -11,5 +11,6 @@ export const ConfigContext = createContext({ isDigmaEngineRunning: window.isDigmaEngineRunning === true, isDockerInstalled: window.isDockerInstalled === true, isDockerComposeInstalled: window.isDockerComposeInstalled === true, - userEmail: isString(window.userEmail) ? window.userEmail : "" + userEmail: isString(window.userEmail) ? window.userEmail : "", + environment: isString(window.environment) ? window.environment : "" }); diff --git a/src/components/common/App/index.tsx b/src/components/common/App/index.tsx index 34db1cc8b..2aff0a3b6 100644 --- a/src/components/common/App/index.tsx +++ b/src/components/common/App/index.tsx @@ -139,6 +139,15 @@ export const App = (props: AppProps) => { } }; + const handleSetEnvironment = (data: unknown) => { + if (isObject(data) && isString(data.environment)) { + setConfig((config) => ({ + ...config, + environment: data.environment as string + })); + } + }; + dispatcher.addActionListener(actions.SET_THEME, handleSetTheme); dispatcher.addActionListener(actions.SET_MAIN_FONT, handleSetMainFont); dispatcher.addActionListener(actions.SET_CODE_FONT, handleSetCodeFont); @@ -171,6 +180,7 @@ export const App = (props: AppProps) => { handleSetDigmaApiUrl ); dispatcher.addActionListener(actions.SET_USER_EMAIL, handleSetUserEmail); + dispatcher.addActionListener(actions.SET_ENVIRONMENT, handleSetEnvironment); return () => { dispatcher.removeActionListener(actions.SET_THEME, handleSetTheme); @@ -208,6 +218,10 @@ export const App = (props: AppProps) => { actions.SET_USER_EMAIL, handleSetUserEmail ); + dispatcher.removeActionListener( + actions.SET_ENVIRONMENT, + handleSetEnvironment + ); }; }, []); diff --git a/src/components/common/App/types.ts b/src/components/common/App/types.ts index ba587fb6f..60cd8ee3b 100644 --- a/src/components/common/App/types.ts +++ b/src/components/common/App/types.ts @@ -28,4 +28,5 @@ export interface ConfigContextData { isDockerInstalled: boolean; isDockerComposeInstalled: boolean; userEmail: string; + environment: string; } diff --git a/src/globals.d.ts b/src/globals.d.ts index 6212117cb..da901416b 100644 --- a/src/globals.d.ts +++ b/src/globals.d.ts @@ -30,6 +30,7 @@ declare global { codeFont?: unknown; isJaegerEnabled?: unknown; userEmail?: unknown; + environment?: unknown; isObservabilityEnabled?: unknown; isDigmaEngineInstalled?: unknown; isDigmaEngineRunning?: unknown; From 331b50f3c644598e70ed5005a98febfaa7e4585b Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Tue, 24 Oct 2023 12:22:34 +0200 Subject: [PATCH 2/6] Add filtered count --- src/components/Assets/AssetList/AssetList.stories.tsx | 3 ++- src/components/Assets/AssetList/index.tsx | 8 ++++---- src/components/Assets/AssetList/types.ts | 1 + src/components/Dashboard/SlowQueries/index.tsx | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/components/Assets/AssetList/AssetList.stories.tsx b/src/components/Assets/AssetList/AssetList.stories.tsx index e3b2f4a74..968367ff2 100644 --- a/src/components/Assets/AssetList/AssetList.stories.tsx +++ b/src/components/Assets/AssetList/AssetList.stories.tsx @@ -806,7 +806,8 @@ export const Default: Story = { } } ], - totalCount: 20 + totalCount: 20, + filteredCount: 20 } } }; diff --git a/src/components/Assets/AssetList/index.tsx b/src/components/Assets/AssetList/index.tsx index d5f821518..82e42dace 100644 --- a/src/components/Assets/AssetList/index.tsx +++ b/src/components/Assets/AssetList/index.tsx @@ -197,11 +197,11 @@ export const AssetList = (props: AssetListProps) => { const searchInputIconColor = sortingMenuChevronColor; const [page, setPage] = useState(0); const previousPage = usePrevious(page); - const totalCount = data?.totalCount || 0; + const filteredCount = data?.filteredCount || 0; const pageStartItemNumber = page * PAGE_SIZE + 1; const pageEndItemNumber = Math.min( pageStartItemNumber + PAGE_SIZE - 1, - totalCount + filteredCount ); const listRef = useRef(null); const config = useContext(ConfigContext); @@ -371,10 +371,10 @@ export const AssetList = (props: AssetListProps) => { {pageStartItemNumber} - {pageEndItemNumber} {" "} - of {totalCount} + of {filteredCount} { const previousPage = usePrevious(page); const [data, setData] = useState(); const previousData = usePrevious(data); - const entries = data?.data ? data.data.entries : []; + const entries = data?.data?.entries || []; const totalCount = data?.data?.totalCount || 0; const error = data?.error?.message; const percentile = getPercentileKey(percentileViewMode); From 44d53367534794e53d8f839a6a5e5024704701fa Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Wed, 25 Oct 2023 11:38:01 +0200 Subject: [PATCH 3/6] Show all sorting criteria Fetch data on environment change --- assets/index.ejs | 1 + src/components/Assets/AssetList/index.tsx | 94 ++++++++++--------- src/components/Assets/AssetTypeList/index.tsx | 19 +++- 3 files changed, 68 insertions(+), 46 deletions(-) diff --git a/assets/index.ejs b/assets/index.ejs index 1d4bbbf06..fe08587ce 100644 --- a/assets/index.ejs +++ b/assets/index.ejs @@ -28,6 +28,7 @@ window.isDigmaEngineRunning; window.isDockerInstalled; window.isDockerComposeInstalled; + window.environment; <% for (var i = 0; i < environmentVariables.length; i++) { %> window.<%= environmentVariables[i] %>;<% } %> diff --git a/src/components/Assets/AssetList/index.tsx b/src/components/Assets/AssetList/index.tsx index 82e42dace..d33352976 100644 --- a/src/components/Assets/AssetList/index.tsx +++ b/src/components/Assets/AssetList/index.tsx @@ -126,25 +126,6 @@ const getSortingCriterionInfo = ( return sortingCriterionInfoMap[sortingCriterion]; }; -const getAvailableSortingCriterions = (assets: AssetEntryWithServices[]) => { - const criterions = [ - SORTING_CRITERION.CRITICAL_INSIGHTS, - SORTING_CRITERION.PERFORMANCE, - SORTING_CRITERION.SLOWEST_FIVE_PERCENT, - SORTING_CRITERION.LATEST, - SORTING_CRITERION.NAME - ]; - - if (assets.length > 0 && assets[0].impactScores) { - criterions.push( - SORTING_CRITERION.PERFORMANCE_IMPACT, - SORTING_CRITERION.OVERALL_IMPACT - ); - } - - return criterions; -}; - // Keep only the latest entry for every spanCodeObjectId across all services const removeDuplicatedEntries = ( data: AssetEntry[] @@ -179,6 +160,7 @@ export const AssetList = (props: AssetListProps) => { const previousData = usePrevious(data); const [isInitialLoading, setIsInitialLoading] = useState(false); const [lastSetDataTimeStamp, setLastSetDataTimeStamp] = useState(); + const previousLastSetDataTimeStamp = usePrevious(lastSetDataTimeStamp); const [sorting, setSorting] = useState({ criterion: SORTING_CRITERION.CRITICAL_INSIGHTS, order: SORTING_ORDER.DESC @@ -205,13 +187,13 @@ export const AssetList = (props: AssetListProps) => { ); const listRef = useRef(null); const config = useContext(ConfigContext); + const refreshTimerId = useRef(); + const previousEnvironment = usePrevious(config.environment); const entries = data ? removeDuplicatedEntries(data.data) : []; const assetTypeInfo = getAssetTypeInfo(props.assetTypeId); - const sortingCriterions = getAvailableSortingCriterions(entries); - useEffect(() => { window.sendMessageToDigma({ action: actions.GET_DATA, @@ -222,11 +204,25 @@ export const AssetList = (props: AssetListProps) => { } }); setIsInitialLoading(true); + + const handleAssetsData = (data: unknown, timeStamp: number) => { + setData(data as AssetsData); + setLastSetDataTimeStamp(timeStamp); + }; + + dispatcher.addActionListener(actions.SET_DATA, handleAssetsData); + + return () => { + dispatcher.removeActionListener(actions.SET_DATA, handleAssetsData); + window.clearTimeout(refreshTimerId.current); + }; }, [props.assetTypeId]); useEffect(() => { if ( (isNumber(previousPage) && previousPage !== page) || + (isString(previousEnvironment) && + previousEnvironment !== config.environment) || (previousSorting && previousSorting !== sorting) || (isString(previousDebouncedSearchInputValue) && previousDebouncedSearchInputValue !== debouncedSearchInputValue) @@ -247,17 +243,6 @@ export const AssetList = (props: AssetListProps) => { } }); } - - const handleAssetsData = (data: unknown, timeStamp: number) => { - setData(data as AssetsData); - setLastSetDataTimeStamp(timeStamp); - }; - - dispatcher.addActionListener(actions.SET_DATA, handleAssetsData); - - return () => { - dispatcher.removeActionListener(actions.SET_DATA, handleAssetsData); - }; }, [ props.assetTypeId, previousDebouncedSearchInputValue, @@ -265,20 +250,41 @@ export const AssetList = (props: AssetListProps) => { previousSorting, sorting, previousPage, - page + page, + previousEnvironment, + config.environment ]); useEffect(() => { - const timerId = window.setTimeout(() => { - window.sendMessageToDigma({ - action: actions.GET_DATA - }); - }, REFRESH_INTERVAL); - - return () => { - window.clearTimeout(timerId); - }; - }, [lastSetDataTimeStamp]); + if (previousLastSetDataTimeStamp !== lastSetDataTimeStamp) { + window.clearTimeout(refreshTimerId.current); + refreshTimerId.current = window.setTimeout(() => { + window.sendMessageToDigma({ + action: actions.GET_DATA, + payload: { + query: { + assetType: props.assetTypeId, + page, + pageSize: PAGE_SIZE, + sortBy: sorting.criterion, + sortOrder: sorting.order, + ...(debouncedSearchInputValue.length > 0 + ? { displayName: debouncedSearchInputValue } + : {}) + } + } + }); + }, REFRESH_INTERVAL); + } + }, [ + lastSetDataTimeStamp, + previousLastSetDataTimeStamp, + props.assetTypeId, + page, + sorting, + debouncedSearchInputValue, + config.environment + ]); useEffect(() => { if (props.data) { @@ -439,7 +445,7 @@ export const AssetList = (props: AssetListProps) => { ({ + items={Object.values(SORTING_CRITERION).map((x) => ({ value: x, label: getSortingCriterionInfo(x).label }))} diff --git a/src/components/Assets/AssetTypeList/index.tsx b/src/components/Assets/AssetTypeList/index.tsx index 3b6221729..299d07bc3 100644 --- a/src/components/Assets/AssetTypeList/index.tsx +++ b/src/components/Assets/AssetTypeList/index.tsx @@ -1,10 +1,12 @@ -import { useEffect, useState } from "react"; +import { useContext, useEffect, useState } from "react"; import { actions as globalActions } from "../../../actions"; import { dispatcher } from "../../../dispatcher"; import { usePrevious } from "../../../hooks/usePrevious"; import { trackingEvents as globalTrackingEvents } from "../../../trackingEvents"; import { isNumber } from "../../../typeGuards/isNumber"; +import { isString } from "../../../typeGuards/isString"; import { sendTrackingEvent } from "../../../utils/sendTrackingEvent"; +import { ConfigContext } from "../../common/App/ConfigContext"; import { EmptyState } from "../../common/EmptyState"; import { NewCircleLoader } from "../../common/NewCircleLoader"; import { CardsIcon } from "../../common/icons/CardsIcon"; @@ -32,6 +34,8 @@ export const AssetTypeList = (props: AssetTypeListProps) => { const previousData = usePrevious(data); const [lastSetDataTimeStamp, setLastSetDataTimeStamp] = useState(); const [isInitialLoading, setIsInitialLoading] = useState(false); + const config = useContext(ConfigContext); + const previousEnvironment = usePrevious(config.environment); useEffect(() => { window.sendMessageToDigma({ @@ -57,6 +61,17 @@ export const AssetTypeList = (props: AssetTypeListProps) => { }; }, []); + useEffect(() => { + if ( + isString(previousEnvironment) && + previousEnvironment !== config.environment + ) { + window.sendMessageToDigma({ + action: actions.GET_CATEGORIES_DATA + }); + } + }, [previousEnvironment, config.environment]); + useEffect(() => { const timerId = window.setTimeout(() => { window.sendMessageToDigma({ @@ -98,7 +113,7 @@ export const AssetTypeList = (props: AssetTypeListProps) => { if (isInitialLoading) { return ( - } />; + } /> ); } From 8aaba760c4e86f50c4ff050bbbe59499981d10ed Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Wed, 25 Oct 2023 14:51:34 +0200 Subject: [PATCH 4/6] Fix React warnings --- .../Assets/AssetList/AssetEntry/index.tsx | 2 +- .../Assets/AssetList/AssetEntry/styles.ts | 5 +- .../Assets/AssetList/AssetEntry/types.ts | 4 ++ src/components/Assets/AssetList/index.tsx | 38 ++++++++--- src/components/Assets/AssetList/styles.ts | 13 ++-- src/components/Assets/AssetList/types.ts | 8 ++- .../Dashboard/SlowQueries/index.tsx | 22 +++++-- src/components/Dashboard/index.tsx | 4 +- .../Insights/DurationInsight/index.tsx | 4 +- .../Insights/DurationInsight/styles.ts | 10 +-- .../Insights/DurationInsight/types.ts | 6 +- .../RequestBreakdownInsight/index.tsx | 4 +- .../RequestBreakdownInsight/styles.ts | 12 ++-- .../Insights/RequestBreakdownInsight/types.ts | 8 +++ .../InstallStep/EngineManager/index.tsx | 2 +- .../InstallStep/EngineManager/styles.ts | 4 +- .../InstallStep/EngineManager/types.ts | 2 +- .../InstallationWizard/InstallStep/index.tsx | 4 +- .../InstallationWizard/InstallStep/styles.ts | 4 +- .../InstallationWizard/InstallStep/types.ts | 2 +- .../InstallationTypeCard/index.tsx | 8 +-- .../InstallationTypeCard/styles.ts | 16 ++--- .../InstallationTypeCard/types.ts | 6 +- .../InstallationWizard/Step/index.tsx | 20 +++--- .../InstallationWizard/Step/styles.ts | 57 +++++++++-------- .../InstallationWizard/Step/types.ts | 20 +++--- .../InstallationWizard/Tabs/Tab/index.tsx | 6 +- .../InstallationWizard/Tabs/Tab/styles.ts | 29 +++++---- .../InstallationWizard/Tabs/Tab/types.ts | 6 ++ src/components/InstallationWizard/index.tsx | 4 +- src/components/InstallationWizard/styles.ts | 20 +++--- src/components/InstallationWizard/types.ts | 5 ++ src/components/Notifications/index.tsx | 6 +- .../EnvironmentPanel/EnvironmentTab/index.tsx | 4 +- .../EnvironmentPanel/EnvironmentTab/styles.ts | 16 ++--- .../EnvironmentPanel/EnvironmentTab/types.ts | 4 +- .../RecentActivity/LiveView/index.tsx | 10 +-- .../RecentActivity/LiveView/styles.ts | 31 +++++---- .../RecentActivity/LiveView/types.ts | 12 +++- .../SetupOrgDigmaPanel/index.tsx | 6 +- .../SetupOrgDigmaPanel/styles.ts | 6 +- .../SetupOrgDigmaPanel/types.ts | 2 +- src/components/common/Badge/index.tsx | 4 +- src/components/common/Badge/styles.ts | 4 +- src/components/common/Badge/types.ts | 2 +- src/components/common/Button/index.tsx | 2 +- src/components/common/Button/styles.ts | 64 +++++++++---------- src/components/common/Button/types.ts | 2 +- src/components/common/CircleLoader/index.tsx | 8 ++- src/components/common/CircleLoader/styles.ts | 10 +-- src/components/common/CircleLoader/types.ts | 8 +-- src/components/common/TextField/index.tsx | 2 +- src/components/common/TextField/styles.ts | 4 +- src/components/common/TextField/types.ts | 2 +- src/components/common/Toggle/index.tsx | 2 +- src/components/common/Toggle/styles.ts | 6 +- src/components/common/Toggle/types.ts | 2 +- src/components/common/ToggleSwitch/index.tsx | 6 +- src/components/common/ToggleSwitch/styles.ts | 38 +++++------ src/components/common/ToggleSwitch/types.ts | 10 +-- 60 files changed, 353 insertions(+), 275 deletions(-) diff --git a/src/components/Assets/AssetList/AssetEntry/index.tsx b/src/components/Assets/AssetList/AssetEntry/index.tsx index 2cd79fe85..6852c95b3 100644 --- a/src/components/Assets/AssetList/AssetEntry/index.tsx +++ b/src/components/Assets/AssetList/AssetEntry/index.tsx @@ -18,7 +18,7 @@ const getImpactScoreIndicator = (score: number) => { return ( - + ); }; diff --git a/src/components/Assets/AssetList/AssetEntry/styles.ts b/src/components/Assets/AssetList/AssetEntry/styles.ts index 8660f7ed0..0c55bc8eb 100644 --- a/src/components/Assets/AssetList/AssetEntry/styles.ts +++ b/src/components/Assets/AssetList/AssetEntry/styles.ts @@ -1,4 +1,5 @@ import styled from "styled-components"; +import { ImpactScoreIndicatorProps } from "./types"; export const Container = styled.div` display: flex; @@ -156,9 +157,9 @@ export const ImpactScoreIndicatorContainer = styled.div` padding-left: 4px; `; -export const ImpactScoreIndicator = styled.div<{ score: number }>` +export const ImpactScoreIndicator = styled.div` border-radius: 50%; width: 10px; height: 10px; - background: hsl(14deg 66% ${({ score }) => 100 - 50 * score}%); + background: hsl(14deg 66% ${({ $score }) => 100 - 50 * $score}%); `; diff --git a/src/components/Assets/AssetList/AssetEntry/types.ts b/src/components/Assets/AssetList/AssetEntry/types.ts index a3b0e4b6e..0b329ed3d 100644 --- a/src/components/Assets/AssetList/AssetEntry/types.ts +++ b/src/components/Assets/AssetList/AssetEntry/types.ts @@ -5,3 +5,7 @@ export interface AssetEntryProps { onAssetLinkClick: (entry: AssetEntryWithServices) => void; sortingCriterion: SORTING_CRITERION; } + +export interface ImpactScoreIndicatorProps { + $score: number; +} diff --git a/src/components/Assets/AssetList/index.tsx b/src/components/Assets/AssetList/index.tsx index d33352976..2bb544e01 100644 --- a/src/components/Assets/AssetList/index.tsx +++ b/src/components/Assets/AssetList/index.tsx @@ -189,6 +189,7 @@ export const AssetList = (props: AssetListProps) => { const config = useContext(ConfigContext); const refreshTimerId = useRef(); const previousEnvironment = usePrevious(config.environment); + const previousAssetTypeId = usePrevious(props.assetTypeId); const entries = data ? removeDuplicatedEntries(data.data) : []; @@ -199,7 +200,14 @@ export const AssetList = (props: AssetListProps) => { action: actions.GET_DATA, payload: { query: { - assetType: props.assetTypeId + assetType: props.assetTypeId, + page, + pageSize: PAGE_SIZE, + sortBy: sorting.criterion, + sortOrder: sorting.order, + ...(debouncedSearchInputValue.length > 0 + ? { displayName: debouncedSearchInputValue } + : {}) } } }); @@ -216,7 +224,7 @@ export const AssetList = (props: AssetListProps) => { dispatcher.removeActionListener(actions.SET_DATA, handleAssetsData); window.clearTimeout(refreshTimerId.current); }; - }, [props.assetTypeId]); + }, []); useEffect(() => { if ( @@ -225,7 +233,9 @@ export const AssetList = (props: AssetListProps) => { previousEnvironment !== config.environment) || (previousSorting && previousSorting !== sorting) || (isString(previousDebouncedSearchInputValue) && - previousDebouncedSearchInputValue !== debouncedSearchInputValue) + previousDebouncedSearchInputValue !== debouncedSearchInputValue) || + (isString(previousAssetTypeId) && + previousAssetTypeId !== props.assetTypeId) ) { window.sendMessageToDigma({ action: actions.GET_DATA, @@ -245,6 +255,7 @@ export const AssetList = (props: AssetListProps) => { } }, [ props.assetTypeId, + previousAssetTypeId, previousDebouncedSearchInputValue, debouncedSearchInputValue, previousSorting, @@ -300,11 +311,22 @@ export const AssetList = (props: AssetListProps) => { useEffect(() => { setPage(0); - }, [config.environment, debouncedSearchInputValue, sorting]); + }, [ + config.environment, + debouncedSearchInputValue, + sorting, + props.assetTypeId + ]); useEffect(() => { listRef.current?.scrollTo(0, 0); - }, [config.environment, debouncedSearchInputValue, sorting, page]); + }, [ + config.environment, + debouncedSearchInputValue, + sorting, + page, + props.assetTypeId + ]); const handleBackButtonClick = () => { props.onBackButtonClick(); @@ -431,7 +453,7 @@ export const AssetList = (props: AssetListProps) => { placement={"bottom-start"} > - + Sort by {getSortingCriterionInfo(sorting.criterion).label} @@ -462,10 +484,10 @@ export const AssetList = (props: AssetListProps) => { return ( handleSortingOrderToggleOptionButtonClick(order)} > - + diff --git a/src/components/Assets/AssetList/styles.ts b/src/components/Assets/AssetList/styles.ts index fb50eb495..743543374 100644 --- a/src/components/Assets/AssetList/styles.ts +++ b/src/components/Assets/AssetList/styles.ts @@ -2,6 +2,7 @@ import styled from "styled-components"; import { SORTING_ORDER, SortingMenuButtonProps, + SortingOrderIconContainerProps, SortingOrderOptionProps } from "./types"; @@ -158,8 +159,8 @@ export const SortingMenuButton = styled.button` } }}; border: 1px solid - ${({ theme, isOpen }) => { - if (isOpen) { + ${({ theme, $isOpen }) => { + if ($isOpen) { switch (theme.mode) { case "light": return "#7891d0"; @@ -232,15 +233,13 @@ export const SortingOrderToggleOptionButton = styled.button (selected ? "#3538cd" : "transparent")}; + background: ${({ $selected }) => ($selected ? "#3538cd" : "transparent")}; `; -export const SortingOrderIconContainer = styled.div<{ - sortingOrder: SORTING_ORDER; -}>` +export const SortingOrderIconContainer = styled.div` display: flex; transform: scaleY( - ${({ sortingOrder }) => (sortingOrder === SORTING_ORDER.DESC ? -1 : 1)} + ${({ $sortingOrder }) => ($sortingOrder === SORTING_ORDER.DESC ? -1 : 1)} ); `; diff --git a/src/components/Assets/AssetList/types.ts b/src/components/Assets/AssetList/types.ts index 5c633b107..c5dbde692 100644 --- a/src/components/Assets/AssetList/types.ts +++ b/src/components/Assets/AssetList/types.ts @@ -27,11 +27,15 @@ export interface Sorting { } export interface SortingMenuButtonProps { - isOpen: boolean; + $isOpen: boolean; } export interface SortingOrderOptionProps { - selected: boolean; + $selected: boolean; +} + +export interface SortingOrderIconContainerProps { + $sortingOrder: SORTING_ORDER; } export interface Insight { diff --git a/src/components/Dashboard/SlowQueries/index.tsx b/src/components/Dashboard/SlowQueries/index.tsx index e0a418d8c..3993de3ff 100644 --- a/src/components/Dashboard/SlowQueries/index.tsx +++ b/src/components/Dashboard/SlowQueries/index.tsx @@ -40,6 +40,7 @@ export const SlowQueries = (props: SlowQueriesProps) => { const error = data?.error?.message; const percentile = getPercentileKey(percentileViewMode); const previousPercentile = usePrevious(percentile); + const previousEnvironment = usePrevious(props.environment); useEffect(() => { window.sendMessageToDigma({ @@ -48,7 +49,7 @@ export const SlowQueries = (props: SlowQueriesProps) => { type: DASHBOARD_TYPE, environment: props.environment, query: { - page: 0, + page, pageSize: PAGE_SIZE, percentile: getPercentileKey(DEFAULT_PERCENTILE) } @@ -67,7 +68,7 @@ export const SlowQueries = (props: SlowQueriesProps) => { dispatcher.removeActionListener(actions.SET_DATA, handleSetData); window.clearTimeout(refreshTimerId.current); }; - }, [props.environment]); + }, []); useEffect(() => { if (previousLastSetDataTimeStamp !== lastSetDataTimeStamp) { @@ -98,7 +99,9 @@ export const SlowQueries = (props: SlowQueriesProps) => { useEffect(() => { if ( (isNumber(previousPage) && previousPage !== page) || - (isString(previousPercentile) && previousPercentile !== percentile) + (isString(previousPercentile) && previousPercentile !== percentile) || + (isString(previousEnvironment) && + previousEnvironment !== props.environment) ) { window.sendMessageToDigma({ action: actions.GET_DATA, @@ -113,7 +116,18 @@ export const SlowQueries = (props: SlowQueriesProps) => { } }); } - }, [previousPage, page, previousPercentile, percentile, props.environment]); + }, [ + previousPage, + page, + previousPercentile, + percentile, + props.environment, + previousEnvironment + ]); + + useEffect(() => { + setPage(0); + }, [props.environment]); useEffect(() => { if (!props.data) { diff --git a/src/components/Dashboard/index.tsx b/src/components/Dashboard/index.tsx index 1b0e3400d..3e160d241 100644 --- a/src/components/Dashboard/index.tsx +++ b/src/components/Dashboard/index.tsx @@ -1,4 +1,4 @@ -import { useContext, useEffect } from "react"; +import { useContext, useLayoutEffect } from "react"; import { Helmet } from "react-helmet"; import { useTheme } from "styled-components"; import { platform } from "../../platform"; @@ -35,7 +35,7 @@ export const Dashboard = () => { openURLInDefaultBrowser(dashboardUrl.toString()); }; - useEffect(() => { + useLayoutEffect(() => { window.sendMessageToDigma({ action: actions.INITIALIZE }); diff --git a/src/components/Insights/DurationInsight/index.tsx b/src/components/Insights/DurationInsight/index.tsx index 05eb1f5d0..fa6603e4e 100644 --- a/src/components/Insights/DurationInsight/index.tsx +++ b/src/components/Insights/DurationInsight/index.tsx @@ -294,7 +294,7 @@ export const DurationInsight = (props: DurationInsightProps) => { {getDurationString(spanLastCall.duration)} - + •{" "} { )} {props.insight.histogramPlot && ( - + ` - color: ${({ theme, isRecent }) => { - if (isRecent) { +export const LastCallTimeDistance = styled.div` + color: ${({ theme, $isRecent }) => { + if ($isRecent) { switch (theme.mode) { case "light": return "#426dda"; @@ -55,7 +55,7 @@ export const LastCallTimeDistance = styled.div<{ isRecent: boolean }>` export const ChartContainer = styled.div` width: 100%; - height: ${({ height }) => height}px; + height: ${({ $height }) => $height}px; `; export const TooltipContainer = styled.div` diff --git a/src/components/Insights/DurationInsight/types.ts b/src/components/Insights/DurationInsight/types.ts index 6c2404a6f..5ee40ff45 100644 --- a/src/components/Insights/DurationInsight/types.ts +++ b/src/components/Insights/DurationInsight/types.ts @@ -23,5 +23,9 @@ export interface TickData { } export interface ChartContainerProps { - height: number; + $height: number; +} + +export interface LastCallTimeDistanceProps { + $isRecent: boolean; } diff --git a/src/components/Insights/RequestBreakdownInsight/index.tsx b/src/components/Insights/RequestBreakdownInsight/index.tsx index ce43f821f..c75accb8d 100644 --- a/src/components/Insights/RequestBreakdownInsight/index.tsx +++ b/src/components/Insights/RequestBreakdownInsight/index.tsx @@ -97,7 +97,7 @@ export const RequestBreakdownInsight = ( {data.map((x) => ( - + {x.type} {roundTo(x.fraction * 100, 2)}% @@ -131,7 +131,7 @@ export const RequestBreakdownInsight = ( return ( - + ); diff --git a/src/components/Insights/RequestBreakdownInsight/styles.ts b/src/components/Insights/RequestBreakdownInsight/styles.ts index ac670ed86..d03eb11ed 100644 --- a/src/components/Insights/RequestBreakdownInsight/styles.ts +++ b/src/components/Insights/RequestBreakdownInsight/styles.ts @@ -1,4 +1,8 @@ import styled from "styled-components"; +import { + FractionProgressBarValueProps, + LegendItemDataColorProps +} from "./types"; export const ContentContainer = styled.div` display: flex; @@ -42,11 +46,11 @@ export const LegendItem = styled.div` gap: 5px; `; -export const LegendItemDataColor = styled.div<{ color: string }>` +export const LegendItemDataColor = styled.div` height: 4px; width: 4px; border-radius: 50%; - background: ${({ color }) => color}; + background: ${({ $color }) => $color}; `; export const LegendItemDataLabel = styled.span` @@ -171,8 +175,8 @@ export const FractionProgressBar = styled.div` }}; `; -export const FractionProgressBarValue = styled.div<{ value: number }>` - width: ${({ value }) => Math.floor(value * 100)}%; +export const FractionProgressBarValue = styled.div` + width: ${({ $value }) => Math.floor($value * 100)}%; height: 4px; border-radius: 2px; position: absolute; diff --git a/src/components/Insights/RequestBreakdownInsight/types.ts b/src/components/Insights/RequestBreakdownInsight/types.ts index 50dab12f1..3b165581a 100644 --- a/src/components/Insights/RequestBreakdownInsight/types.ts +++ b/src/components/Insights/RequestBreakdownInsight/types.ts @@ -3,3 +3,11 @@ import { EndpointBreakdownInsight, InsightProps } from "../types"; export interface RequestBreakdownInsightProps extends InsightProps { insight: EndpointBreakdownInsight; } + +export interface LegendItemDataColorProps { + $color: string; +} + +export interface FractionProgressBarValueProps { + $value: number; +} diff --git a/src/components/InstallationWizard/InstallStep/EngineManager/index.tsx b/src/components/InstallationWizard/InstallStep/EngineManager/index.tsx index 325be3e1b..9c597a69b 100644 --- a/src/components/InstallationWizard/InstallStep/EngineManager/index.tsx +++ b/src/components/InstallationWizard/InstallStep/EngineManager/index.tsx @@ -192,7 +192,7 @@ export const EngineManager = (props: EngineManagerProps) => { return ( <> - + {icon} {title} diff --git a/src/components/InstallationWizard/InstallStep/EngineManager/styles.ts b/src/components/InstallationWizard/InstallStep/EngineManager/styles.ts index b7740674b..3cb574dd5 100644 --- a/src/components/InstallationWizard/InstallStep/EngineManager/styles.ts +++ b/src/components/InstallationWizard/InstallStep/EngineManager/styles.ts @@ -34,8 +34,8 @@ export const ContentContainer = styled.div` gap: 20px; position: relative; - ${({ overlay }) => { - if (overlay) { + ${({ $overlay }) => { + if ($overlay) { return css` &::after { content: ""; diff --git a/src/components/InstallationWizard/InstallStep/EngineManager/types.ts b/src/components/InstallationWizard/InstallStep/EngineManager/types.ts index b419d806e..230405011 100644 --- a/src/components/InstallationWizard/InstallStep/EngineManager/types.ts +++ b/src/components/InstallationWizard/InstallStep/EngineManager/types.ts @@ -20,5 +20,5 @@ export interface OperationInfo { } export interface ContentContainerProps { - overlay?: boolean; + $overlay?: boolean; } diff --git a/src/components/InstallationWizard/InstallStep/index.tsx b/src/components/InstallationWizard/InstallStep/index.tsx index d3f2a2076..52d1580a6 100644 --- a/src/components/InstallationWizard/InstallStep/index.tsx +++ b/src/components/InstallationWizard/InstallStep/index.tsx @@ -378,7 +378,7 @@ export const InstallStep = (props: InstallStepProps) => { content: ( <> {runningDigmaMessage} - + Run the following from the terminal/command line to start the @@ -424,7 +424,7 @@ export const InstallStep = (props: InstallStepProps) => { <> {runningDigmaMessage} diff --git a/src/components/InstallationWizard/InstallStep/styles.ts b/src/components/InstallationWizard/InstallStep/styles.ts index 3baa0f392..56b19a18c 100644 --- a/src/components/InstallationWizard/InstallStep/styles.ts +++ b/src/components/InstallationWizard/InstallStep/styles.ts @@ -23,8 +23,8 @@ export const TabContentContainer = styled.div` position: relative; height: 474px; - ${({ overlay }) => { - if (overlay) { + ${({ $overlay }) => { + if ($overlay) { return css` &::after { content: ""; diff --git a/src/components/InstallationWizard/InstallStep/types.ts b/src/components/InstallationWizard/InstallStep/types.ts index 0b08d7070..05d763fff 100644 --- a/src/components/InstallationWizard/InstallStep/types.ts +++ b/src/components/InstallationWizard/InstallStep/types.ts @@ -29,7 +29,7 @@ export interface InstallStepProps { } export interface TabContentContainerProps { - overlay?: boolean; + $overlay?: boolean; } export interface EngineState { diff --git a/src/components/InstallationWizard/InstallationTypeCard/index.tsx b/src/components/InstallationWizard/InstallationTypeCard/index.tsx index abb6561b1..d0a76c711 100644 --- a/src/components/InstallationWizard/InstallationTypeCard/index.tsx +++ b/src/components/InstallationWizard/InstallationTypeCard/index.tsx @@ -9,13 +9,11 @@ export const InstallationTypeCard = (props: InstallationTypeCardProps) => { }; return ( - + - - {props.icon} - + {props.icon} - {props.title} + {props.title} {props.description} diff --git a/src/components/InstallationWizard/InstallationTypeCard/styles.ts b/src/components/InstallationWizard/InstallationTypeCard/styles.ts index b84514016..546bc33bd 100644 --- a/src/components/InstallationWizard/InstallationTypeCard/styles.ts +++ b/src/components/InstallationWizard/InstallationTypeCard/styles.ts @@ -1,5 +1,5 @@ import styled from "styled-components"; -import { ButtonProps, ContainerProps } from "./types"; +import { ContainerProps } from "./types"; export const Container = styled.div` display: flex; @@ -8,7 +8,7 @@ export const Container = styled.div` padding: 12px; border-radius: 4px; border: 1px solid transparent; - cursor: ${({ disabled }) => (disabled ? "default" : "pointer")}; + cursor: ${({ $disabled }) => ($disabled ? "default" : "pointer")}; background: ${({ theme }) => { switch (theme.mode) { case "light": @@ -21,8 +21,8 @@ export const Container = styled.div` &:hover { border: 1px solid - ${({ theme, disabled }) => { - if (disabled) { + ${({ theme, $disabled }) => { + if ($disabled) { return "transparent"; } @@ -38,8 +38,8 @@ export const Container = styled.div` &:active { border: 1px solid - ${({ theme, disabled }) => { - if (disabled) { + ${({ theme, $disabled }) => { + if ($disabled) { return "transparent"; } @@ -69,7 +69,7 @@ export const ContentContainer = styled.div` }}; `; -export const IconContainer = styled.span` +export const IconContainer = styled.span` display: flex; flex-shrink: 0; height: 72px; @@ -94,7 +94,7 @@ export const TextContainer = styled.span` text-align: start; `; -export const Title = styled.span` +export const Title = styled.span` display: flex; align-items: center; gap: 4px; diff --git a/src/components/InstallationWizard/InstallationTypeCard/types.ts b/src/components/InstallationWizard/InstallationTypeCard/types.ts index c03006be0..406a696c4 100644 --- a/src/components/InstallationWizard/InstallationTypeCard/types.ts +++ b/src/components/InstallationWizard/InstallationTypeCard/types.ts @@ -11,8 +11,6 @@ export type InstallationTypeCardProps = { additionalContent?: ReactNode; }; -export type ButtonProps = { - disabled?: boolean; +export type ContainerProps = { + $disabled?: boolean; }; - -export type ContainerProps = ButtonProps; diff --git a/src/components/InstallationWizard/Step/index.tsx b/src/components/InstallationWizard/Step/index.tsx index 824b6a271..40145cbd8 100644 --- a/src/components/InstallationWizard/Step/index.tsx +++ b/src/components/InstallationWizard/Step/index.tsx @@ -39,21 +39,21 @@ export const Step = (props: StepProps) => { nodeRef={containerRef} > { {props.stepIndex + 1} diff --git a/src/components/InstallationWizard/Step/styles.ts b/src/components/InstallationWizard/Step/styles.ts index 9624ce2ee..796afe862 100644 --- a/src/components/InstallationWizard/Step/styles.ts +++ b/src/components/InstallationWizard/Step/styles.ts @@ -9,25 +9,25 @@ import { const HEADER_HEIGHT = 44; // in pixels; export const Container = styled.div` - ${({ transitionClassName, transitionDuration, contentHeight }) => { - const totalHeight = HEADER_HEIGHT + contentHeight; + ${({ $transitionClassName, $transitionDuration, $contentHeight }) => { + const totalHeight = HEADER_HEIGHT + $contentHeight; return ` - &.${transitionClassName}-enter { + &.${$transitionClassName}-enter { height: ${HEADER_HEIGHT}px; } - &.${transitionClassName}-enter-active { + &.${$transitionClassName}-enter-active { height: ${totalHeight}px; - transition: height ${transitionDuration}ms ease-out; + transition: height ${$transitionDuration}ms ease-out; } - &.${transitionClassName}-exit { + &.${$transitionClassName}-exit { height: ${totalHeight}px; } - &.${transitionClassName}-exit-active { + &.${$transitionClassName}-exit-active { height: ${HEADER_HEIGHT}px; - transition: height ${transitionDuration}ms ease-out; + transition: height ${$transitionDuration}ms ease-out; } `; }} @@ -40,9 +40,9 @@ export const Container = styled.div` return "#393b40"; } }}; - height: ${({ status, contentHeight }) => - status === "active" - ? `${HEADER_HEIGHT + contentHeight}` + height: ${({ $status, $contentHeight }) => + $status === "active" + ? `${HEADER_HEIGHT + $contentHeight}` : `${HEADER_HEIGHT}`}px; overflow: hidden; flex-shrink: 0; @@ -68,18 +68,19 @@ export const Header = styled.div` }}; height: ${HEADER_HEIGHT}px; box-sizing: border-box; - color: ${({ theme, status }) => { + color: ${({ theme, $status }) => { switch (theme.mode) { case "light": - return status === "active" ? "#494b57" : "#818594"; + return $status === "active" ? "#494b57" : "#818594"; case "dark": case "dark-jetbrains": - return status === "active" ? "#dfe1e5" : "#b4b8bf"; + return $status === "active" ? "#dfe1e5" : "#b4b8bf"; } }}; - transition: color ${({ transitionDuration }) => transitionDuration}ms ease-out; - cursor: ${({ status }) => { - return status === "completed" ? "pointer" : "initial"; + transition: color ${({ $transitionDuration }) => $transitionDuration}ms + ease-out; + cursor: ${({ $status }) => { + return $status === "completed" ? "pointer" : "initial"; }}; `; @@ -91,16 +92,16 @@ export const NumberContainer = styled.div` align-items: center; justify-content: center; flex-shrink: 0; - color: ${({ theme, isActive }) => { + color: ${({ theme, $isActive }) => { switch (theme.mode) { case "light": - return isActive ? "#f1f5fa" : "#b9c0d4"; + return $isActive ? "#f1f5fa" : "#b9c0d4"; case "dark": case "dark-jetbrains": - return isActive ? "#fff" : "#383838"; + return $isActive ? "#fff" : "#383838"; } }}; - transition-duration: ${({ transitionDuration }) => transitionDuration}ms; + transition-duration: ${({ $transitionDuration }) => $transitionDuration}ms; transition-property: color; transition-timing-function: ease-out; `; @@ -129,31 +130,31 @@ export const Number = styled.span` background: ${({ theme, status }) => status === "completed" ? "none" : getNumberBackgroundColor(theme)}; - ${({ theme, transitionClassName, transitionDuration }) => { + ${({ theme, $transitionClassName, $transitionDuration }) => { return ` - &.${transitionClassName}-enter { + &.${$transitionClassName}-enter { background: none; opacity: 0; } - &.${transitionClassName}-enter-active { + &.${$transitionClassName}-enter-active { background: ${getNumberBackgroundColor(theme)}; opacity: 1; transition-property: opacity, background; - transition-duration: ${transitionDuration}ms; + transition-duration: ${$transitionDuration}ms; transition-timing-function: ease-out; } - &.${transitionClassName}-exit { + &.${$transitionClassName}-exit { background: ${getNumberBackgroundColor(theme)}; opacity: 1; } - &.${transitionClassName}-exit-active { + &.${$transitionClassName}-exit-active { background: none; opacity: 0; transition-property: opacity, background; - transition-duration: ${transitionDuration}ms; + transition-duration: ${$transitionDuration}ms; transition-timing-function: ease-out; } `; diff --git a/src/components/InstallationWizard/Step/types.ts b/src/components/InstallationWizard/Step/types.ts index dbd325e83..567886b13 100644 --- a/src/components/InstallationWizard/Step/types.ts +++ b/src/components/InstallationWizard/Step/types.ts @@ -3,8 +3,8 @@ import { ReactNode } from "react"; export type StepStatus = "completed" | "active" | "not-completed"; export interface TransitionProps { - transitionClassName: string; - transitionDuration: number; + $transitionClassName: string; + $transitionDuration: number; } export interface StepData { @@ -21,21 +21,19 @@ export interface StepProps { onGoToStep: (stepIndex: number) => void; } -export interface ContainerProps { - status: StepStatus; - contentHeight: number; - transitionClassName: string; - transitionDuration: number; +export interface ContainerProps extends TransitionProps { + $status: StepStatus; + $contentHeight: number; } export interface HeaderProps { - status: StepStatus; - transitionDuration: number; + $status: StepStatus; + $transitionDuration: number; } export interface NumberContainerProps { - isActive: boolean; - transitionDuration: number; + $isActive: boolean; + $transitionDuration: number; } export interface NumberProps extends TransitionProps { diff --git a/src/components/InstallationWizard/Tabs/Tab/index.tsx b/src/components/InstallationWizard/Tabs/Tab/index.tsx index f2b814be5..170990c85 100644 --- a/src/components/InstallationWizard/Tabs/Tab/index.tsx +++ b/src/components/InstallationWizard/Tabs/Tab/index.tsx @@ -9,10 +9,10 @@ export const Tab = (props: TabProps) => { }; return ( {props.icon && } diff --git a/src/components/InstallationWizard/Tabs/Tab/styles.ts b/src/components/InstallationWizard/Tabs/Tab/styles.ts index 4f638b8db..3ac2e23e2 100644 --- a/src/components/InstallationWizard/Tabs/Tab/styles.ts +++ b/src/components/InstallationWizard/Tabs/Tab/styles.ts @@ -1,7 +1,7 @@ import styled from "styled-components"; -import { TabProps } from "./types"; +import { ContainerProps } from "./types"; -export const Container = styled.li` +export const Container = styled.li` font-weight: 500; font-size: 14px; padding: 9px 10px; @@ -10,36 +10,37 @@ export const Container = styled.li` user-select: none; text-align: center; align-items: center; - cursor: ${({ isDisabled }) => (isDisabled ? "initial" : "pointer")}; + cursor: ${({ $isDisabled }) => ($isDisabled ? "initial" : "pointer")}; border-bottom: 3px solid - ${({ isSelected }) => (isSelected ? "#5154ec" : "transparent")}; - color: ${({ theme, isSelected, isDisabled }) => { + ${({ $isSelected }) => ($isSelected ? "#5154ec" : "transparent")}; + color: ${({ theme, $isSelected, $isDisabled }) => { switch (theme.mode) { case "light": - return isDisabled ? "#b9c0d4" : isSelected ? "#494b57" : "#818594"; + return $isDisabled ? "#b9c0d4" : $isSelected ? "#494b57" : "#818594"; case "dark": case "dark-jetbrains": - return isDisabled ? "#49494d" : isSelected ? "#dfe1e5" : "#b4b8bf"; + return $isDisabled ? "#49494d" : $isSelected ? "#dfe1e5" : "#b4b8bf"; } }}; - ${({ fullWidth }) => - fullWidth && - ` + ${({ $fullWidth }) => + $fullWidth + ? ` flex-grow: 1; flex-basis: 0; justify-content: center; - `} + ` + : ""} &:hover, &:focus { - color: ${({ theme, isDisabled }) => { + color: ${({ theme, $isDisabled }) => { switch (theme.mode) { case "light": - return isDisabled ? "#b9c0d4" : "#494b57"; + return $isDisabled ? "#b9c0d4" : "#494b57"; case "dark": case "dark-jetbrains": - return isDisabled ? "#49494d" : "#dfe1e5"; + return $isDisabled ? "#49494d" : "#dfe1e5"; } }}; } diff --git a/src/components/InstallationWizard/Tabs/Tab/types.ts b/src/components/InstallationWizard/Tabs/Tab/types.ts index 18b336a39..b7b6b91a9 100644 --- a/src/components/InstallationWizard/Tabs/Tab/types.ts +++ b/src/components/InstallationWizard/Tabs/Tab/types.ts @@ -9,3 +9,9 @@ export interface TabProps { children: ReactNode; fullWidth?: boolean; } + +export interface ContainerProps { + $isSelected: boolean; + $isDisabled?: boolean; + $fullWidth?: boolean; +} diff --git a/src/components/InstallationWizard/index.tsx b/src/components/InstallationWizard/index.tsx index 1ef0035f9..8f2506fba 100644 --- a/src/components/InstallationWizard/index.tsx +++ b/src/components/InstallationWizard/index.tsx @@ -462,8 +462,8 @@ export const InstallationWizard = () => { > handleGoToStep(installStepIndex)} diff --git a/src/components/InstallationWizard/styles.ts b/src/components/InstallationWizard/styles.ts index f59abb388..228efdf2a 100644 --- a/src/components/InstallationWizard/styles.ts +++ b/src/components/InstallationWizard/styles.ts @@ -1,6 +1,7 @@ import styled from "styled-components"; import { Button } from "../common/Button"; import { Link } from "../common/Link"; +import { FinishStepFooterContentProps } from "./types"; export const Container = styled.div` height: 100vh; @@ -80,10 +81,7 @@ export const Footer = styled.div` padding: 8px; `; -export const FinishStepFooterContent = styled.div<{ - transitionClassName: string; - transitionDuration: number; -}>` +export const FinishStepFooterContent = styled.div` display: flex; flex-direction: column; align-items: center; @@ -91,24 +89,24 @@ export const FinishStepFooterContent = styled.div<{ justify-content: flex-end; gap: 8px; - ${({ transitionClassName, transitionDuration }) => { + ${({ $transitionClassName, $transitionDuration }) => { return ` - &.${transitionClassName}-enter { + &.${$transitionClassName}-enter { opacity: 0; } - &.${transitionClassName}-enter-active { + &.${$transitionClassName}-enter-active { opacity: 1; - transition: opacity ${transitionDuration}ms ease-out; + transition: opacity ${$transitionDuration}ms ease-out; } - &.${transitionClassName}-exit { + &.${$transitionClassName}-exit { opacity: 1; } - &.${transitionClassName}-exit-active { + &.${$transitionClassName}-exit-active { opacity: 0; - transition: opacity ${transitionDuration}ms ease-out; + transition: opacity ${$transitionDuration}ms ease-out; } `; }} diff --git a/src/components/InstallationWizard/types.ts b/src/components/InstallationWizard/types.ts index 7dfd1fad8..5e60dda22 100644 --- a/src/components/InstallationWizard/types.ts +++ b/src/components/InstallationWizard/types.ts @@ -12,3 +12,8 @@ export type InstallationType = "local" | "cloud"; export interface SetCurrentStepData { currentStep: string; } + +export interface FinishStepFooterContentProps { + $transitionClassName: string; + $transitionDuration: number; +} diff --git a/src/components/Notifications/index.tsx b/src/components/Notifications/index.tsx index 62a454774..d6b01d3a1 100644 --- a/src/components/Notifications/index.tsx +++ b/src/components/Notifications/index.tsx @@ -68,9 +68,9 @@ export const Notifications = (props: NotificationsProps) => { window.sendMessageToDigma({ action: actions.GET_DATA, payload: { - pageNumber: 1, + pageNumber: page + 1, pageSize, - isRead: false + isRead: showAll } }); setIsInitialLoading(true); @@ -86,7 +86,7 @@ export const Notifications = (props: NotificationsProps) => { dispatcher.removeActionListener(actions.SET_DATA, handleSetData); window.clearTimeout(refreshTimerId.current); }; - }, [pageSize]); + }, []); useEffect(() => { if (previousData !== data && data) { diff --git a/src/components/RecentActivity/EnvironmentPanel/EnvironmentTab/index.tsx b/src/components/RecentActivity/EnvironmentPanel/EnvironmentTab/index.tsx index 48fb81d20..0cad91f58 100644 --- a/src/components/RecentActivity/EnvironmentPanel/EnvironmentTab/index.tsx +++ b/src/components/RecentActivity/EnvironmentPanel/EnvironmentTab/index.tsx @@ -73,8 +73,8 @@ export const EnvironmentTab = (props: EnvironmentTabProps) => { return ( ` display: flex; position: relative; cursor: pointer; - font-weight: ${({ isSelected }) => (isSelected ? 700 : 500)}; + font-weight: ${({ $isSelected }) => ($isSelected ? 700 : 500)}; font-size: 14px; padding: 4px 12px; user-select: none; align-items: center; gap: 4px; - color: ${({ isPending, isSelected, theme }) => { - if (isPending) { + color: ${({ $isPending, $isSelected, theme }) => { + if ($isPending) { switch (theme.mode) { case "light": return "#c9ccd6"; @@ -22,7 +22,7 @@ export const Container = styled.li` } } - if (isSelected) { + if ($isSelected) { switch (theme.mode) { case "light": return "#494b57"; @@ -42,15 +42,15 @@ export const Container = styled.li` return "#b4b8bf"; } }}; - border-bottom: ${({ isSelected }) => - isSelected ? "1px solid #5154ec" : "none"}; + border-bottom: ${({ $isSelected }) => + $isSelected ? "1px solid #5154ec" : "none"}; &:hover { font-weight: 700; - ${({ theme, isPending }) => { + ${({ theme, $isPending }) => { let color = ""; - if (!isPending) { + if (!$isPending) { switch (theme.mode) { case "light": color = "#002d61"; diff --git a/src/components/RecentActivity/EnvironmentPanel/EnvironmentTab/types.ts b/src/components/RecentActivity/EnvironmentPanel/EnvironmentTab/types.ts index 2bf5158c4..7639961bb 100644 --- a/src/components/RecentActivity/EnvironmentPanel/EnvironmentTab/types.ts +++ b/src/components/RecentActivity/EnvironmentPanel/EnvironmentTab/types.ts @@ -8,6 +8,6 @@ export interface EnvironmentTabProps { } export interface ContainerProps { - isSelected: boolean; - isPending?: boolean; + $isSelected: boolean; + $isPending?: boolean; } diff --git a/src/components/RecentActivity/LiveView/index.tsx b/src/components/RecentActivity/LiveView/index.tsx index d6ad987bc..270f8b914 100644 --- a/src/components/RecentActivity/LiveView/index.tsx +++ b/src/components/RecentActivity/LiveView/index.tsx @@ -423,7 +423,7 @@ export const LiveView = (props: LiveViewProps) => { }, [props.data.durationData.percentiles]); return ( - + @@ -465,11 +465,11 @@ export const LiveView = (props: LiveViewProps) => { )} { - + Slowest 5% - Median {scrollPercentagePosition < 1 && ( diff --git a/src/components/RecentActivity/LiveView/styles.ts b/src/components/RecentActivity/LiveView/styles.ts index 0494c628d..275d43b20 100644 --- a/src/components/RecentActivity/LiveView/styles.ts +++ b/src/components/RecentActivity/LiveView/styles.ts @@ -1,5 +1,10 @@ import styled from "styled-components"; -import { AreaLegendIllustrationProps, AxisChartContainerProps } from "./types"; +import { + AreaLegendIllustrationProps, + AxisChartContainerProps, + ChartsContainerProps, + ContainerProps +} from "./types"; // In pixels const CONTAINER_GAP = 12; @@ -18,13 +23,13 @@ const getContainerMinHeight = (isChangeStatusBarPresent: boolean) => .filter((x) => x > 0) .reduce((acc, cur) => acc + cur + CONTAINER_GAP, 0) + CONTAINER_GAP; -export const Container = styled.div<{ isChangeStatusBarPresent: boolean }>` +export const Container = styled.div` display: flex; flex-direction: column; height: 100%; gap: ${CONTAINER_GAP}px; - min-height: ${({ isChangeStatusBarPresent }) => - getContainerMinHeight(isChangeStatusBarPresent)}px; + min-height: ${({ $isChangeStatusBarPresent }) => + getContainerMinHeight($isChangeStatusBarPresent)}px; border: 1px solid ${({ theme }) => { switch (theme.mode) { @@ -32,7 +37,7 @@ export const Container = styled.div<{ isChangeStatusBarPresent: boolean }>` return "#d1d1d1"; case "dark": case "dark-jetbrains": - return "#323232"; + return "#323232s"; } }}; background: ${({ theme }) => { @@ -128,14 +133,12 @@ export const CloseButton = styled.button` cursor: pointer; `; -export const ChartsContainer = styled.div<{ - isChangeStatusBarPresent: boolean; -}>` +export const ChartsContainer = styled.div` display: flex; height: calc( 100% - - ${({ isChangeStatusBarPresent }) => - getContainerMinHeight(isChangeStatusBarPresent)}px + ${({ $isChangeStatusBarPresent }) => + getContainerMinHeight($isChangeStatusBarPresent)}px ); padding-right: 12px; `; @@ -196,9 +199,9 @@ export const ChangeStatusContainer = styled.div` `; export const AxisChartContainer = styled.div` - width: ${({ width }) => width + 1}px; - height: ${({ scrollbarOffset }) => - scrollbarOffset ? `calc(100% - ${scrollbarOffset}px)` : "100%"}; + width: ${({ $width }) => $width + 1}px; + height: ${({ $scrollbarOffset }) => + $scrollbarOffset ? `calc(100% - ${$scrollbarOffset}px)` : "100%"}; flex-shrink: 0; `; @@ -236,7 +239,7 @@ export const LegendContainer = styled.div` export const AreaLegendIllustration = styled.div` ${/* 20% opacity */ ""} - background: ${({ color }) => color}33; + background: ${({ $color }) => $color}33; border-style: solid none; border-width: 1px; width: 10px; diff --git a/src/components/RecentActivity/LiveView/types.ts b/src/components/RecentActivity/LiveView/types.ts index 271452c49..f58eaea5a 100644 --- a/src/components/RecentActivity/LiveView/types.ts +++ b/src/components/RecentActivity/LiveView/types.ts @@ -44,18 +44,24 @@ export interface Coordinates { y: number; } +export interface ContainerProps { + $isChangeStatusBarPresent: boolean; +} + +export type ChartsContainerProps = ContainerProps; + export interface DotTooltipProps { coordinates: Coordinates; data: ExtendedLiveDataRecord; } export interface AxisChartContainerProps { - scrollbarOffset: number; - width: number; + $scrollbarOffset: number; + $width: number; } export interface AreaLegendIllustrationProps { - color: string; + $color: string; } export interface DotProps { diff --git a/src/components/RecentActivity/SetupOrgDigmaPanel/index.tsx b/src/components/RecentActivity/SetupOrgDigmaPanel/index.tsx index efdfa071b..75420384e 100644 --- a/src/components/RecentActivity/SetupOrgDigmaPanel/index.tsx +++ b/src/components/RecentActivity/SetupOrgDigmaPanel/index.tsx @@ -49,7 +49,7 @@ const renderUpdatePluginSettingsMessage = () => { }; return ( - +
@@ -211,7 +211,7 @@ export const SetupOrgDigmaPanel = (props: SetupOrgDigmaPanelProps) => { switch (result) { case "success": return ( - + Connected to server successfully @@ -219,7 +219,7 @@ export const SetupOrgDigmaPanel = (props: SetupOrgDigmaPanelProps) => { case "failure": return ( - + Connection to server failed diff --git a/src/components/RecentActivity/SetupOrgDigmaPanel/styles.ts b/src/components/RecentActivity/SetupOrgDigmaPanel/styles.ts index 40dd8dbfd..d446fa896 100644 --- a/src/components/RecentActivity/SetupOrgDigmaPanel/styles.ts +++ b/src/components/RecentActivity/SetupOrgDigmaPanel/styles.ts @@ -137,8 +137,8 @@ export const NotificationMessage = styled.div` display: flex; gap: 4px; align-items: center; - color: ${({ theme, type }) => { - if (type === "success") { + color: ${({ theme, $type }) => { + if ($type === "success") { switch (theme.mode) { case "light": return "#00c108"; @@ -148,7 +148,7 @@ export const NotificationMessage = styled.div` } } - if (type === "failure") { + if ($type === "failure") { switch (theme.mode) { case "light": return "#e00036"; diff --git a/src/components/RecentActivity/SetupOrgDigmaPanel/types.ts b/src/components/RecentActivity/SetupOrgDigmaPanel/types.ts index 7407e5086..f909ed2d1 100644 --- a/src/components/RecentActivity/SetupOrgDigmaPanel/types.ts +++ b/src/components/RecentActivity/SetupOrgDigmaPanel/types.ts @@ -7,5 +7,5 @@ export interface SetupOrgDigmaPanelProps { } export interface NotificationMessageProps { - type: "success" | "failure"; + $type: "success" | "failure"; } diff --git a/src/components/common/Badge/index.tsx b/src/components/common/Badge/index.tsx index 16bcb435c..7ae48dff5 100644 --- a/src/components/common/Badge/index.tsx +++ b/src/components/common/Badge/index.tsx @@ -3,8 +3,8 @@ import * as s from "./styles"; import { BadgeProps } from "./types"; const BadgeComponent = (props: BadgeProps) => ( - - + + ); diff --git a/src/components/common/Badge/styles.ts b/src/components/common/Badge/styles.ts index a25a051eb..d8f097ba8 100644 --- a/src/components/common/Badge/styles.ts +++ b/src/components/common/Badge/styles.ts @@ -11,7 +11,7 @@ export const Outline = styled.div` box-shadow: 0 0 8px rgb(76 142 241 / 12%); border-radius: 2px; - ${({ customStyles }) => ({ ...customStyles })}; + ${({ $customStyles }) => ({ ...$customStyles })}; `; export const Badge = styled.div` @@ -21,5 +21,5 @@ export const Badge = styled.div` box-shadow: 0 0 4px #67d28b; border-radius: 1px; - ${({ customStyles }) => ({ ...customStyles })}; + ${({ $customStyles }) => ({ ...$customStyles })}; `; diff --git a/src/components/common/Badge/types.ts b/src/components/common/Badge/types.ts index 2e2856a4c..4a5ddf317 100644 --- a/src/components/common/Badge/types.ts +++ b/src/components/common/Badge/types.ts @@ -6,5 +6,5 @@ export interface BadgeProps { } export interface CustomStylesProps { - customStyles?: React.CSSProperties; + $customStyles?: React.CSSProperties; } diff --git a/src/components/common/Button/index.tsx b/src/components/common/Button/index.tsx index 7a88d8987..60f810da7 100644 --- a/src/components/common/Button/index.tsx +++ b/src/components/common/Button/index.tsx @@ -16,7 +16,7 @@ export const Button = (props: ButtonProps) => { className={props.className} onClick={handleClick} disabled={props.disabled} - buttonType={buttonType} + $buttonType={buttonType} > {props.icon && ( diff --git a/src/components/common/Button/styles.ts b/src/components/common/Button/styles.ts index febbbf5ff..b1e21710f 100644 --- a/src/components/common/Button/styles.ts +++ b/src/components/common/Button/styles.ts @@ -14,8 +14,8 @@ export const Button = styled.button` justify-content: center; width: max-content; user-select: none; - color: ${({ theme, buttonType }) => { - if (buttonType === "tertiary") { + color: ${({ theme, $buttonType }) => { + if ($buttonType === "tertiary") { switch (theme.mode) { case "light": return "#3538cd"; @@ -25,7 +25,7 @@ export const Button = styled.button` } } - if (buttonType === "secondary") { + if ($buttonType === "secondary") { switch (theme.mode) { case "light": return "#494b57"; @@ -37,19 +37,19 @@ export const Button = styled.button` return "#fff"; }}; - background: ${({ buttonType }) => { - if (buttonType === "tertiary") { + background: ${({ $buttonType }) => { + if ($buttonType === "tertiary") { return "none"; } - if (buttonType === "secondary") { + if ($buttonType === "secondary") { return "none"; } return "#5154ec"; }}; - border: ${({ buttonType }) => { - if (buttonType === "secondary") { + border: ${({ $buttonType }) => { + if ($buttonType === "secondary") { return "1px solid #3538cd"; } @@ -58,8 +58,8 @@ export const Button = styled.button` &:hover, &:focus { - color: ${({ theme, buttonType }) => { - if (buttonType === "tertiary") { + color: ${({ theme, $buttonType }) => { + if ($buttonType === "tertiary") { switch (theme.mode) { case "light": return "#5154ec"; @@ -69,7 +69,7 @@ export const Button = styled.button` } } - if (buttonType === "secondary") { + if ($buttonType === "secondary") { switch (theme.mode) { case "light": return "#5154ec"; @@ -81,19 +81,19 @@ export const Button = styled.button` return "#e2e7ff"; }}; - background: ${({ buttonType }) => { - if (buttonType === "tertiary") { + background: ${({ $buttonType }) => { + if ($buttonType === "tertiary") { return "none"; } - if (buttonType === "secondary") { + if ($buttonType === "secondary") { return "none"; } return "#5154ec"; }}; - border: ${({ buttonType }) => { - if (buttonType === "secondary") { + border: ${({ $buttonType }) => { + if ($buttonType === "secondary") { return "1px solid #5154ec"; } @@ -102,8 +102,8 @@ export const Button = styled.button` } &:active { - color: ${({ theme, buttonType }) => { - if (buttonType === "tertiary") { + color: ${({ theme, $buttonType }) => { + if ($buttonType === "tertiary") { switch (theme.mode) { case "light": return "#5154ec"; @@ -113,7 +113,7 @@ export const Button = styled.button` } } - if (buttonType === "secondary") { + if ($buttonType === "secondary") { switch (theme.mode) { case "light": return "#3538cd"; @@ -131,19 +131,19 @@ export const Button = styled.button` return "#dadada"; } }}; - background: ${({ buttonType }) => { - if (buttonType === "tertiary") { + background: ${({ $buttonType }) => { + if ($buttonType === "tertiary") { return "none"; } - if (buttonType === "secondary") { + if ($buttonType === "secondary") { return "none"; } return "#3538cd"; }}; - border: ${({ buttonType }) => { - if (buttonType === "secondary") { + border: ${({ $buttonType }) => { + if ($buttonType === "secondary") { return "1px solid #3538cd"; } @@ -153,8 +153,8 @@ export const Button = styled.button` &:disabled { cursor: initial; - color: ${({ theme, buttonType }) => { - if (buttonType === "tertiary") { + color: ${({ theme, $buttonType }) => { + if ($buttonType === "tertiary") { switch (theme.mode) { case "light": return "#b9c0d4"; @@ -164,7 +164,7 @@ export const Button = styled.button` } } - if (buttonType === "secondary") { + if ($buttonType === "secondary") { switch (theme.mode) { case "light": return "#b9c0d4"; @@ -182,12 +182,12 @@ export const Button = styled.button` return "#49494d"; } }}; - background: ${({ theme, buttonType }) => { - if (buttonType === "tertiary") { + background: ${({ theme, $buttonType }) => { + if ($buttonType === "tertiary") { return "none"; } - if (buttonType === "secondary") { + if ($buttonType === "secondary") { return "none"; } @@ -199,8 +199,8 @@ export const Button = styled.button` return "#2e2e2e"; } }}; - border: ${({ theme, buttonType }) => { - if (buttonType === "secondary") { + border: ${({ theme, $buttonType }) => { + if ($buttonType === "secondary") { switch (theme.mode) { case "light": return "#b9c0d4"; diff --git a/src/components/common/Button/types.ts b/src/components/common/Button/types.ts index d5b43c98d..9f6df5a86 100644 --- a/src/components/common/Button/types.ts +++ b/src/components/common/Button/types.ts @@ -17,5 +17,5 @@ export interface ButtonProps { } export interface ButtonElementProps { - buttonType?: ButtonType; + $buttonType?: ButtonType; } diff --git a/src/components/common/CircleLoader/index.tsx b/src/components/common/CircleLoader/index.tsx index 5166138af..4be28df43 100644 --- a/src/components/common/CircleLoader/index.tsx +++ b/src/components/common/CircleLoader/index.tsx @@ -28,8 +28,12 @@ export const CircleLoader = (props: CircleLoaderProps) => { const colors = props.colors || getDefaultColors(theme); return ( - - + + ); }; diff --git a/src/components/common/CircleLoader/styles.ts b/src/components/common/CircleLoader/styles.ts index 92a56aac5..8e5318e47 100644 --- a/src/components/common/CircleLoader/styles.ts +++ b/src/components/common/CircleLoader/styles.ts @@ -10,13 +10,13 @@ export const OuterCircle = styled.div` display: flex; align-items: center; justify-content: center; - width: ${({ size }) => size}px; - height: ${({ size }) => size}px; + width: ${({ $size }) => $size}px; + height: ${({ $size }) => $size}px; border-radius: 50%; background: conic-gradient( from 90deg at 50% 50%, - ${({ startColor }) => startColor} 0deg, - ${({ endColor }) => endColor} 360deg + ${({ $startColor }) => $startColor} 0deg, + ${({ $endColor }) => $endColor} 360deg ); animation: ${rotateAnimation} 1s linear infinite; `; @@ -25,5 +25,5 @@ export const InnerCircle = styled.div` width: 83%; height: 83%; border-radius: 50%; - background: ${({ background }) => background}; + background: ${({ $background }) => $background}; `; diff --git a/src/components/common/CircleLoader/types.ts b/src/components/common/CircleLoader/types.ts index 93b27a486..0ae2872f2 100644 --- a/src/components/common/CircleLoader/types.ts +++ b/src/components/common/CircleLoader/types.ts @@ -10,11 +10,11 @@ export interface CircleLoaderProps { } export interface OuterCircleProps { - size: number; - startColor: string; - endColor: string; + $size: number; + $startColor: string; + $endColor: string; } export interface InnerCircleProps { - background: string; + $background: string; } diff --git a/src/components/common/TextField/index.tsx b/src/components/common/TextField/index.tsx index 121b0f361..0a1d7702a 100644 --- a/src/components/common/TextField/index.tsx +++ b/src/components/common/TextField/index.tsx @@ -17,7 +17,7 @@ export const TextFieldComponent = ( }; return ( - + ` } }}; border: 1px solid - ${({ theme, focused }) => { - if (focused) { + ${({ theme, $focused }) => { + if ($focused) { switch (theme.mode) { case "light": return "#383a42"; diff --git a/src/components/common/TextField/types.ts b/src/components/common/TextField/types.ts index 0a12f0910..8984e7a76 100644 --- a/src/components/common/TextField/types.ts +++ b/src/components/common/TextField/types.ts @@ -9,5 +9,5 @@ export interface TextFieldProps { } export interface ContainerProps { - focused: boolean; + $focused: boolean; } diff --git a/src/components/common/Toggle/index.tsx b/src/components/common/Toggle/index.tsx index 6273fa1b2..5630fd9c7 100644 --- a/src/components/common/Toggle/index.tsx +++ b/src/components/common/Toggle/index.tsx @@ -11,7 +11,7 @@ export const Toggle = (props: ToggleProps) => { {props.options.map((option) => ( handleOptionButtonClick(option.value)} > {option.label} diff --git a/src/components/common/Toggle/styles.ts b/src/components/common/Toggle/styles.ts index 96a67fb6a..5eb70c63b 100644 --- a/src/components/common/Toggle/styles.ts +++ b/src/components/common/Toggle/styles.ts @@ -31,8 +31,8 @@ export const OptionButton = styled.button` padding: 2px 4px; cursor: pointer; user-select: none; - color: ${({ theme, selected }) => { - if (selected) { + color: ${({ theme, $selected }) => { + if ($selected) { switch (theme.mode) { case "light": return "#f7f8fa"; @@ -50,5 +50,5 @@ export const OptionButton = styled.button` return "#b4b8bf"; } }}; - background: ${({ selected }) => (selected ? "#5154ec" : "transparent")}; + background: ${({ $selected }) => ($selected ? "#5154ec" : "transparent")}; `; diff --git a/src/components/common/Toggle/types.ts b/src/components/common/Toggle/types.ts index 67a30a7fd..843c1dbc5 100644 --- a/src/components/common/Toggle/types.ts +++ b/src/components/common/Toggle/types.ts @@ -7,5 +7,5 @@ export interface ToggleProps { } export interface OptionButtonProps { - selected: boolean; + $selected: boolean; } diff --git a/src/components/common/ToggleSwitch/index.tsx b/src/components/common/ToggleSwitch/index.tsx index 3e21b99e8..83347e9f9 100644 --- a/src/components/common/ToggleSwitch/index.tsx +++ b/src/components/common/ToggleSwitch/index.tsx @@ -13,11 +13,11 @@ export const ToggleSwitch = (props: ToggleSwitchProps) => { {(!props.labelPosition || props.labelPosition === "start") && props.label} - - + + {props.labelPosition === "end" && props.label} diff --git a/src/components/common/ToggleSwitch/styles.ts b/src/components/common/ToggleSwitch/styles.ts index e5d895b48..0ab5209a9 100644 --- a/src/components/common/ToggleSwitch/styles.ts +++ b/src/components/common/ToggleSwitch/styles.ts @@ -21,16 +21,16 @@ export const Container = styled.div` align-items: center; cursor: pointer; user-select: none; - font-weight: ${({ size }) => { - switch (size) { + font-weight: ${({ $size }) => { + switch ($size) { case "large": return "600"; case "small": return "500"; } }}; - font-size: ${({ size }) => { - switch (size) { + font-size: ${({ $size }) => { + switch ($size) { case "large": return "16px"; case "small": @@ -49,40 +49,40 @@ export const Container = styled.div` `; export const SwitchContainer = styled.div` - border-radius: ${({ size }) => 2 * getCircleRadius(size)}px; - width: ${({ size }) => 7 * getCircleRadius(size)}px; - height: ${({ size }) => 4 * getCircleRadius(size)}px; + border-radius: ${({ $size }) => 2 * getCircleRadius($size)}px; + width: ${({ $size }) => 7 * getCircleRadius($size)}px; + height: ${({ $size }) => 4 * getCircleRadius($size)}px; transition: background 300ms; display: flex; align-items: center; - background: ${({ isChecked, theme }) => { + background: ${({ $isChecked, theme }) => { switch (theme.mode) { case "light": - return isChecked ? "#3538cd" : "#b9c0d4"; + return $isChecked ? "#3538cd" : "#b9c0d4"; case "dark": case "dark-jetbrains": - return isChecked ? "#3538cd" : "#7c7c94"; + return $isChecked ? "#3538cd" : "#7c7c94"; } }}; `; export const Circle = styled.div` - width: ${({ size }) => 2 * getCircleRadius(size)}px; - height: ${({ size }) => 2 * getCircleRadius(size)}px; + width: ${({ $size }) => 2 * getCircleRadius($size)}px; + height: ${({ $size }) => 2 * getCircleRadius($size)}px; border-radius: 50%; transition-property: background, margin-left; transition-duration: 300ms; - margin-left: ${({ isChecked, size }) => - isChecked - ? `${4 * getCircleRadius(size)}px` - : `${getCircleRadius(size)}px`}; - background: ${({ isChecked, theme }) => { + margin-left: ${({ $isChecked, $size }) => + $isChecked + ? `${4 * getCircleRadius($size)}px` + : `${getCircleRadius($size)}px`}; + background: ${({ $isChecked, theme }) => { switch (theme.mode) { case "light": - return isChecked ? "#fbfdff" : "#f1f5fa"; + return $isChecked ? "#fbfdff" : "#f1f5fa"; case "dark": case "dark-jetbrains": - return isChecked ? "#fbfdff" : "#b9c0d4"; + return $isChecked ? "#fbfdff" : "#b9c0d4"; } }}; `; diff --git a/src/components/common/ToggleSwitch/types.ts b/src/components/common/ToggleSwitch/types.ts index e79a25b22..ee306a830 100644 --- a/src/components/common/ToggleSwitch/types.ts +++ b/src/components/common/ToggleSwitch/types.ts @@ -10,15 +10,15 @@ export interface ToggleSwitchProps { } export interface ContainerProps { - size: ToggleSwitchSize; + $size: ToggleSwitchSize; } export interface SwitchContainerProps { - isChecked: boolean; - size: ToggleSwitchSize; + $isChecked: boolean; + $size: ToggleSwitchSize; } export interface CircleProps { - isChecked: boolean; - size: ToggleSwitchSize; + $isChecked: boolean; + $size: ToggleSwitchSize; } From 3b2f2cdc383ec31f48051e0c01e9ace164be5482 Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Thu, 26 Oct 2023 16:06:41 +0200 Subject: [PATCH 5/6] Fix styles --- src/components/common/IconButton/styles.ts | 2 +- src/components/common/KebabMenuButton/styles.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/common/IconButton/styles.ts b/src/components/common/IconButton/styles.ts index e202c4e9b..7cb85cb4f 100644 --- a/src/components/common/IconButton/styles.ts +++ b/src/components/common/IconButton/styles.ts @@ -31,7 +31,7 @@ export const Button = styled.button` } &:hover, - &focus { + &:focus { color: ${({ theme }) => { switch (theme.mode) { case "light": diff --git a/src/components/common/KebabMenuButton/styles.ts b/src/components/common/KebabMenuButton/styles.ts index d02c27528..77d6d6144 100644 --- a/src/components/common/KebabMenuButton/styles.ts +++ b/src/components/common/KebabMenuButton/styles.ts @@ -16,7 +16,7 @@ export const Container = styled.div` }}; &:hover, - &focus { + &:focus { color: ${({ theme }) => { switch (theme.mode) { case "light": From b9c9747dce8c97ba1b7befcab2ec6531085a49f0 Mon Sep 17 00:00:00 2001 From: Kyrylo Shmidt Date: Fri, 27 Oct 2023 13:39:10 +0200 Subject: [PATCH 6/6] Remove asset deduplication logic --- .../AssetEntry/AssetEntry.stories.tsx | 2 +- .../Assets/AssetList/AssetEntry/index.tsx | 6 ++-- .../Assets/AssetList/AssetEntry/types.ts | 6 ++-- .../Assets/AssetList/AssetList.stories.tsx | 20 +++++++++++ src/components/Assets/AssetList/index.tsx | 33 +------------------ src/components/Assets/AssetList/types.ts | 5 +-- 6 files changed, 29 insertions(+), 43 deletions(-) diff --git a/src/components/Assets/AssetList/AssetEntry/AssetEntry.stories.tsx b/src/components/Assets/AssetList/AssetEntry/AssetEntry.stories.tsx index 29cd9c287..cf94eb864 100644 --- a/src/components/Assets/AssetList/AssetEntry/AssetEntry.stories.tsx +++ b/src/components/Assets/AssetList/AssetEntry/AssetEntry.stories.tsx @@ -19,7 +19,7 @@ type Story = StoryObj; export const Default: Story = { args: { entry: { - relatedServices: ["service1", "service2"], + services: ["service1", "service2"], displayName: "HTTP GET /SampleInsights/ErrorRecordedOnLocalRootSpan", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/ErrorRecordedOnLocalRootSpan", diff --git a/src/components/Assets/AssetList/AssetEntry/index.tsx b/src/components/Assets/AssetList/AssetEntry/index.tsx index 6852c95b3..8f4c13d4a 100644 --- a/src/components/Assets/AssetList/AssetEntry/index.tsx +++ b/src/components/Assets/AssetList/AssetEntry/index.tsx @@ -58,7 +58,7 @@ export const AssetEntry = (props: AssetEntryProps) => { }; const name = props.entry.displayName; - const otherServices = props.entry.relatedServices.slice(1); + const otherServices = props.entry.services.slice(1); const performanceDuration = props.entry.p50; const slowestFivePercentDuration = props.entry.p95; const lastSeenDateTime = props.entry.latestSpanTimestamp; @@ -80,7 +80,7 @@ export const AssetEntry = (props: AssetEntryProps) => { const assetTypeInfo = getAssetTypeInfo(props.entry.assetType); - const servicesTitle = props.entry.relatedServices.join(", "); + const servicesTitle = props.entry.services.join(", "); const timeDistance = timeAgo(lastSeenDateTime, "short"); const timeDistanceString = timeDistance @@ -131,7 +131,7 @@ export const AssetEntry = (props: AssetEntryProps) => { - {props.entry.relatedServices[0]} + {props.entry.services[0]} {otherServices.length > 0 && ( +{otherServices.length} )} diff --git a/src/components/Assets/AssetList/AssetEntry/types.ts b/src/components/Assets/AssetList/AssetEntry/types.ts index 0b329ed3d..528107a80 100644 --- a/src/components/Assets/AssetList/AssetEntry/types.ts +++ b/src/components/Assets/AssetList/AssetEntry/types.ts @@ -1,8 +1,8 @@ -import { AssetEntryWithServices, SORTING_CRITERION } from "../types"; +import { AssetEntry, SORTING_CRITERION } from "../types"; export interface AssetEntryProps { - entry: AssetEntryWithServices; - onAssetLinkClick: (entry: AssetEntryWithServices) => void; + entry: AssetEntry; + onAssetLinkClick: (entry: AssetEntry) => void; sortingCriterion: SORTING_CRITERION; } diff --git a/src/components/Assets/AssetList/AssetList.stories.tsx b/src/components/Assets/AssetList/AssetList.stories.tsx index 968367ff2..e3ae503ff 100644 --- a/src/components/Assets/AssetList/AssetList.stories.tsx +++ b/src/components/Assets/AssetList/AssetList.stories.tsx @@ -24,6 +24,7 @@ export const Default: Story = { data: [ { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /owners/new", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /owners/new", @@ -68,6 +69,7 @@ export const Default: Story = { }, { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /owners/{ownerId}", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /owners/{ownerId}", @@ -112,6 +114,7 @@ export const Default: Story = { }, { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /oups", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /oups", @@ -156,6 +159,7 @@ export const Default: Story = { }, { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /SampleInsights/ErrorHotspot", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/ErrorHotspot", @@ -200,6 +204,7 @@ export const Default: Story = { }, { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /SampleInsights/ErrorRecordedOnLocalRootSpan", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/ErrorRecordedOnLocalRootSpan", @@ -244,6 +249,7 @@ export const Default: Story = { }, { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /owners/{ownerId}/pets/new", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /owners/{ownerId}/pets/new", @@ -284,6 +290,7 @@ export const Default: Story = { }, { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /SampleInsights/SpanBottleneck", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/SpanBottleneck", @@ -324,6 +331,7 @@ export const Default: Story = { }, { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /SampleInsights/NPlusOneWithInternalSpan", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/NPlusOneWithInternalSpan", @@ -364,6 +372,7 @@ export const Default: Story = { }, { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /SampleInsights/NPlusOneWithoutInternalSpan", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/NPlusOneWithoutInternalSpan", @@ -404,6 +413,7 @@ export const Default: Story = { }, { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /SampleInsights/ErrorRecordedOnCurrentSpan", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/ErrorRecordedOnCurrentSpan", @@ -444,6 +454,7 @@ export const Default: Story = { }, { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /SampleInsights/ErrorRecordedOnDeeplyNestedSpan", spanCodeObjectId: @@ -485,6 +496,7 @@ export const Default: Story = { }, { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /", assetType: "Endpoint", @@ -520,6 +532,7 @@ export const Default: Story = { }, { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /**", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /**", assetType: "Endpoint", @@ -555,6 +568,7 @@ export const Default: Story = { }, { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /owners", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /owners", @@ -591,6 +605,7 @@ export const Default: Story = { }, { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /owners/{ownerId}/edit", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /owners/{ownerId}/edit", @@ -627,6 +642,7 @@ export const Default: Story = { }, { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /owners/find", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /owners/find", @@ -663,6 +679,7 @@ export const Default: Story = { }, { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /SampleInsights/HighUsage", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/HighUsage", @@ -699,6 +716,7 @@ export const Default: Story = { }, { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /SampleInsights/req-map-get", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/req-map-get", @@ -735,6 +753,7 @@ export const Default: Story = { }, { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /SampleInsights/SlowEndpoint", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /SampleInsights/SlowEndpoint", @@ -771,6 +790,7 @@ export const Default: Story = { }, { service: "PetClinic", + services: ["PetClinic"], displayName: "HTTP GET /vets.html", spanCodeObjectId: "span:io.opentelemetry.tomcat-10.0$_$HTTP GET /vets.html", diff --git a/src/components/Assets/AssetList/index.tsx b/src/components/Assets/AssetList/index.tsx index 2bb544e01..9c0e8b322 100644 --- a/src/components/Assets/AssetList/index.tsx +++ b/src/components/Assets/AssetList/index.tsx @@ -5,7 +5,6 @@ import { useDebounce } from "../../../hooks/useDebounce"; import { usePrevious } from "../../../hooks/usePrevious"; import { isNumber } from "../../../typeGuards/isNumber"; import { isString } from "../../../typeGuards/isString"; -import { groupBy } from "../../../utils/groupBy"; import { ConfigContext } from "../../common/App/ConfigContext"; import { EmptyState } from "../../common/EmptyState"; import { Menu } from "../../common/Menu"; @@ -24,7 +23,6 @@ import { AssetEntry as AssetEntryComponent } from "./AssetEntry"; import * as s from "./styles"; import { AssetEntry, - AssetEntryWithServices, AssetListProps, AssetsData, SORTING_CRITERION, @@ -126,35 +124,6 @@ const getSortingCriterionInfo = ( return sortingCriterionInfoMap[sortingCriterion]; }; -// Keep only the latest entry for every spanCodeObjectId across all services -const removeDuplicatedEntries = ( - data: AssetEntry[] -): AssetEntryWithServices[] => { - const groupedEntries = groupBy(data, (x) => x.spanCodeObjectId); - - const uniqueEntries: AssetEntryWithServices[] = []; - - Object.values(groupedEntries).forEach((entries) => { - const latestEntry = entries.reduce( - (acc, cur) => - new Date(cur.latestSpanTimestamp).valueOf() > - new Date(acc.latestSpanTimestamp).valueOf() - ? cur - : acc, - entries[0] - ); - - const relatedServices = entries.map((entry) => entry.service).sort(); - - uniqueEntries.push({ - ...latestEntry, - relatedServices - }); - }); - - return uniqueEntries; -}; - export const AssetList = (props: AssetListProps) => { const [data, setData] = useState(); const previousData = usePrevious(data); @@ -191,7 +160,7 @@ export const AssetList = (props: AssetListProps) => { const previousEnvironment = usePrevious(config.environment); const previousAssetTypeId = usePrevious(props.assetTypeId); - const entries = data ? removeDuplicatedEntries(data.data) : []; + const entries = data?.data || []; const assetTypeInfo = getAssetTypeInfo(props.assetTypeId); diff --git a/src/components/Assets/AssetList/types.ts b/src/components/Assets/AssetList/types.ts index c5dbde692..62442df34 100644 --- a/src/components/Assets/AssetList/types.ts +++ b/src/components/Assets/AssetList/types.ts @@ -57,13 +57,10 @@ export interface AssetEntry { latestSpanTimestamp: string; impactScores?: ImpactScores; service: string; + services: string[]; spanCodeObjectId: string; } -export interface AssetEntryWithServices extends AssetEntry { - relatedServices: string[]; -} - export type AssetsData = { data: AssetEntry[]; totalCount: number;