Skip to content

[JSON Type] Invalid queries generated in the service dashboard #1023

@Perseus

Description

@Perseus

After enabling the JSON columns for the logs/traces tables, there are a few places in the Services preset dashboards that are breaking due to invalid queries

  1. HTTP Service tab - Request Error Rate section (both overall and 'by endpoint')
Image
  1. The entire Database tab
Image
  1. Most time consuming operations + request error rate in the "details for span" sidepanel
Image

The errors are due to the way the fields are defined here - https://github.com/hyperdxio/hyperdx/blob/main/packages/app/src/serviceDashboard.ts#L14-L19 where the columns need to be accessed using the backtick syntax instead of the map-access syntax.

I believe a hacky fix is possible using the cache from getMetadata to extract the column types of the current table being queried, but I'm happy to raise a proper fix if the team can provide guidance on how distinction between JSON and non-JSON columns is planned while building these queries

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions