Skip to content
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

Project-Based Filtering in Spotlight #397

Open
Shubhdeep12 opened this issue May 7, 2024 · 1 comment
Open

Project-Based Filtering in Spotlight #397

Shubhdeep12 opened this issue May 7, 2024 · 1 comment

Comments

@Shubhdeep12
Copy link
Collaborator

Shubhdeep12 commented May 7, 2024

Today, we are solely filtering local events in Spotlight using context. This is causing issues for users because events created from the server side are not recognized as local events, as Spotlight is initiated on the client side.

Additionally, we should provide users with the flexibility to filter events based on different projects while using Spotlight simultaneously.

Approach:

  • While sending event envelopes to the sidecar, we will include a header spotlight-project-id with a value set as a custom project_id by the user.
  • The Sidecar will store the project_id along with the envelope.
  • When the Spotlight overlay subscribes to the eventSource, an ID attached to every message event will correspond to the stored project_id.
  • Envelopes received in Spotlight will always have a project_id attached to them.

Changes to be done:

  • Spotlight Sidecar and Overlay

    • To accept the spotlight project_id while Spotlight.init
    • Provide filtering support.
    • Determine local events based on project_id.
    • Send data to the sidecar with project_id for browser-sent Sentry envelopes.
  • Sentry SDKs

    • To add projectId in options for SpotlightIntegration.
    • Send the header for project_id to the sidecar while sending envelopes.
@Shubhdeep12
Copy link
Collaborator Author

a branch for the POC - https://github.com/getsentry/spotlight/tree/feat/spotlight-project-id

Just need to send project_id while spotlight init
Also if running SDK locally then send the same project ID as a header with the key - spotlight-project-id to sidecar stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant