Skip to content

fix: Not all console.error shows up in session replay play bar annotations #765

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

Open
wants to merge 1 commit into
base: v2
Choose a base branch
from

Conversation

ernestii
Copy link
Contributor

No description provided.

Copy link

changeset-bot bot commented Apr 19, 2025

⚠️ No Changeset found

Latest commit: 0c4f782

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Apr 19, 2025

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

Name Status Preview Comments Updated (UTC)
hyperdx-v2-oss-app ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 19, 2025 2:35am

@ernestii ernestii force-pushed the ernest/hdx-1457-bug-not-all-consoleerror-shows-up-in-session-replay-play-bar branch from 3a5abe8 to 0c4f782 Compare April 19, 2025 02:32
@teeohhem teeohhem requested a review from Copilot April 22, 2025 14:33
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses the issue of missing console.errors in session replay playbar annotations by updating the event filters and error detection conditions.

  • Updated the session subpanel filter to use allEventsFilter instead of filteredEventsFilter.
  • Added a console check in the playbar error detection logic.

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/app/src/SessionSubpanel.tsx Replaced filteredEventsFilter with allEventsFilter for more inclusive event filtering.
packages/app/src/Playbar.tsx Added an extra condition to detect events with component 'console' as errors.
Files not reviewed (1)
  • packages/app/styles/PlaybarSlider.module.scss: Language not supported
Comments suppressed due to low confidence (1)

packages/app/src/SessionSubpanel.tsx:368

  • [nitpick] The rename from filteredEventsFilter to allEventsFilter may indicate a broader filtering intent; consider adding inline comments if the behavior change is not immediately clear from the naming alone.
allEventsFilter,

@@ -75,6 +75,7 @@ export default function Playbar({
const isError =
event.severity_text?.toLowerCase() === 'error' ||
event.component === 'error' ||
event.component === 'console' ||
Copy link
Preview

Copilot AI Apr 22, 2025

Choose a reason for hiding this comment

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

Double-check whether the comparison to 'console' should include a case normalization (similar to the toLowerCase call for severity_text) to ensure that all variations of console errors are captured.

Suggested change
event.component === 'console' ||
event.component?.toLowerCase() === 'console' ||

Copilot is powered by AI, so mistakes are possible. Review output carefully before use.

@@ -379,7 +379,7 @@ export default function SessionSubpanel({
end,
whereLanguage,
searchedQuery,
filteredEventsFilter,
allEventsFilter,

Choose a reason for hiding this comment

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

@ernestii just curious here...what is filteredEventsFilter vs allEventsFilter and why does this work? Can you add a few comments for future devs?

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.

2 participants