ref(dashboards): Extract spans confidence footer into reusable component#109939
Merged
nsdeschenes merged 4 commits intomasterfrom Mar 6, 2026
Merged
ref(dashboards): Extract spans confidence footer into reusable component#109939nsdeschenes merged 4 commits intomasterfrom
nsdeschenes merged 4 commits intomasterfrom
Conversation
Extract the inline ConfidenceFooter from chart.tsx into a dedicated WidgetCardConfidenceFooter component. Thread dataScanned through the widget query pipeline alongside existing confidence/sampleCount props. Create useWidgetRawCounts hook for fetching raw span counts. Currently scoped to spans widgets only; logs and trace metrics support will follow in subsequent PRs. Co-Authored-By: Claude <noreply@anthropic.com> Made-with: Cursor
This was referenced Mar 5, 2026
Contributor
Author
|
@cursor review |
Thread showConfidenceWarning, confidence, dataScanned, isSampled, and sampleCount through VisualizationWidget so the confidence footer renders in the timeseries visualization path (used when the dashboards-widget-timeseries-visualization flag is enabled). Co-Authored-By: Claude <noreply@anthropic.com> Made-with: Cursor
Contributor
Author
|
@cursor review |
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
… padding Move padding to Container wrapper instead of applying it directly to the Flex parent, keeping layout consistent between breakdown and non-breakdown views. Co-Authored-By: Claude <noreply@anthropic.com> Made-with: Cursor
gggritso
approved these changes
Mar 5, 2026
Member
gggritso
left a comment
There was a problem hiding this comment.
👍🏻 I'm hoping we can do even more cleanup here soon by using /events-timeseries/ which has all the confidence information alongside the series, so we don't have to pass so many props along, but this seems reasonable for right now
nsdeschenes
added a commit
that referenced
this pull request
Mar 6, 2026
…dgets (#109941) Implement real confidence extraction for trace metrics widgets (replacing the previous TODO stub) and wire it into the dashboard widget card system. Key changes: - `traceMetricsWidgetQueries.tsx` now extracts confidence, dataScanned, sampleCount, and isSampled from timeseries results using `determineSeriesSampleCountAndIsSampled` and `combineConfidenceForSeries` - `WidgetCardConfidenceFooter` extended with `WidgetType.TRACEMETRICS` branch using the explore `MetricsConfidenceFooter` - `useWidgetRawCounts` extended to derive the correct `count(value,...)` aggregate from the widget's trace metric definition - `showConfidenceWarning` extended to include `WidgetType.TRACEMETRICS` in widget viewer modal and widget preview **Stack:** - PR 1: Spans confidence refactor (base: master) #109939 - **This PR** (base: PR 1) Made with [Cursor](https://cursor.com)
nsdeschenes
added a commit
that referenced
this pull request
Mar 6, 2026
…09940) Wire up `LogsWidgetQueries` for sampling-aware log widget queries and add logs confidence footer rendering to the dashboard widget card system. Key changes: - New `LogsWidgetQueries` component (mirrors `SpansWidgetQueries` pattern) that extracts confidence and sampling metadata from timeseries results - Logs routing added to `WidgetCardDataLoader` - `WidgetCardConfidenceFooter` extended with `WidgetType.LOGS` branch using the explore `LogsConfidenceFooter` - `useWidgetRawCounts` extended to fetch raw counts for the `ourlogs` dataset - `showConfidenceWarning` extended to include `WidgetType.LOGS` in widget viewer modal and widget preview **Stack:** - PR 1: Spans confidence refactor (base: master) #109939 - **This PR** (base: PR 1) Made with [Cursor](https://cursor.com) --------- Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extract the inline
ConfidenceFooterfromchart.tsxinto a dedicatedWidgetCardConfidenceFootercomponent and threaddataScannedthrough the widget query data pipeline alongside existing confidence/sampleCount props.This is a refactor that prepares the confidence footer infrastructure for reuse across multiple widget types (logs and trace metrics will follow in stacked PRs). Currently scoped to spans widgets only -- no behavior change for other widget types.
Key changes:
WidgetCardConfidenceFootercomponent that encapsulates the top-N calculation, series conversion, and sampling metadata logic previously inline inchart.tsxuseWidgetRawCountshook for fetching raw span countsdataScannedprop threaded throughgenericWidgetQueries->widgetCardChartContainer->chartuseRawCountsupdated to accept an optionalselectionprop for dashboard widget contextsStack:
Made with Cursor
Example:
