Skip to content

[Feature Request] JSON schema support for Kubernetes Dashboard and Metrics (Currently beta) #2087

@doyong365

Description

@doyong365

I am currently using the OpenTelemetry Collector ClickHouse exporter with the json: true configuration (enabling the beta JSON schema).

While I noticed that PR #1605 recently added JSON schema support for the "Kubernetes Warning Events" table, I am still facing issues with other parts of the Kubernetes Dashboard and Metrics Explorer because they do not fully support the JSON schema yet.

Specifically, the metric bucketing queries fail because they strictly expect Map type attributes: Function mapConcat requires at least one argument of type Map: In scope Source. (This occurs because the backend generates a query using cityHash64(mapConcat(ScopeAttributes, ResourceAttributes, Attributes)) which fails when these columns are JSON instead of Map(String, String)).

I understand that the JSON schema is currently in beta and might not be fully supported across all dashboards yet. However, reverting to the Map schema and dropping all existing data is not an ideal workaround for my use case.

I would like to see full JSON schema support across the entire HyperDX UI, specifically:

  1. Metrics Queries: Update the bucketing logic (e.g., in packages/common-utils/src/core/renderChartConfig.ts or histogram.ts) to dynamically handle JSON attribute columns without throwing mapConcat errors, similar to how it was fixed for K8s events.
  2. Kubernetes Dashboard: Ensure all panels in the Kubernetes dashboard can render data correctly when BETA_CH_OTEL_JSON_SCHEMA_ENABLED is active.

The only current alternative is to disable the beta JSON schema, drop the existing otel_logs and otel_metrics_* tables, and revert to the Map schema. This results in data loss and prevents us from using the benefits of the JSON schema.

  1. Are there any existing plans or an ETA to fully support the JSON schema across all dashboards and metric queries?
  2. If no one is currently working on this, would you be open to a PR from me to help implement this fix? I would be happy to follow up and contribute the necessary changes to support JSON metric queries if the core team is open to it.

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