Skip to content

Conversation

@pulpdrew
Copy link
Contributor

@pulpdrew pulpdrew commented Dec 5, 2025

Closes #1449
Closes HDX-2992

Summary

This PR prevents HyperDX from issuing an invalid query (described in #1449) by disabling the query for sessions when a trace ID is not available. This often happened not just for events without a trace ID but also immediately after opening the side panel while a valid traceId was still loading.

Updating the types to reflect the possibility that trace ID is undefined also exposed the fact that we try to show the trace waterfall and row overview panels on the trace panel even when there is no trace id. This has been fixed.

Before

Screen.Recording.2025-12-05.at.9.50.43.AM.mov

After

No invalid query is issued:

Screen.Recording.2025-12-05.at.9.51.51.AM.mov

When there is no trace id, we don't attempt to render the waterfall:
Screenshot 2025-12-05 at 10 02 14 AM

@changeset-bot
Copy link

changeset-bot bot commented Dec 5, 2025

🦋 Changeset detected

Latest commit: c0c72d4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@hyperdx/app Patch
@hyperdx/api Patch

Not sure what this means? Click here to learn what changesets are.

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

@vercel
Copy link

vercel bot commented Dec 5, 2025

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

Project Deployment Preview Comments Updated (UTC)
hyperdx-v2-oss-app Ready Ready Preview Comment Dec 5, 2025 4:35pm

@claude
Copy link

claude bot commented Dec 5, 2025

Code Review

✅ No critical issues found.

The changes correctly handle the case where traceId is undefined:

  • Type safety improved: Updated traceId parameter to traceId?: string in relevant components
  • Query properly disabled: The useSessionId hook now checks for both source and traceId before building config, preventing invalid queries
  • UI guards added: Waterfall and overview panels only render when traceId is present
  • Good defensive coding: The fix addresses both missing trace IDs and the loading state race condition

The implementation follows existing patterns in the codebase and properly uses TypeScript's type system to make the undefined state explicit.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 5, 2025

E2E Test Results

All tests passed • 46 passed • 3 skipped • 336s

Status Count
✅ Passed 46
❌ Failed 0
⚠️ Flaky 0
⏭️ Skipped 3

View full report →

@pulpdrew pulpdrew force-pushed the drew/disable-useSessionId-for-undefined-traceId branch from e0991cf to 2ae4f87 Compare December 5, 2025 15:04
@pulpdrew pulpdrew requested review from a team and brandon-pereira and removed request for a team December 5, 2025 15:16
@kodiakhq kodiakhq bot merged commit 7c391df into main Dec 5, 2025
9 checks passed
@kodiakhq kodiakhq bot deleted the drew/disable-useSessionId-for-undefined-traceId branch December 5, 2025 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] DB::Exception: Value nan cannot be parsed as Int64 for query parameter 'HYPERDX_PARAM_78043'

3 participants