-
Notifications
You must be signed in to change notification settings - Fork 333
feat: Add custom trace-level attributes above trace waterfall #1356
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
Conversation
🦋 Changeset detectedLatest commit: 31cb5e9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR Review - feat: Add custom trace-level attributes above trace waterfallCritical IssuesNone found Code Quality Issues
Observations
Recommendations
|
E2E Test Results✅ All tests passed • 39 passed • 3 skipped • 395s
|
|
|
||
| // Currently we can't distinguish null or 'null' | ||
| if (value === 'null') { | ||
| if (value == null || value === 'null') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSON column values were being returned as actual null values here, which then broke the value.length check below.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: it would be helpful to add examples in the comment (for null case)
c3a22b0 to
744024c
Compare
| React.useEffect(() => { | ||
| if ( | ||
| !areFiltersEqual(filters, parsedQuery.filters) && | ||
| Object.values(parsedQuery.filters).length > 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check was preventing us from clearing the filter state if all filters were removed from the URL params (which happens when changing sources due to clicking on an attribute from a different source)
| statusCodeExpression: String, | ||
| statusMessageExpression: String, | ||
| spanEventsValueExpression: String, | ||
| highlightedTraceAttributeExpressions: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does the ordering matter here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ordering of elements in this array? No I don't think it matters - the Event Tags are sorted before they're displayed client-side. Why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since it's an array type, it makes sense to sort them before deploying, or we can sort them during query time
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way we end up sorting them on the UI can depend on the values that are queried for each attribute and for each trace. There also should not be very many attributes (dozens at most, I would guess) so I don't think it should be any issue with sorting them on the client side when used.
wrn14897
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Closes HDX-2776 Closes HDX-2752 # Summary This PR extends the custom attributes feature from #1356 to support custom attributes on individual rows (rather than entire traces). Further, attributes which are URLs are now rendered as links, supporting use-cases which require building custom external links from queried data. ## Demo Source Configuration: <img width="972" height="649" alt="Screenshot 2025-11-18 at 6 01 55 PM" src="https://github.com/user-attachments/assets/42e9cc95-d9e3-4155-8e25-58e4dcf0b787" /> Side panel: <img width="1587" height="511" alt="Screenshot 2025-11-18 at 6 02 12 PM" src="https://github.com/user-attachments/assets/3a1d7683-eb79-4925-99fe-4e2d7cdad78f" /> Inferred link: <img width="727" height="173" alt="Screenshot 2025-11-18 at 6 02 32 PM" src="https://github.com/user-attachments/assets/68f42f95-598c-4b30-b616-9556e32945bf" /> <details> <summary>logview attribute definition</summary> ```sql if( NOT empty(TraceId) AND NOT empty(SpanId) AND NOT empty(ServiceName), concat('https://logview.com?q=', 'trace_id=', TraceId, '&span_id=', SpanId, '&service=', ServiceName, '&start_time=', formatDateTime(Timestamp - INTERVAL 1 SECOND, '%FT%T.%fZ'), '&end_time=', formatDateTime(Timestamp + Duration/1e9 + INTERVAL 1 SECOND, '%FT%T.%fZ') ), '' ) ``` </details>
Ref HDX-2752
Summary
This PR adds a new Source setting which specifies additional Span-Level attributes which should be displayed above the Trace Waterfall. The attributes may be specified for both Log and Trace kind sources.
These are displayed on the trace panel rather than at the top of the side panel because they are trace level (from any span in the trace), whereas the top of the side panel shows information specific to the span. In a followup PR, we'll add row-level attributes, which will appear at the top of the side panel.
Notes:
Demo
First, source is configured with highlighted attributes:

Values for those attributes within the trace show up on the trace panel above the waterfall:

Values are searchable when clicked, and if a lucene version of the property is provided, the lucene version will be used in the search box
