Skip to content

feat(trace-details): Improve span attributes filtering in trace drawer #94917

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

gggritso
Copy link
Member

@gggritso gggritso commented Jul 4, 2025

Improve the span attributes filtering in the trace drawer details. Closes OPE-24

  1. Hide internal attributes from non-staff users
  2. Conditionally hide span attributes based on OTEL-friendly UI

gggritso added 2 commits July 4, 2025 11:58
… users

- Add useIsSentryEmployee hook to check if user is Sentry staff
- Filter out attributes starting with __sentry_internal for non-staff users
- Keep internal attributes visible for Sentry employees
- Update useMemo dependencies to include staff status
…-friendly UI flag

- Add useOTelFriendlyUI hook to check organization's OTEL-friendly UI setting
- When OTEL-friendly UI is enabled: hide span.description and span.op attributes
- When OTEL-friendly UI is disabled: hide span.name attribute
- Update useMemo dependencies to include OTEL-friendly UI flag
@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Jul 4, 2025
@gggritso gggritso requested a review from Abdkhan14 July 4, 2025 16:07
Copy link
Contributor

@Abdkhan14 Abdkhan14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me 🚢

Copy link

codecov bot commented Jul 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master   #94917   +/-   ##
=======================================
  Coverage   87.88%   87.88%           
=======================================
  Files       10447    10447           
  Lines      604279   604277    -2     
  Branches    23544    23544           
=======================================
  Hits       531081   531081           
+ Misses      72834    72832    -2     
  Partials      364      364           

@gggritso gggritso marked this pull request as ready for review July 4, 2025 17:44
@gggritso gggritso requested a review from a team as a code owner July 4, 2025 17:44
@gggritso gggritso merged commit 4ad0029 into master Jul 4, 2025
54 of 56 checks passed
@gggritso gggritso deleted the georgegritsouk/ope-24-replace-spanop-and-spandescription-with-spanname-in-trace branch July 4, 2025 17:44
andrewshie-sentry pushed a commit that referenced this pull request Jul 14, 2025
#94917)

Improve the span attributes filtering in the trace drawer details.
Closes OPE-24

1. Hide internal attributes from non-staff users
2. Conditionally hide span attributes based on OTEL-friendly UI
@github-actions github-actions bot locked and limited conversation to collaborators Jul 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants