top | item 38546520

Spotlight: Sentry for Development

145 points| coloneltcb | 2 years ago |spotlightjs.com | reply

78 comments

order
[+] kunwon1|2 years ago|reply
It seems to be getting more and more common to leave your git repository completely undocumented. If you're releasing a software project on github, I want to read about it on github.

A basic README that outlines what it does, how it does it, and basic syntax - this is really easy. Table stakes, I might say. I can checkout your repo and I have everything I need to work

[+] zeeg|2 years ago|reply
Don’t disagree, but technically the docs are in the same repo. Not easily consumed though.

We removed bits from the readme as it kept becoming duplicated and eventually wrong. I think that’s the usual reason folks like to avoid it. DRY and all.

[+] 1letterunixname|2 years ago|reply
It's a terrible habit. Documentation is a nonfunctional requirement. It should describe what is not obvious to someone new and the value of it. Without the conveyance of utility and purpose, all of a project's potential value goes to waste with foot-gunning accuracy.
[+] ren_engineer|2 years ago|reply
a lot of "open source" companies leave their repos bare so you are forced to go onto their website where they can better track and retarget you
[+] pb060|2 years ago|reply
May I suggest adding some additional context to the home page? While I heard about Sentry I find difficult to understand what Spotlight does. I might not be the intended target audience though.
[+] simonbarker87|2 years ago|reply
I agree and find this is the case for many projects like this. I read the homepage and have no idea what the tool does and why I might find it helpful, it wasn’t until I read the inset block on the “Getting Started” page for this one that I had even an inkling what it did.

Most of these types of home page seem to be written assuming I already know what their tool does.

[+] qxxx|2 years ago|reply
I also have no idea what it does. "Sentry for development", so it works like sentry but the errors are streamed to localhost??
[+] zeeg|2 years ago|reply
This seems to be a super shared point of view. I’ll admit we were a bit fire-and-forget on the homepage and definitely agree with all the feedback that we need to explain what it is better.
[+] Nthringas|2 years ago|reply
it looks to me like it covers the same funcionality as browser developer tools

but I am also pretty sure those are going away soon, which will mean the only way to inspect websites will be using tools like this (+ WASM binary formats + google controlled web-runtime[0] means the open web is not open anymore)

[0] https://thewebshowcase.withgoogle.com/bring-code-from-platfo...

[+] zeeg|2 years ago|reply
David from Sentry here. If yall have feedback around Spotlight we’d love to hear it. This is a passion project for a few of us and seemed like a natural fit for our technology, and becomes especially interesting with the service oriented world we all find ourselves in.
[+] patrick91|2 years ago|reply
I'd love to see this a replacement for django debug toolbar in future :D
[+] lol768|2 years ago|reply
Hey David! Few questions: I'm slightly stuck with the Vite plugin

Currently getting this when trying to do an npm run dev:

    [plugin externalize-deps] No known conditions for "./vite-plugin" entry in "@spotlightjs/sidecar" package
      The plugin "externalize-deps" was triggered by this import
    
        vite.config.ts:7:29:
          7 │ import spotlightSidecar from '@spotlightjs/sidecar/vite-plugin';
Should I be telling externalize-deps to leave it alone somehow?

Also, I note the PHP SDK has gotten support for Spotlight - are there plans to do the same for the .NET SDK too?

[+] paulirish|2 years ago|reply
I'm curious. I figure you considered building the UI as a DevTools extension; why 'd you go this in-page-DOM-overlay route instead?
[+] amccloud|2 years ago|reply
Does this new package impact devtools source and initiators in a way where everything is attributed to spotlight?
[+] freedomben|2 years ago|reply
Apologies if this is a dumb question, but is this related at all to the popular Sentry that captures stack traces and such?

It seems like it isn't, but I can't tell from looking through the website. If it's totally separate, that's a quite unfortunate namespace collision

[+] zeeg|2 years ago|reply
Its related in that we (Sentry) built it, and that it uses Sentry's open source SDKs to create its payloads, but its separate in that it doesnt require Sentry's monitoring service to work.

Hopefully that helps, and definitely something that is quite tough to clarify but we are still looking to improve upon.

Also added a ticket here to track this in case other folks have thoughts: https://github.com/getsentry/spotlight/issues/243

[+] simonw|2 years ago|reply
Feature request: documentation for running this with a Python web app. It looks to me like it should work - the Python Sentry library can presumably publish to the local Spotlight forwarder.

I don't have a npm/npx/etc build mechanism setup, so I'd appreciate instructions for running a separate web server to serve the UI, rather than running the UI integrated directly into my existing Python web application.

[+] zeeg|2 years ago|reply
Would a bundled JS asset work for the UI? Eg something from a CDN?

Feel free to add a GitHub issue with more details if that’s easier!

[+] waydegg|2 years ago|reply
>Spotlight is built that you don’t need Sentry to run it

Pretty cool that this is a feature. I was assuming you'd be required to use Sentry to use Spotlight.

[+] zeeg|2 years ago|reply
Yep- runs fully local! We had to make some small changes to our SDKs to support the sidecar, but a fundamental goal was that this was free software and valuable without the core Sentry service.
[+] naiv|2 years ago|reply
I am not sure if I fully understand the architecture.

Is the sidecar run on the server or in the client?

[+] zeeg|2 years ago|reply
Its run on your local device - its just a local devserver that allows Sentry's SDKs to pipe data to it. The overlay (the Spotlight UI) then connects to the sidecar via a Server-Sent Events stream (basically a pubsub HTTP stream which operates unidirectional - think websockets but simpler). This is needed due to the distributed nature of services, but our goal is to push this abstraction into dev servers, e.g. Vite.

Added a ticket to track improving the docs here: https://github.com/getsentry/spotlight/issues/242

[+] ripperdoc|2 years ago|reply
This doesn't seem to be it, but I always wondered if it would make sense to have an extension to the IDE that uses the aggregated data from Sentry to highlight lines of code that have caused errors or slowdowns.
[+] boothemoo|2 years ago|reply
Is it compatible with Sentry API (drop in replacement)?
[+] zeeg|2 years ago|reply
It leverages the sentry SDKs so not so much a replacement but something else that you can use during local development (vs sending this data to the Sentry dashboard which is a little odd in development).
[+] aestetix|2 years ago|reply
Why are so many software things written in node now? Seems that every new project I see, the installation begins with "npm install" :(
[+] zeeg|2 years ago|reply
In this case it makes sense: it’s a UI widget. We wrote the proxy also in Node just because you already likely needed JavaScript to install the UI component that it felt logical.

Aside, 2019 and onward JavaScript has become the largest and fastest growing ecosystem of developers.

To others feedback though there’s no reason we should force you to take a bundler running in your UI. We’re gonna fix that quickly.

[+] yewenjie|2 years ago|reply
Sorry, what does this do exactly? I have only cursory familiarity with Sentry and it's not obvious why would I want it.
[+] the_mitsuhiko|2 years ago|reply
It basically leverages the Sentry SDKs during development and sends them into a local UI rather than a production Sentry instance. It also shows the data in a way that's more akin to local development.
[+] zeeg|2 years ago|reply
“What sql queries did the api make that my react ui is talking to”

Makes it much easier to debug local systems during development.

Same kind of thing for errors- takes something that shows up in a console somewhere and brings it into a UI.

[+] zubairq|2 years ago|reply
Will give it a spin, always looking for better debug tools, thanks!
[+] pelagicAustral|2 years ago|reply
Looks interesting, but I'd rather die that npm-install anything on one of my webapps.
[+] kyawzazaw|2 years ago|reply
Spotlight has a pretty strong brand name for API dev tool - https://stoplight.io/

Could be confusion

[+] zeeg|2 years ago|reply
Stoplight vs Spotlight - names are going to names at the end of the day, but I’ll tell you I’ve personally not heard of that tool :')
[+] joshmanders|2 years ago|reply
Can we stop this? There's only so many names in this world and we're going to find overlap. If you're afraid of confusing two projects that are two completely separate things just because they share the same name, instead of reading what you're using, that's a you issue, not the projects.
[+] bdcravens|2 years ago|reply
In related news, there's concern that when you shuffle the name Tesla, it ends up being Least