Skip to content

fix(json-type): add support for JSON columns in the service dashboard #1024

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

Merged
merged 7 commits into from
Aug 8, 2025

Conversation

Perseus
Copy link
Contributor

@Perseus Perseus commented Jul 26, 2025

Fixes #1023

  • Adds a useJsonColumns hook which returns the names of all JSON columns in a specific table
  • Modifies the syntax used to access attributes in the traces table based on the type of the column
  • Changes some coalesce(nullIf(...)) queries to access the fields directly due to ClickHouse not supporting NULLIF() on dynamic columns

Copy link

vercel bot commented Jul 26, 2025

@Perseus is attempting to deploy a commit to the HyperDX Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

changeset-bot bot commented Jul 28, 2025

⚠️ No Changeset found

Latest commit: aafbcf3

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

@Perseus Perseus force-pushed the fix/json-traces-service-queries branch from 8d62376 to 69ef750 Compare July 29, 2025 15:45
@Perseus
Copy link
Contributor Author

Perseus commented Aug 2, 2025

@wrn14897 @knudtty
Thanks for the review!

I've made a function to generalize the creation of coalesced queries based on both of your comments; it feels a little awkward since its building the queries manually and I've tried to keep the queries well-indented to make troubleshooting easier without adding significant amounts of whitespace, but it would be significantly easier if there was a standardized query builder (or I could also write a query builder specifically for this use-case if that sounds better).

I've addressed the remaining comments as well.

Perseus added 4 commits August 2, 2025 10:08
… method for filtering json columns

(refactor): create generalized method to build coalesced field selection queries
(refactor): address minor PR review comments
@Perseus Perseus force-pushed the fix/json-traces-service-queries branch from 59fa00e to bfff2fe Compare August 2, 2025 04:38
Copy link
Contributor

@knudtty knudtty left a comment

Choose a reason for hiding this comment

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

This is a great contribution! Thank you for the fix

Copy link

vercel bot commented Aug 8, 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 Aug 8, 2025 11:30am

@knudtty knudtty merged commit 82a3119 into hyperdxio:main Aug 8, 2025
11 of 13 checks passed
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.

[JSON Type] Invalid queries generated in the service dashboard
3 participants