Skip to content

Conversation

@betegon
Copy link
Member

@betegon betegon commented Nov 7, 2025

This error what was exiting the program;
Screenshot 2025-11-07 at 15 28 04

This fixes it and also shows a better human output for ISO and UNIX timestamps

Before:
Screenshot 2025-11-07 at 15 29 23

Now:
Screenshot 2025-11-07 at 15 32 00

@vercel
Copy link

vercel bot commented Nov 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
spotlightjs Ready Ready Preview Comment Nov 7, 2025 2:32pm

Copy link
Member

@BYK BYK left a comment

Choose a reason for hiding this comment

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

Amazing patch, thank you so much!

Comment on lines +77 to +80
if (Number.isNaN(date.getTime())) {
// placeholder with same width as valid timestamp for alignment in the logs
return "??:??:??";
}
Copy link
Member

Choose a reason for hiding this comment

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

<3

const entry = registry[eventType];
const event = payload as SentryEvent;
if (!entry.typeGuard(event)) {
logger.warn(`Skipping event: type guard failed for ${eventType} (event.type=${(event as any).type})`);
Copy link
Member

Choose a reason for hiding this comment

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

It'd be good to dump the event using logger.debug(utils.inspect(event)) and/or sending this to Sentry for inspection

Comment on lines +21 to +24
const hasValidType = !event.type || ERROR_EVENT_TYPES.has(event.type);
const hasException = Boolean((event as SentryErrorEvent).exception);
const hasMessage = Boolean((event as SentryErrorEvent).message);
return hasValidType && (hasException || hasMessage);
Copy link
Member

Choose a reason for hiding this comment

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

Keep in mind that this version is less performant than the one you replaced as it doesn't "short circut". Might become an issue under heavy load, otherwise impact should be insignificant.

@BYK BYK merged commit 0942c8a into main Nov 7, 2025
20 checks passed
@BYK BYK deleted the bete/fix/formatter-invalid-type branch November 7, 2025 20:22
BYK pushed a commit that referenced this pull request Nov 10, 2025
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/[email protected]

### Minor Changes

- Docker compose support for Spotlight run command
([#1108](#1108))

- Added support for Last-Event-Id in SSE stream
([#1104](#1104))

- Change tool names: change `.` for `_` and remove `spotlight` preffix
([#1114](#1114))

- Improved human formatter readability
([#1112](#1112))

### Patch Changes

- Fix breaking error when event type is not supported
([#1111](#1111))

- Fix SDK categorization for Next.js by using User-Agent headers to
distinguish browser from server events
([#1110](#1110))

## @spotlightjs/[email protected]

### Patch Changes

- Updated dependencies
\[[`0942c8a`](0942c8a),
[`bce012e`](bce012e),
[`7624030`](7624030),
[`15a7f41`](15a7f41),
[`13da542`](13da542),
[`b3a654a`](b3a654a)]:
    -   @spotlightjs/[email protected]
    -   @spotlightjs/[email protected]

## @spotlightjs/[email protected]

### Patch Changes

- Fix SDK categorization for Next.js by using User-Agent headers to
distinguish browser from server events
([#1110](#1110))

- Updated dependencies
\[[`0942c8a`](0942c8a),
[`bce012e`](bce012e),
[`7624030`](7624030),
[`15a7f41`](15a7f41),
[`13da542`](13da542),
[`b3a654a`](b3a654a)]:
    -   @spotlightjs/[email protected]
    -   @spotlightjs/[email protected]

Co-authored-by: github-actions[bot] <41898282+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.

3 participants