Skip to content

Conversation

@yanatha99
Copy link
Contributor

Description

Replace singular "Error filter" with new Span status filter that can filter for : Error, OK, or Unset statuses.

  • Created SpanStatusFilter new component with popover containing selectable status filters. If there are multiple status filters selected ANDs them together, which follows established "Meta data" filtering behavior for trace details
  • Updated applySpanFilters util to handle all span statuses, not just Error. Uses the same logic as the span detail flyout for determining Ok and Error. Just uses the span.status.code directly for determining Unset, so there can be overlap between Unset and Error or Unset and Ok, but that is expected.
  • Removed "Error filter" component and related logic from TraceDetailTabs
  • Added SpanStatusFilter to SpanHierarchyTable secondary toolbar

Issues Resolved

Screenshot

Old behavior with "Error filter"
span-error-filter

New behavior with added functionality from Span status filter
span-status-filter

Testing the changes

  1. Go to details page of trace with at least one error span
  2. Click the "Filter by status" button to open popover with filter options
  3. Select the "Unset" status filter
  4. For each span still shown in table check its "Raw span" in the "Span details" panel and validate that "status": { "code": "UNSET" } is present
  5. Unselect the filter and select the "Error" status filter in the popover
  6. Validate that the only spans shown have the error alert in "Span" column
  7. Unselect the filter and select the "Ok" status filter in the popover
  8. Validate that the only spans shown do not have error alert in "Span" column
  9. Try mixing and matching the status filters and verify the expected spans show e.g. if "Error" and "Ok" filters selected there should be no spans, as there is no overlap between those two statuses
  10. Try mixing the status filters with the "Meta data" filters from "Span details" panel and verify the expected spans show
  11. Try removing the status filters by unselecting option in the "Filter by status" popover, dismissing the filter badge, and clearing all filters.
  12. While changing the status filters make sure the count next to "Filter by status" accurately represents the number of selected status filters

Changelog

  • feat: Add span status filters to trace details

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@yanatha99
Copy link
Contributor Author

Required follow ups to this change:

  1. Confirm with UX if we want to keep the selected filter count to the right of "Filter by status" but with increased spacing from the "Service legend" or if we want to move that count to the left of "Filter by status"
  2. Discovered pre-existing behavior where adding filters that exclude currently selected span does not unselect that span. This needs to be fixed as it is more apparent with the status filters than with other filters. Will also need to add a "No selected span" empty state to "Span details" panel if there isn't already one.

@yanatha99 yanatha99 mentioned this pull request Oct 17, 2025
7 tasks
@codecov
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

❌ Patch coverage is 63.49206% with 23 lines in your changes missing coverage. Please review.
✅ Project coverage is 60.47%. Comparing base (464dfe2) to head (9bdf598).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...c/traces/span_detail_tables/span_status_filter.tsx 57.50% 16 Missing and 1 partial ⚠️
...lication/pages/traces/trace_details/trace_view.tsx 20.00% 2 Missing and 2 partials ⚠️
...race_details/public/traces/ppl_resolve_helpers.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10742   +/-   ##
=======================================
  Coverage   60.46%   60.47%           
=======================================
  Files        4482     4483    +1     
  Lines      120061   120107   +46     
  Branches    19884    19897   +13     
=======================================
+ Hits        72596    72631   +35     
- Misses      42425    42435   +10     
- Partials     5040     5041    +1     
Flag Coverage Δ
Linux_1 26.58% <ø> (ø)
Linux_2 38.82% <ø> (ø)
Linux_3 39.04% <ø> (+<0.01%) ⬆️
Linux_4 33.24% <63.49%> (+0.02%) ⬆️
Windows_1 26.59% <ø> (ø)
Windows_2 38.79% <ø> (ø)
Windows_3 39.04% <ø> (ø)
Windows_4 33.24% <63.49%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@yanatha99 yanatha99 force-pushed the traces-timeline-waterfall branch from f0bcadc to 9bdf598 Compare October 17, 2025 05:01
@yanatha99
Copy link
Contributor Author

yanatha99 commented Oct 17, 2025

Codecov Report

❌ Patch coverage is 63.49206% with 23 lines in your changes missing coverage. Please review. ✅ Project coverage is 60.47%. Comparing base (464dfe2) to head (9bdf598).

Files with missing lines Patch % Lines
...c/traces/span_detail_tables/span_status_filter.tsx 57.50% 16 Missing and 1 partial ⚠️
...lication/pages/traces/trace_details/trace_view.tsx 20.00% 2 Missing and 2 partials ⚠️
...race_details/public/traces/ppl_resolve_helpers.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files

@@           Coverage Diff           @@
##             main   #10742   +/-   ##
=======================================
  Coverage   60.46%   60.47%           
=======================================
  Files        4482     4483    +1     
  Lines      120061   120107   +46     
  Branches    19884    19897   +13     
=======================================
+ Hits        72596    72631   +35     
- Misses      42425    42435   +10     
- Partials     5040     5041    +1     

Flag Coverage Δ
Linux_1 26.58% <ø> (ø)
Linux_2 38.82% <ø> (ø)
Linux_3 39.04% <ø> (+<0.01%) ⬆️
Linux_4 33.24% <63.49%> (+0.02%) ⬆️
Windows_1 26.59% <ø> (ø)
Windows_2 38.79% <ø> (ø)
Windows_3 39.04% <ø> (ø)
Windows_4 33.24% <63.49%> (+0.01%) ⬆️
Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry. 📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:

  • For span_status_filter.tsx improved in Trace:Details Add span status filters. Combine bug fixes. #10745.
  • For trace_view.tsx not much to cover there that wouldn't be redundant with existing tests
  • For ppl_resolve_helpers.tsx the only added function is just a negation of the existing isSpanError function that already has test coverage

@yanatha99
Copy link
Contributor Author

Just a reminder: DO NOT merge this PR. Merge #10745 instead.

@TackAdam TackAdam closed this Oct 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants