You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/website/src/content/docs/about.mdx
+16-35Lines changed: 16 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,45 +13,26 @@ Spotlight started out as a [Hackweek project](https://syntax.fm/show/666/hackwee
13
13
> Spotlight is Sentry for Development. Inspired by an old project, Django Debug Toolbar, Spotlight brings a rich debug
14
14
overlay into development environments, and it does it by leveraging the existing power of Sentry's SDKs.
15
15
16
-
One of the great benefits of this approach is you get the power of Sentry's telemetry without needing to utilize Sentry's production monitoring. To added benefit, if you do decide you need production monitoring, you can simply configure the already-present SDKs with an upstream API key and you're off to the races!
16
+
You get the power of Sentry's telemetry (through its SDKs) without needing Sentry's production monitoring. If you already use Sentry, that's great. All you need is enabling Spotlight in your SDK and run Spotlight. If you are not using Sentry, you need to install the free and open source Sentry SDKs to get started. If you want to use Sentry later on, this saves you the initial setup. Just add your Sentry DSNs into your projects and off you go!
17
17
18
-
At a high level, Spotlight consists of two components:
18
+
Spotlight can show you errors, traces (including distributed traces), profiling data, configurations settings, installed dependencies, you name it. Spotlight is developed with customizablity in mind, so you can add your own integrations to it.
19
+
The main differences between Spotlight and Sentry are:
19
20
20
-
1. An overlay (`@spotlightjs/overlay`) that renders inside of your application. The overlay is a simple React application, and can
21
-
seamlessly run in any web application (or even independently!).
21
+
1. Spotlight runs locally on your system
22
+
2. Spotlight shows you everything and in realtime whereas Sentry is all about aggregation
23
+
3. Spotlight is completely free and open source, whereas Sentry is a commercial product (with a free tier and self-hosting options)
22
24
23
-
2. A proxy server (`@spotlightjs/sidecar`) which enables push-based communication to the overlay. This is achieved via a simple HTTP relay,
24
-
allowing SDKs to push events to it, and allowing the overlay to receive events using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events).
25
+
## Quick Start
25
26
26
-
For convenience, these packages are combined in a single package (`@spotlightjs/spotlight`), which is the recommended way to use Spotlight.
27
-
This means that adoption in most projects is as simple as adding a single dependency:
27
+
If you are already using Sentry SDKs in your application try the following:
28
28
29
-
```shell
30
-
npm add @spotlightjs/spotlight
31
-
```
29
+
1. Set `SENTRY_SPOTLIGHT=1` in your env[^1]
30
+
2. Run `npx @spotlightjs/spotlight`[^2]
31
+
3. Run your application
32
+
4. Go to [http://localhost:8969](http://localhost:8969)
33
+
5. Observe the traces and errors coming to your local Spotlight instance
32
34
33
-
Registering Spotlight in your frontend application:
34
-
35
-
```typescript
36
-
import*asSpotlightfrom'@spotlightjs/spotlight';
37
-
38
-
// only load Spotlight in dev
39
-
if (process.env.NODE_ENV==="development") {
40
-
Spotlight.init();
41
-
}
42
-
```
43
-
44
-
Running the sidecar in the background:
45
-
46
-
```shell
47
-
npx @spotlightjs/spotlight
48
-
```
49
-
50
-
The overlay itself behaves a little differently from Sentry. That's intentional both because this is for local
51
-
development, but also because the project is completely independent of Sentry (other than our guaranteed support).
52
-
53
-
Alternatively, we provide an Electron-based application that can be used to run the Sidecar as well as a dedicated instance of the overlay. There are some limitations to this method, but it is particularly useful [for headless or mobile environments](/setup/headless/).
54
-
55
-
<DownloadButton>Download for Mac</DownloadButton>
35
+
---
56
36
57
-
Spotlight can show you errors, traces, configurations settings, installed dependencies, you name it. Spotlight is developed with customizablity in mind, so you can add your own integrations to it.
37
+
[^1]: Currently Python, Ruby, PHP, and all JS-based SDKs support this env variable. If your choice of SDK doesn't support it, you can still use Spotlight by enabling the `spotlight` option in its init configuration. Also you can let us know of your interest and we'll add support for the env variable.
38
+
[^2]: If you don't have `npx` around, you can use `docker run -p 8969 ghcr.io/getsentry/spotlight:latest`, or head over to our [GitHub Releases page](https://github.com/getsentry/spotlight/releases/latest) and download a binary for your system. Alternatively, we provide an Electron-based application that can be used to run the Sidecar as well as a dedicated instance of the overlay. There are some limitations to this method, but it is particularly useful [for headless or mobile environments](/setup/headless/). <DownloadButton>Download for Mac</DownloadButton>
Spotlight consists of 2 main components. The UI that is embedded in your Website.
13
-
And a Sidecar (Proxy) that streams incoming events to the UI.
12
+
At a high level, Spotlight consists of two components:
13
+
14
+
1. An overlay (`@spotlightjs/overlay`) that renders inside of your application. The overlay is a simple React application, and can
15
+
seamlessly run in any web application (or even independently!).
16
+
17
+
2. A proxy server (`@spotlightjs/sidecar`) which enables push-based communication to the overlay. This is achieved via a simple HTTP relay,
18
+
allowing SDKs to push events to it, and allowing the overlay to receive events using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events).
19
+
20
+
For convenience, these packages are combined in a single package (`@spotlightjs/spotlight`), which is the recommended way to use Spotlight.
21
+
This means that adoption in most projects is as simple as adding a single dependency:
22
+
23
+
```shell
24
+
npm add @spotlightjs/spotlight
25
+
```
26
+
27
+
Registering Spotlight in your frontend application:
28
+
29
+
```typescript
30
+
import*asSpotlightfrom'@spotlightjs/spotlight';
31
+
32
+
// only load Spotlight in dev
33
+
if (process.env.NODE_ENV==="development") {
34
+
Spotlight.init();
35
+
}
36
+
```
14
37
15
38
You can send any kind of events to the Sidecar, it forwards it to Spotlight and the integrations within Spotlight need to understand what to do with it.
16
39
17
40
<LinkCardtitle="Sidecar"description="Understand what the sidecar does"href="/sidecar/" />
18
41
19
42
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
20
43
to render Traces/Errors and more in your frontend.
0 commit comments