Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/components/Assets/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
import { useDebounce } from "../../hooks/useDebounce";
import { usePrevious } from "../../hooks/usePrevious";
import { FeatureFlag } from "../../types";
import { sendTrackingEvent } from "../../utils/sendTrackingEvent";
import { ConfigContext } from "../common/App/ConfigContext";
import { EmptyState } from "../common/EmptyState";
import { SearchInput } from "../common/SearchInput";
Expand All @@ -28,6 +29,7 @@ import { NoDataMessage } from "./NoDataMessage";
import { ServicesFilter } from "./ServicesFilter";
import { actions } from "./actions";
import * as s from "./styles";
import { trackingEvents } from "./tracking";
import { DataRefresher } from "./types";

export const Assets = () => {
Expand Down Expand Up @@ -113,6 +115,10 @@ export const Assets = () => {
};

const handleRefresh = () => {
sendTrackingEvent(trackingEvents.REFRESH_BUTTON_CLICKED, {
view: !selectedAssetTypeId ? "asset categories" : "assets"
});

const currentRefresher = !selectedAssetTypeId
? assetTypeListDataRefresher
: assetListDataRefresher;
Expand Down
3 changes: 2 additions & 1 deletion src/components/Assets/tracking.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ const TRACKING_PREFIX = "assets";
export const trackingEvents = addPrefix(
TRACKING_PREFIX,
{
FILTER_APPLIED: "filter applied"
FILTER_APPLIED: "filter applied",
REFRESH_BUTTON_CLICKED: "refresh button clicked"
},
" "
);
2 changes: 2 additions & 0 deletions src/components/Insights/BottleneckInsight/mockData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ export const mockedBottleneckInsight: SpanEndpointBottleneckInsight = {
category: InsightCategory.Performance,
specifity: 3,
importance: 2,
isDismissed: false,
isDismissible: true,
span: {
name: "WaitForLock",
displayName: "WaitForLock",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export const Default: Story = {
firstCommitId: "b3f7b3f",
lastCommitId: "a1b2c3d",
deactivatedCommitId: null,
isDismissed: false,
isDismissible: true,
reopenCount: 0,
ticketLink: null,
impact: 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ export const WithAverage: Story = {
name: "Performance Stats",
type: InsightType.SpanDurations,
category: InsightCategory.Performance,
isDismissed: false,
isDismissible: true,
specifity: 4,
isRecalculateEnabled: true,
spanCodeObjectId: "span:SampleInsightsController$_$DelayAsync",
Expand Down Expand Up @@ -151,6 +153,8 @@ export const WithChange: Story = {
name: "Performance Stats",
type: InsightType.SpanDurations,
category: InsightCategory.Performance,
isDismissed: false,
isDismissible: true,
specifity: 4,
isRecalculateEnabled: true,
spanCodeObjectId: "span:SampleInsightsController$_$DelayAsync",
Expand Down Expand Up @@ -254,6 +258,8 @@ export const WithEvaluatingChange: Story = {
deactivatedCommitId: null,
reopenCount: 0,
ticketLink: null,
isDismissed: false,
isDismissible: true,
impact: 0,
name: "Performance Stats",
type: InsightType.SpanDurations,
Expand Down Expand Up @@ -368,6 +374,8 @@ export const HistogramWithManyBars: Story = {
specifity: 4,
isRecalculateEnabled: true,
spanCodeObjectId: "span:SampleInsightsController$_$DelayAsync",
isDismissed: false,
isDismissible: true,
span: {
name: "DelayAsync",
displayName: "DelayAsync",
Expand Down Expand Up @@ -4893,6 +4901,8 @@ export const HistogramWithGaps: Story = {
specifity: 4,
isRecalculateEnabled: true,
spanCodeObjectId: "span:SampleInsightsController$_$DelayAsync",
isDismissed: false,
isDismissible: true,
span: {
name: "DelayAsync",
displayName: "DelayAsync",
Expand Down Expand Up @@ -5141,6 +5151,8 @@ export const HistogramWithAFewBars: Story = {
deactivatedCommitId: null,
reopenCount: 0,
ticketLink: null,
isDismissed: false,
isDismissible: true,
impact: 0,
name: "Performance Stats",
type: InsightType.SpanDurations,
Expand Down Expand Up @@ -5293,6 +5305,8 @@ export const EmptyStateBug: Story = {
category: InsightCategory.Performance,
specifity: 4,
isRecalculateEnabled: true,
isDismissed: false,
isDismissible: true,
spanCodeObjectId:
"span:OpenTelemetry.Instrumentation.AspNetCore$_$HTTP GET SampleInsights/HttpCall",
span: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export const WithEvaluatingChange: Story = {
category: InsightCategory.Performance,
specifity: 4,
importance: 2,
isDismissed: false,
isDismissible: true,
durationSlowdownSources: [
{
percentile: "0.5",
Expand Down
2 changes: 2 additions & 0 deletions src/components/Insights/EndpointNPlusOneInsight/mockData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ export const mockedEndpointNPlusOneInsight: EndpointSuspectedNPlusOneInsight = {
category: InsightCategory.Performance,
specifity: 2,
importance: 3,
isDismissed: false,
isDismissible: true,
spans: [
{
occurrences: 200,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ export const mockedEndpointQueryOptimizationInsight: EndpointQueryOptimizationIn
name: "Query Optimization",
type: InsightType.EndpointQueryOptimization,
category: InsightCategory.Performance,
isDismissed: false,
isDismissible: true,
specifity: 2,
importance: 3,
spans: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ export const Default: Story = {
errorCount: 2,
unhandledCount: 0,
unexpectedCount: 0,
isDismissed: false,
isDismissible: true,
topErrors: [
{
uid: "c4436bfe-1736-11ee-9651-0242ac1a0004",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export const Default: Story = {
category: InsightCategory.Performance,
specifity: 2,
importance: 3,
isDismissed: false,
isDismissible: true,
spans: [
{
repeats: 29,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ export const mockedHighNumberOfQueriesInsight: EndpointHighNumberOfQueriesInsigh
specifity: 2,
importance: 3,
queriesCount: 250,
isDismissed: false,
isDismissible: true,
typicalCount: 4,
traceId: "00D37A4E7208E0F6E89AA7E2E37446A6",
scope: InsightScope.EntrySpan,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ const insight: SpanUsagesInsight = {
sampleTrace: null,
flows: [],
scope: InsightScope.Span,
isDismissed: false,
isDismissible: true,
spanInfo: {
name: "DelayAsync",
displayName: "DelayAsync",
Expand Down
28 changes: 22 additions & 6 deletions src/components/Insights/Insights.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ export const Default: Story = {
prefixedCodeObjectId:
"method:Sample.MoneyTransfer.API.Controllers.TransferController$_$TransferFunds(TransferRequest)",
customStartTime: null,
actualStartTime: "2023-06-26T00:00:00.000Z"
actualStartTime: "2023-06-26T00:00:00.000Z",
isDismissed: false,
isDismissible: true
},
{
sourceSpanCodeObjectInsight: "sourceSpanCodeObjectInsightId",
Expand Down Expand Up @@ -290,7 +292,9 @@ export const Default: Story = {
prefixedCodeObjectId:
"method:Sample.MoneyTransfer.API.Controllers.TransferController$_$TransferFunds(TransferRequest)",
customStartTime: null,
actualStartTime: "2023-06-26T13:53:53.645Z"
actualStartTime: "2023-06-26T13:53:53.645Z",
isDismissed: false,
isDismissible: true
},
{
sourceSpanCodeObjectInsight: "sourceSpanCodeObjectInsightId",
Expand Down Expand Up @@ -332,7 +336,9 @@ export const Default: Story = {
prefixedCodeObjectId:
"method:Sample.MoneyTransfer.API.Controllers.TransferController$_$TransferFunds(TransferRequest)",
customStartTime: null,
actualStartTime: "2023-06-26T13:53:57.956Z"
actualStartTime: "2023-06-26T13:53:57.956Z",
isDismissed: false,
isDismissible: true
},
{
sourceSpanCodeObjectInsight: "sourceSpanCodeObjectInsightId",
Expand All @@ -351,6 +357,8 @@ export const Default: Story = {
category: InsightCategory.Usage,
specifity: 4,
importance: 6,
isDismissed: false,
isDismissible: true,
decorators: [
{
title: "Low Usage",
Expand Down Expand Up @@ -564,7 +572,9 @@ export const Default: Story = {
prefixedCodeObjectId:
"method:Sample.MoneyTransfer.API.Controllers.TransferController$_$TransferFunds(TransferRequest)",
customStartTime: null,
actualStartTime: "2023-06-12T13:49:03.486Z"
actualStartTime: "2023-06-12T13:49:03.486Z",
isDismissed: false,
isDismissible: true
},
{
sourceSpanCodeObjectInsight: "sourceSpanCodeObjectInsightId",
Expand All @@ -583,6 +593,8 @@ export const Default: Story = {
category: InsightCategory.Performance,
specifity: 4,
isRecalculateEnabled: true,
isDismissed: false,
isDismissible: true,
spanCodeObjectId:
"span:OpenTelemetry.Instrumentation.AspNetCore$_$HTTP POST Transfer/TransferFunds",
span: {
Expand Down Expand Up @@ -727,7 +739,9 @@ export const Default: Story = {
prefixedCodeObjectId:
"method:Sample.MoneyTransfer.API.Controllers.TransferController$_$TransferFunds(TransferRequest)",
customStartTime: null,
actualStartTime: "2023-06-20T00:00:00.000Z"
actualStartTime: "2023-06-20T00:00:00.000Z",
isDismissed: false,
isDismissible: true
},
mockedEndpointNPlusOneInsight,
mockedBottleneckInsight,
Expand Down Expand Up @@ -872,7 +886,9 @@ const errorsInsight: CodeObjectErrorsInsight = {
prefixedCodeObjectId:
"method:Sample.MoneyTransfer.API.Controllers.TransferController$_$TransferFunds(TransferRequest)",
customStartTime: null,
actualStartTime: "2023-06-26T13:53:53.645Z"
actualStartTime: "2023-06-26T13:53:53.645Z",
isDismissed: false,
isDismissible: true
};

export const NoObservabilityWithInsights: Story = {
Expand Down
Loading