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

feat(spotlight): Stabilize embedded JS filename for external use #553

Merged
merged 1 commit into from
Nov 6, 2024

Conversation

BYK
Copy link
Member

@BYK BYK commented Nov 6, 2024

Fixes #552.

With this change one can now include Spotlight on any page locally from http://localhost:8969/assets/main.js (or wherever sidecar is running from).

Fixes #552.

With this change one can now include Spotlight on any page locally from `http://localhost:8969/assets/main.js` (or wherever sidecar is running from).
Copy link

vercel bot commented Nov 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
spotlightjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 6, 2024 2:22pm

showClearEventsButton = true,
initialEvents = undefined,
startFrom = undefined,
} = options;

const isLoadedFromSidecar = new URL(sidecarUrl).origin === document.location.origin;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[NOT RELATED TO THIS PR]

Looking at these, I think we can give the support of query params to users for changing config of spotlight when running overlay via sidecar url.
Something like 'localhost:8969?integrations=sentry,console&fullScreen=true'

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aha, pretty good idea! I wonder if we can do something similar with the Electron app too. For that we may have to fall back to config files :(

@BYK BYK merged commit dad649a into main Nov 6, 2024
13 checks passed
@BYK BYK deleted the byk/feat/self-include-script branch November 6, 2024 14:39
BYK pushed a commit that referenced this pull request Nov 26, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.


# Releases
## @spotlightjs/overlay@2.7.0

### Minor Changes

- Add request and module details to context with JSONViewer
([#544](#544))

- Add support for JSON-like queries (MongoDB) while improving span
details page a bit
    ([#563](#563))

- - Added copy filename button on error frame.
([#550](#550))
    -   changed styling of error frames.

- - Added subtabs in trace detail page
([#557](#557))

-   -   Sidecar url made generic to support all sidecar server routes.
        ([#558](#558))
    -   No use of static sidecar url.

### Patch Changes

- - changed route and added navigation in performance tab to make
queries tab default active.
        ([#555](#555))
    -   Fixed showing of 0 in false condition in span details.

- Fixed minor overlay trigger count issue
([#542](#542))

- - Fixed some conditional rendering in TraceIcon and SpanDetails which
was showing 0 on UI.
        ([#549](#549))
- Fixed routing for query summary page by encoding the query description
which can be a long text.

- Fix DB queries missing for some Sentry SDKs
([#547](#547))

## @spotlightjs/sidecar@1.9.0

### Minor Changes

-   -   Sidecar url made generic to support all sidecar server routes.
        ([#558](#558))
    -   No use of static sidecar url.

- Create a self-contained executable for Linux, macOS, and Windows for
Spotlight.
([#559](#559)) Docker images
now use these binaries instead of a Node build
    in the image.

### Patch Changes

- Fix hanging when another Spotlight server is running
([#571](#571))

## @spotlightjs/spotlight@2.6.0

### Minor Changes

- Add CLI banner for eye candy
([#568](#568))

- Add request and module details to context with JSONViewer
([#544](#544))

- Stabilize embedded JS file name for local includes
([#553](#553))

-   -   Sidecar url made generic to support all sidecar server routes.
        ([#558](#558))
    -   No use of static sidecar url.

- Create a self-contained executable for Linux, macOS, and Windows for
Spotlight.
([#559](#559)) Docker images
now use these binaries instead of a Node build
    in the image.

### Patch Changes

- Fix DB queries missing for some Sentry SDKs
([#547](#547))

- Fix hanging when another Spotlight server is running
([#571](#571))

-   Updated dependencies

\[[`4d1e07eda8e5ab04db2d1e6bb14aa823e2f5d4e0`](4d1e07e),

[`3ec99001202fd66a81486cc49a47452eb9e3e34b`](3ec9900),

[`2e4d90c369c6345b38c085cea89142647c4b6be2`](2e4d90c),

[`84f029db0e76f9295b38349f659457878df6924d`](84f029d),

[`ab5181c645bcee3ab42a4f28db4daab47b5852a5`](ab5181c),

[`7b9329c8c59a25cfe4cec7cbd9c6f231cf099220`](7b9329c),

[`6bd2937adfcd8721af6ccd5f031860691ce6e46f`](6bd2937),

[`aba5c072c59f3777c47832d1532d732237b1b9dd`](aba5c07),

[`1749cb3a06576a0d94f77f0831cd088045a762fb`](1749cb3),

[`5c0b1624bac267554d93bc81d17414159f0b9fe0`](5c0b162),

[`c88e50edd07c56c7368ff6788bbaa938e3f9f6b8`](c88e50e)]:
    -   @spotlightjs/overlay@2.7.0
    -   @spotlightjs/sidecar@1.9.0

## @spotlightjs/astro@2.1.12

### Patch Changes

-   Updated dependencies

\[[`378b5c186742cb30949e5ba6342bd799b4c82b08`](378b5c1),

[`2e4d90c369c6345b38c085cea89142647c4b6be2`](2e4d90c),

[`ab5181c645bcee3ab42a4f28db4daab47b5852a5`](ab5181c),

[`dad649a9f716d91be2665fd43f4d09497cde84c6`](dad649a),

[`1749cb3a06576a0d94f77f0831cd088045a762fb`](1749cb3),

[`5c0b1624bac267554d93bc81d17414159f0b9fe0`](5c0b162),

[`c88e50edd07c56c7368ff6788bbaa938e3f9f6b8`](c88e50e)]:
    -   @spotlightjs/spotlight@2.6.0

## @spotlightjs/electron@1.1.12

### Patch Changes

-   Updated dependencies

\[[`4d1e07eda8e5ab04db2d1e6bb14aa823e2f5d4e0`](4d1e07e),

[`3ec99001202fd66a81486cc49a47452eb9e3e34b`](3ec9900),

[`2e4d90c369c6345b38c085cea89142647c4b6be2`](2e4d90c),

[`84f029db0e76f9295b38349f659457878df6924d`](84f029d),

[`ab5181c645bcee3ab42a4f28db4daab47b5852a5`](ab5181c),

[`7b9329c8c59a25cfe4cec7cbd9c6f231cf099220`](7b9329c),

[`6bd2937adfcd8721af6ccd5f031860691ce6e46f`](6bd2937),

[`aba5c072c59f3777c47832d1532d732237b1b9dd`](aba5c07),

[`1749cb3a06576a0d94f77f0831cd088045a762fb`](1749cb3),

[`5c0b1624bac267554d93bc81d17414159f0b9fe0`](5c0b162),

[`c88e50edd07c56c7368ff6788bbaa938e3f9f6b8`](c88e50e)]:
    -   @spotlightjs/overlay@2.7.0
    -   @spotlightjs/sidecar@1.9.0

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the entrypoint JS usable by other pages
2 participants