Skip to content

fix(api): Hide internal trace attributes from discovery#116092

Draft
nsdeschenes wants to merge 1 commit into
nd/feat-attributes-visibility-corefrom
nd/feat-attributes-visibility-discovery
Draft

fix(api): Hide internal trace attributes from discovery#116092
nsdeschenes wants to merge 1 commit into
nd/feat-attributes-visibility-corefrom
nd/feat-attributes-visibility-discovery

Conversation

@nsdeschenes
Copy link
Copy Markdown
Contributor

Summary

  • Apply can_expose_attribute_to_api() filtering to OrganizationTraceItemAttributesEndpoint — internal attributes are excluded from attribute search, autocomplete, and aliased column listings
  • Apply the same filtering to OrganizationSpansFieldsEndpoint and EAPSpanFieldValuesAutocompletionExecutor — internal span fields and their values are hidden from non-staff users
  • Staff/superuser requests bypass the filter via include_internal=True

Depends on #116091

Test plan

  • New tests in test_organization_trace_item_attributes.py and test_organization_spans_fields.py verifying internal attributes are excluded from responses

Closes TODO

Filter internal Sentry convention attributes from trace item and span attribute discovery APIs unless the requester is staff or superuser.

Apply the same visibility checks to attribute value autocomplete and validation so hidden attributes are treated as unknown for regular users.
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant