Skip to content

Commit 07392d2

Browse files
authored
feat: Add clickpy_link to clickpy trace source attributes (#1392)
Closes HDX-2876 # Summary This PR adds a highlighted trace attribute to the clickpy demo source which allows demo environment users to navigate to the clickpy dashboard which is associated with a trace. The link appears: <img width="1369" height="738" alt="Screenshot 2025-11-20 at 10 53 35 AM" src="https://github.com/user-attachments/assets/f353323a-9619-4ba8-a44a-586a0fafd748" /> The link navigates the user to the appropriate dashboard: <img width="2307" height="806" alt="Screenshot 2025-11-20 at 10 53 43 AM" src="https://github.com/user-attachments/assets/5c10592d-9a8e-44fa-a2ac-d01230b77745" />
1 parent 5b7d646 commit 07392d2

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.changeset/orange-donuts-mate.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@hyperdx/app": patch
3+
---
4+
5+
feat: Add clickpy_link to clickpy trace source attributes

packages/app/src/components/OnboardingModal.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ async function addOtelDemoSources({
3838
traceSourceDatabaseName,
3939
traceSourceName,
4040
traceSourceTableName,
41+
traceSourceHighlightedTraceAttributes,
4142
}: {
4243
connectionId: string;
4344
createSourceMutation: ReturnType<typeof useCreateSource>;
@@ -59,6 +60,7 @@ async function addOtelDemoSources({
5960
traceSourceDatabaseName: string;
6061
traceSourceName: string;
6162
traceSourceTableName: string;
63+
traceSourceHighlightedTraceAttributes?: TSource['highlightedTraceAttributeExpressions'];
6264
}) {
6365
const hasLogSource =
6466
logSourceDatabaseName && logSourceName && logSourceTableName;
@@ -116,6 +118,8 @@ async function addOtelDemoSources({
116118
statusCodeExpression: 'StatusCode',
117119
statusMessageExpression: 'StatusMessage',
118120
spanEventsValueExpression: 'Events',
121+
highlightedTraceAttributeExpressions:
122+
traceSourceHighlightedTraceAttributes,
119123
},
120124
});
121125
let metricsSource: TSource | undefined;
@@ -300,6 +304,13 @@ export default function OnboardingModal({
300304
traceSourceDatabaseName: 'otel_clickpy',
301305
traceSourceName: 'ClickPy Traces',
302306
traceSourceTableName: 'otel_traces',
307+
traceSourceHighlightedTraceAttributes: [
308+
{
309+
sqlExpression:
310+
"if((SpanAttributes['http.route']) LIKE '%dashboard%', concat('https://clickpy.clickhouse.com', path(SpanAttributes['http.target'])), '')",
311+
alias: 'clickpy_link',
312+
},
313+
],
303314

304315
updateSourceMutation,
305316
});

0 commit comments

Comments
 (0)