Skip to content
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

Add support for kind, status, instrumentation library, links, events and state data for traces #1043

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

benceszikora
Copy link

This PR adds support for the kind, status, instrumentation library, links, events and state fields in the trace panel in Grafana. This will bring the plugin to feature parity with what Tempo can offer today.

@CLAassistant
Copy link

CLAassistant commented Nov 1, 2024

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@SpencerTorres SpencerTorres left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution! Glad to see expanded functionality for the trace columns. I've added a note regarding the intended table schema

@@ -49,6 +49,13 @@ const otel129: OtelVersion = {
[ColumnHint.TraceTags, 'SpanAttributes'],
[ColumnHint.TraceServiceTags, 'ResourceAttributes'],
[ColumnHint.TraceStatusCode, 'StatusCode'],
[ColumnHint.TraceKind, 'SpanKind'],
[ColumnHint.TraceStatusMessage, 'StatusMessage'],
[ColumnHint.TraceInstrumentationLibraryName, 'InstrumentationLibraryName'],
Copy link
Collaborator

Choose a reason for hiding this comment

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

I noticed theres a few columns defined in otel.ts that don't exist on the ClickHouse OTel exporter default schema. The intent of these definitions is to match as closely as possible to this table schema for a better out of the box experience.

Should we look into adding these columns to the otel exporter?

Also note that State is defined too, but on the table it is called TraceState.

@Sup3rGeo
Copy link

Sup3rGeo commented Nov 7, 2024

Also AFAIU In the default schema Links is a Nested table and you need to select the fields individually:

 arrayMap(
  (traceid, spanid, attributes) -> tuple(
                     traceid,
                     spanid,
                     arrayMap(
                       key -> map('key', key, 'value', attributes[key]),
                       mapKeys(attributes)
                     )
                   )::Tuple(traceID String, spanID String, tags Array(Map(String, String)))
                   , Links.TraceId, Links.SpanId, Links.Attributes
  ) AS references

@jwhitaker-gridcog
Copy link

Also AFAIU In the default schema Links is a Nested table and you need to select the fields individually

@Sup3rGeo not disputing the table schema, but arrayMap(l -> ..., Links) does work here - is it possible this is a newer clickhouse feature?

@SpencerTorres @benceszikora is it worth splitting the bits of this PR that can work with the current schema into something that's mergeable now? In my case I'm itching for span events to be supported, and this achieves that out of the box which is really nice.

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.

5 participants