-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(logs): Add view samples button in logs #98133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Similar to the view samples button in spans.
❌ 7 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
return [ | ||
<Fragment key={`sample-${rowIndex}`}> | ||
{topEventsLimit && rowIndex < topEventsLimit && ( | ||
<TopResultsIndicator color={palette[rowIndex]!} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: Palette Initialization Causes Out-of-Bounds Errors
The palette
is initialized with numberOfRowsNeedingColor - 1
elements. This can lead to theme.chart.getColorPalette
being called with a negative argument (-1
) when numberOfRowsNeedingColor
is 0. Additionally, when numberOfRowsNeedingColor
equals topEventsLimit
, the palette is one element too small, causing an out-of-bounds access when palette[rowIndex]!
is used for the last rowIndex
.
@@ -503,6 +509,49 @@ export function ourlogToJson(ourlog: TraceItemDetailsResponse | undefined): stri | |||
return JSON.stringify(copy, null, 2); | |||
} | |||
|
|||
export function viewLogsSamplesTarget({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we maybe reuse getLogsUrl
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we'll think about how to consolidate more of these ways to link to logs
Similar to the view samples button in spans.