getsentry / getsentry/sentry

API endpoint and UI to list/audit all attachments across a project or Org

Open
#106,883 4 comments 1 reaction 0 assignees View on GitHub
API Platform Feature Product Area: APIs Waiting for: Product Owner
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
21h 10m
Merged PRs (30d)
635

Description

### Problem Statement

## Problem

Organizations uploading attachments to Sentry currently have no way to get a centralized view of all attachments being uploaded across their projects.

### Current Limitations

1. **No bulk API endpoint** - The only attachment API requires a specific `event_id`:
GET /api/0/projects/{org}/{project}/events/{event_id}/attachments/

There's no way to list all attachments for a project or organization without first knowing which events have attachments.

2. **No UI dashboard** - Attachments can only be viewed on individual issue detail pages. There's no "Attachments" overview or audit page.

3. **On the overview page, there should be source attribution** - When attachments appear, users should be able to easily trace which SDK, service, or code path generated them.

### Use Cases

- **Debugging unexpected uploads**: A user reported uploading "a lot of attachments" but cannot identify their source across multiple services
- **Cost management**: Attachments count toward data quotas; teams need visibility to optimize usage
- **Compliance/auditing**: Organizations need to audit what data is being sent to third-party services
- **Operational visibility**: DevOps teams need to monitor attachment streams for anomalies

### User Feedback

> "We are uploading a lot of attachments to Sentry but it's not obvious what their source is. I am currently assessing our services to see if I can uncover who/what/where these are coming from, but I am hoping that Sentry has some way of inspecting the uploaded attachments stream? It would be very helpful to be able to see _what_ is uploaded to Sentry, in Sentry.

### Solution Brainstorm

## Proposed Solutions

### Option 1: New API Endpoint
Add a project-level attachments listing endpoint:

GET /api/0/projects/{org}/{project}/attachments/

With support for:
- Pagination
- Date range filtering
- Filtering by attachment type/name
- Returns: attachment metadata, associated event_id, issue, timestamp, size

### Option 2: UI Dashboard
Add an "Attachments" section in Project Settings or a dedicated page showing:
- Recent attachment uploads (table view)
- Aggregate stats (count, total size, by type)
- Filtering/search capabilities
- Links to associated events/issues

### Option 3: Enhanced Metadata
Store and expose additional metadata with attachments:
- SDK name/version that uploaded it
- Release/environment context
- Custom tags for source identification

### Product Area

APIs

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing event-scoped attachments endpoint, GET /api/0/projects/{org}/{project}/events/{event_id}/attachments/, and compare it with the proposed project-level endpoint. Done requires a decided scope for the API, dashboard, filtering, pagination, and source metadata rather than the current set of brainstormed options.

Written by the indexing model from the issue text.

Assessment

Domain
api, frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.