Skip to content

fix(traceVisQuery): Select lower(SpanKind) for compatibility with PeerService visualization#1736

Draft
jSwanson99 wants to merge 1 commit intografana:mainfrom
jSwanson99:jswanson/grafana
Draft

fix(traceVisQuery): Select lower(SpanKind) for compatibility with PeerService visualization#1736
jSwanson99 wants to merge 1 commit intografana:mainfrom
jSwanson99:jswanson/grafana

Conversation

@jSwanson99
Copy link
Copy Markdown

@jSwanson99 jSwanson99 commented Mar 20, 2026

Type of Change

Please check the relevant option.

  • 🚀 Feature
  • 🐛 Bug Fix
  • 📝 Documentation
  • 🧹 Refactor / Chore

Bug Fix

What is the bug?

The grafana trace vis expect SpanKind to be in lowercase, and not providing it in lowercase results in your client spans not being recognized as client spans. Here is where its checked: TraceTimelineViewer/utils.tsx

The reason why its useful for this check to be accurate, is because the PeerService functionality requires the SpanKind of the associated span to be client. See attached images to see what this functionality is. Here's where the vis cares about SpanKind VirtualizedTraceView.tsx

How to reproduce

  1. Using clickhouse datasource, load a client span with span.attributes['peer.service'] set to 'foo'
  2. Observe the UI doesn't react
  3. Using tempo datasource, load a client span with span.attributes['peer.service'] set to 'foo'
  4. Observe some nice eye candy

Environment (if no related issue)

If there is no open issue, please specify the versions where the bug occurs.

  • ClickHouse version: clickhouse/clickhouse-server:26.1.1.912
  • Grafana version: Grafana v12.3.0 (20051fb1fc)
  • Plugin version: Not sure where to find this. if someone comments where this is, I'll update this

Screenshots / Videos

Please provide screenshots or videos demonstrating the bug or the feature working. This helps reviewers understand the change visually and speeds up the review process.

Before:
image

After:
image

Its a small change that's quite helpful when you don't own the service which you are calling


Please check that:

  • Tests for this change have been added/updated.
  • Documentation has been added/updated (where applicable).

I'd say docs update is not applicable. Its a feature of otel https://opentelemetry.io/docs/specs/semconv/registry/attributes/peer/

Special notes for your reviewer

Use this section for any additional information that may help the reviewer, such as implementation decisions, areas of concern, or context that doesn't fit elsewhere. If you'd like to request review or feedback on a specific part of your changes, please note that here.

@cla-assistant
Copy link
Copy Markdown

cla-assistant bot commented Mar 20, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Incoming

Development

Successfully merging this pull request may close these issues.

1 participant