-
-
Notifications
You must be signed in to change notification settings - Fork 32
feat(docs): improve onboarding clarity and remove deprecated overlay references #1219
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,53 +1,47 @@ | ||
| --- | ||
| title: Architecture of Spotlight | ||
| title: Architecture | ||
| description: How Spotlight works under the hood | ||
| --- | ||
| import { LinkCard } from '@astrojs/starlight/components'; | ||
| import { LinkCard, CardGrid } from '@astrojs/starlight/components'; | ||
|
|
||
| import Architecture from "../../../../public/images/simple-event-flow.png"; | ||
|
|
||
| <img src={Architecture.src} width="80%" alt="Spotlight Architecture" /> | ||
|
|
||
| ### Description | ||
| ## How It Works | ||
|
|
||
| At a high level, Spotlight consists of two components: | ||
| Spotlight consists of two components bundled in `@spotlightjs/spotlight`: | ||
|
|
||
| 1. A standalone UI (`@spotlightjs/overlay`) that runs independently in your browser or as a desktop application. The UI is a React application that displays your application's telemetry data in real-time. | ||
| 1. **Sidecar Server** - A local HTTP server that receives telemetry from your application and streams it to connected clients using [Server-Sent Events (SSE)](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events). | ||
|
|
||
| 2. A proxy server (`@spotlightjs/sidecar`) which receives telemetry from your application and streams it to the UI. This is achieved via a simple HTTP relay, allowing SDKs to push events to it, and allowing the UI to receive events using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events). | ||
| 2. **UI** - A React application that displays telemetry data in real-time. Available as a [Desktop App](/docs/desktop-app/) or browser-based UI at `localhost:8969`. | ||
|
|
||
| For convenience, these packages are combined in a single package (`@spotlightjs/spotlight`), which is the recommended way to run Spotlight. | ||
| This means that adoption in most projects is as simple as: | ||
| ## Data Flow | ||
|
|
||
| ```shell | ||
| # Run the Spotlight sidecar with UI | ||
| npx @spotlightjs/spotlight | ||
|
|
||
| # Or install globally | ||
| npm install -g @spotlightjs/spotlight | ||
| spotlight | ||
| ``` | ||
|
|
||
| Enabling Spotlight in your application's SDK: | ||
|
|
||
| ```typescript | ||
| import * as Sentry from '@sentry/node'; | ||
|
|
||
| // Enable Spotlight for development | ||
| Sentry.init({ | ||
| dsn: 'your-dsn', | ||
| spotlight: process.env.NODE_ENV === 'development', | ||
| }); | ||
| Your App → Sentry SDK → Sidecar (port 8969) → UI | ||
| ↓ | ||
| [In-memory store] | ||
| ↓ | ||
| Desktop App / Browser / MCP | ||
| ``` | ||
|
|
||
| Or simply set the environment variable: | ||
| 1. Your application sends telemetry via Sentry SDK | ||
| 2. Sidecar receives and stores events in memory | ||
betegon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| 3. Connected clients (UI, MCP) receive events via SSE | ||
| 4. Events are displayed in real-time | ||
|
|
||
| ```shell | ||
| export SENTRY_SPOTLIGHT=1 | ||
| ``` | ||
| ## Multiple Clients | ||
|
|
||
| You can send any kind of events to the Sidecar, it forwards them to the Spotlight UI where integrations process and display the data. | ||
| A single sidecar can serve multiple clients simultaneously: | ||
betegon marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - **Desktop App** - Dedicated window with built-in UI | ||
| - **Browser** - Web UI at `http://localhost:8969` | ||
| - **CLI** - Stream events to terminal with `spotlight tail` | ||
| - **MCP** - AI assistants query events via Model Context Protocol | ||
|
|
||
| <LinkCard title="Sidecar" description="Understand what the sidecar does" href="/docs/sidecar/" /> | ||
| ## Learn More | ||
|
|
||
| Spotlight by default has a Sentry integration, if you are using a Sentry SDK and enable the Spotlight connection (only required on the Server), Spotlight is able | ||
| to render Traces/Errors and more in your frontend. | ||
| <CardGrid> | ||
| <LinkCard title="Getting Started" href="/docs/setup/" description="Choose how to run Spotlight" /> | ||
| <LinkCard title="Sidecar Details" href="/docs/sidecar/" description="Configuration and SDK integration" /> | ||
| </CardGrid> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 0 additions & 25 deletions
25
packages/website/src/content/docs/docs/reference/sentry.mdx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.