feat(attributes): Hide internal attributes from responses#116084
feat(attributes): Hide internal attributes from responses#116084nsdeschenes wants to merge 10 commits into
Conversation
Add a shared helper for hiding internal Sentry convention attributes from API surfaces and let SearchResolver track attributes hidden by API visibility configuration. This keeps default resolver behavior unchanged unless an API caller opts into visibility enforcement.
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.
Apply EAP API visibility checks to trace item stats, ranked attribute comparisons, trace item detail serialization, exports, and RPC table/stat responses. Hidden attributes in query filters now return empty results instead of broadening the query for regular users.
|
@cursor review |
|
@sentry review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 4f7ea65. Configure here.
Apply API attribute visibility checks when the events endpoint queries RPC datasets. This prevents non-staff users from selecting internal attributes with field params and receiving their values. Co-Authored-By: OpenAI Codex <noreply@openai.com>
Apply the same API attribute visibility checks to the events-timeseries RPC path. Return an empty timeseries response instead of querying hidden internal attributes for non-staff users. Co-Authored-By: OpenAI Codex <noreply@openai.com>
|
@cursor review |
|
@sentry review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit cc7183e. Configure here.
Return empty timeseries metadata when API visibility hides requested attributes, and type resolver visibility options explicitly so backend typing accepts the config calls. Co-Authored-By: Codex <noreply@openai.com>
Rename the hidden-attribute metadata variable so mypy does not see two typed definitions for final_meta in the same function scope. Co-Authored-By: Codex <codex@openai.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f3513ce. Configure here.
Propagate hidden API attribute markers from cross-trace resolvers back to the primary resolver so table and bulk table queries return empty results instead of dispatching RPCs. Resolve cross-trace query visibility using the target trace item type for span, log, metric, and occurrence filters. Add regression coverage for non-staff cross-trace filters on internal span and log attributes. Co-Authored-By: Codex <noreply@openai.com>
Add regression coverage that cross-trace occurrence filters resolve API attribute visibility with the occurrence item type instead of the primary spans item type. Co-Authored-By: Codex <noreply@openai.com>
Use the trace item type from the resolver's column definitions for API attribute visibility checks. This keeps dataset-specific resolvers from applying a mismatched primary request item type. Add coverage for log resolvers receiving a spans visibility config. Co-Authored-By: Codex <noreply@openai.com>

The goal of this PR is to hide internal attributes from API responses to non-staff users. This visibility is controlled via the
visibilityfield from the conventions package.TODO
Closes EXP-966