@@ -6,7 +6,7 @@ import { notifications } from '@mantine/notifications';
6
6
import { ConnectionForm } from '@/components/ConnectionForm' ;
7
7
import { IS_LOCAL_MODE } from '@/config' ;
8
8
import { useConnections , useCreateConnection } from '@/connection' ;
9
- import { useCreateSource , useSources } from '@/source' ;
9
+ import { useCreateSource , useSources , useUpdateSource } from '@/source' ;
10
10
11
11
import { TableSourceForm } from './SourceForm' ;
12
12
@@ -39,6 +39,7 @@ export default function OnboardingModal({
39
39
40
40
const createSourceMutation = useCreateSource ( ) ;
41
41
const createConnectionMutation = useCreateConnection ( ) ;
42
+ const updateSourceMutation = useUpdateSource ( ) ;
42
43
43
44
return (
44
45
< Modal
@@ -94,9 +95,9 @@ export default function OnboardingModal({
94
95
connection : {
95
96
id : 'local' ,
96
97
name : 'Demo' ,
97
- host : 'https://demo-ch.hyperdx.io ' ,
98
- username : 'demo ' ,
99
- password : 'demo ' ,
98
+ host : 'https://sql-clickhouse.clickhouse.com ' ,
99
+ username : 'otel_demo ' ,
100
+ password : '' ,
100
101
} ,
101
102
} ) ;
102
103
const metricsSource = await createSourceMutation . mutateAsync ( {
@@ -105,7 +106,7 @@ export default function OnboardingModal({
105
106
name : 'Demo Metrics' ,
106
107
connection : 'local' ,
107
108
from : {
108
- databaseName : 'default ' ,
109
+ databaseName : 'otel_v2 ' ,
109
110
tableName : '' ,
110
111
} ,
111
112
timestampValueExpression : 'TimeUnix' ,
@@ -127,7 +128,7 @@ export default function OnboardingModal({
127
128
name : 'Demo Traces' ,
128
129
connection : 'local' ,
129
130
from : {
130
- databaseName : 'default ' ,
131
+ databaseName : 'otel_v2 ' ,
131
132
tableName : 'otel_traces' ,
132
133
} ,
133
134
timestampValueExpression : 'Timestamp' ,
@@ -147,6 +148,7 @@ export default function OnboardingModal({
147
148
logSourceId : 'l-758211293' ,
148
149
statusCodeExpression : 'StatusCode' ,
149
150
statusMessageExpression : 'StatusMessage' ,
151
+ spanEventsValueExpression : 'Events' ,
150
152
metricSourceId : metricsSource . id ,
151
153
} ,
152
154
} ) ;
@@ -156,7 +158,7 @@ export default function OnboardingModal({
156
158
name : 'Demo Logs' ,
157
159
connection : 'local' ,
158
160
from : {
159
- databaseName : 'default ' ,
161
+ databaseName : 'otel_v2 ' ,
160
162
tableName : 'otel_logs' ,
161
163
} ,
162
164
timestampValueExpression : 'TimestampTime' ,
@@ -171,6 +173,13 @@ export default function OnboardingModal({
171
173
spanIdExpression : 'SpanId' ,
172
174
implicitColumnExpression : 'Body' ,
173
175
metricSourceId : metricsSource . id ,
176
+ displayedTimestampValueExpression : 'Timestamp' ,
177
+ } ,
178
+ } ) ;
179
+ await updateSourceMutation . mutateAsync ( {
180
+ source : {
181
+ ...metricsSource ,
182
+ logSourceId : logSource . id ,
174
183
} ,
175
184
} ) ;
176
185
const sessionSource = await createSourceMutation . mutateAsync ( {
@@ -179,7 +188,7 @@ export default function OnboardingModal({
179
188
name : 'Demo Sessions' ,
180
189
connection : 'local' ,
181
190
from : {
182
- databaseName : 'default ' ,
191
+ databaseName : 'otel_v2 ' ,
183
192
tableName : 'hyperdx_sessions' ,
184
193
} ,
185
194
timestampValueExpression : 'TimestampTime' ,
@@ -195,6 +204,13 @@ export default function OnboardingModal({
195
204
implicitColumnExpression : 'Body' ,
196
205
} ,
197
206
} ) ;
207
+ await updateSourceMutation . mutateAsync ( {
208
+ source : {
209
+ ...traceSource ,
210
+ logSourceId : logSource . id ,
211
+ sessionSourceId : sessionSource . id ,
212
+ } ,
213
+ } ) ;
198
214
notifications . show ( {
199
215
title : 'Success' ,
200
216
message : 'Connected to HyperDX demo server.' ,
0 commit comments