Skip to content

Commit 9c981a6

Browse files
committed
feat(helm): add traces dashboard and OTEL_SERVICE_NAME to agent and operator
Add OTEL_SERVICE_NAME env var to agent DaemonSet and operator Deployment, extraEnv support to both, imp-traces Grafana dashboard (Tempo/TraceQL), and grafana.tempo.datasourceUid value.
1 parent d67c45b commit 9c981a6

5 files changed

Lines changed: 344 additions & 0 deletions

File tree

Lines changed: 327 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,327 @@
1+
{
2+
"uid": "imp-traces-v1",
3+
"title": "Imp microVM Traces",
4+
"tags": ["imp", "microvm", "traces"],
5+
"refresh": "30s",
6+
"schemaVersion": 38,
7+
"version": 1,
8+
"templating": {
9+
"list": [
10+
{
11+
"current": {},
12+
"hide": 0,
13+
"includeAll": false,
14+
"multi": false,
15+
"name": "tempo_datasource",
16+
"options": [],
17+
"query": "tempo",
18+
"refresh": 1,
19+
"type": "datasource",
20+
"label": "Tempo"
21+
}
22+
]
23+
},
24+
"panels": [
25+
{
26+
"collapsed": false,
27+
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 0},
28+
"id": 100,
29+
"title": "VM Lifecycle",
30+
"type": "row"
31+
},
32+
{
33+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
34+
"fieldConfig": {"defaults": {}, "overrides": []},
35+
"gridPos": {"h": 10, "w": 24, "x": 0, "y": 1},
36+
"id": 1,
37+
"options": {
38+
"dedupStrategy": "none",
39+
"sortBy": [{"displayName": "Start time", "desc": true}]
40+
},
41+
"targets": [
42+
{
43+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
44+
"queryType": "traceql",
45+
"query": "{name=\"agent.impvm.start\"}",
46+
"refId": "A",
47+
"limit": 20
48+
}
49+
],
50+
"title": "VM Boot (operator\u2192agent)",
51+
"type": "traces"
52+
},
53+
{
54+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
55+
"fieldConfig": {"defaults": {}, "overrides": []},
56+
"gridPos": {"h": 10, "w": 12, "x": 0, "y": 11},
57+
"id": 2,
58+
"options": {
59+
"dedupStrategy": "none",
60+
"sortBy": [{"displayName": "Start time", "desc": true}]
61+
},
62+
"targets": [
63+
{
64+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
65+
"queryType": "traceql",
66+
"query": "{name=\"agent.impvm.stop\"}",
67+
"refId": "A",
68+
"limit": 20
69+
}
70+
],
71+
"title": "VM Stop",
72+
"type": "traces"
73+
},
74+
{
75+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
76+
"fieldConfig": {"defaults": {}, "overrides": []},
77+
"gridPos": {"h": 10, "w": 12, "x": 12, "y": 11},
78+
"id": 3,
79+
"options": {
80+
"dedupStrategy": "none",
81+
"sortBy": [{"displayName": "Start time", "desc": true}]
82+
},
83+
"targets": [
84+
{
85+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
86+
"queryType": "traceql",
87+
"query": "{name=\"agent.impvm.reattach\"}",
88+
"refId": "A",
89+
"limit": 20
90+
}
91+
],
92+
"title": "VM Reattach",
93+
"type": "traces"
94+
},
95+
{
96+
"collapsed": false,
97+
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 21},
98+
"id": 101,
99+
"title": "Operator Reconcilers",
100+
"type": "row"
101+
},
102+
{
103+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
104+
"fieldConfig": {"defaults": {}, "overrides": []},
105+
"gridPos": {"h": 10, "w": 12, "x": 0, "y": 22},
106+
"id": 4,
107+
"options": {
108+
"dedupStrategy": "none",
109+
"sortBy": [{"displayName": "Start time", "desc": true}]
110+
},
111+
"targets": [
112+
{
113+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
114+
"queryType": "traceql",
115+
"query": "{name=\"operator.impvm.reconcile\"}",
116+
"refId": "A",
117+
"limit": 20
118+
}
119+
],
120+
"title": "ImpVM Reconcile",
121+
"type": "traces"
122+
},
123+
{
124+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
125+
"fieldConfig": {"defaults": {}, "overrides": []},
126+
"gridPos": {"h": 10, "w": 12, "x": 12, "y": 22},
127+
"id": 5,
128+
"options": {
129+
"dedupStrategy": "none",
130+
"sortBy": [{"displayName": "Start time", "desc": true}]
131+
},
132+
"targets": [
133+
{
134+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
135+
"queryType": "traceql",
136+
"query": "{name=\"operator.impnetwork.reconcile\"}",
137+
"refId": "A",
138+
"limit": 20
139+
}
140+
],
141+
"title": "ImpNetwork Reconcile",
142+
"type": "traces"
143+
},
144+
{
145+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
146+
"fieldConfig": {"defaults": {}, "overrides": []},
147+
"gridPos": {"h": 10, "w": 12, "x": 0, "y": 32},
148+
"id": 6,
149+
"options": {
150+
"dedupStrategy": "none",
151+
"sortBy": [{"displayName": "Start time", "desc": true}]
152+
},
153+
"targets": [
154+
{
155+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
156+
"queryType": "traceql",
157+
"query": "{name=\"operator.impvmmigration.reconcile\"}",
158+
"refId": "A",
159+
"limit": 20
160+
}
161+
],
162+
"title": "Migration Reconcile",
163+
"type": "traces"
164+
},
165+
{
166+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
167+
"fieldConfig": {"defaults": {}, "overrides": []},
168+
"gridPos": {"h": 10, "w": 12, "x": 12, "y": 32},
169+
"id": 7,
170+
"options": {
171+
"dedupStrategy": "none",
172+
"sortBy": [{"displayName": "Start time", "desc": true}]
173+
},
174+
"targets": [
175+
{
176+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
177+
"queryType": "traceql",
178+
"query": "{name=\"operator.impvmsnapshot.reconcile\"}",
179+
"refId": "A",
180+
"limit": 20
181+
}
182+
],
183+
"title": "Snapshot Reconcile",
184+
"type": "traces"
185+
},
186+
{
187+
"collapsed": false,
188+
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 42},
189+
"id": 102,
190+
"title": "Agent Operations",
191+
"type": "row"
192+
},
193+
{
194+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
195+
"fieldConfig": {"defaults": {}, "overrides": []},
196+
"gridPos": {"h": 10, "w": 8, "x": 0, "y": 43},
197+
"id": 8,
198+
"options": {
199+
"dedupStrategy": "none",
200+
"sortBy": [{"displayName": "Start time", "desc": true}]
201+
},
202+
"targets": [
203+
{
204+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
205+
"queryType": "traceql",
206+
"query": "{name=\"agent.impvm.rootfs_build\"}",
207+
"refId": "A",
208+
"limit": 20
209+
}
210+
],
211+
"title": "Rootfs Build",
212+
"type": "traces"
213+
},
214+
{
215+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
216+
"fieldConfig": {"defaults": {}, "overrides": []},
217+
"gridPos": {"h": 10, "w": 8, "x": 8, "y": 43},
218+
"id": 9,
219+
"options": {
220+
"dedupStrategy": "none",
221+
"sortBy": [{"displayName": "Start time", "desc": true}]
222+
},
223+
"targets": [
224+
{
225+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
226+
"queryType": "traceql",
227+
"query": "{name=\"agent.impvm.firecracker_launch\"}",
228+
"refId": "A",
229+
"limit": 20
230+
}
231+
],
232+
"title": "Firecracker Launch",
233+
"type": "traces"
234+
},
235+
{
236+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
237+
"fieldConfig": {"defaults": {}, "overrides": []},
238+
"gridPos": {"h": 10, "w": 8, "x": 16, "y": 43},
239+
"id": 10,
240+
"options": {
241+
"dedupStrategy": "none",
242+
"sortBy": [{"displayName": "Start time", "desc": true}]
243+
},
244+
"targets": [
245+
{
246+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
247+
"queryType": "traceql",
248+
"query": "{name=\"agent.impvm.snapshot\"}",
249+
"refId": "A",
250+
"limit": 20
251+
}
252+
],
253+
"title": "VM Snapshot",
254+
"type": "traces"
255+
},
256+
{
257+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
258+
"fieldConfig": {"defaults": {}, "overrides": []},
259+
"gridPos": {"h": 10, "w": 12, "x": 0, "y": 53},
260+
"id": 11,
261+
"options": {
262+
"dedupStrategy": "none",
263+
"sortBy": [{"displayName": "Start time", "desc": true}]
264+
},
265+
"targets": [
266+
{
267+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
268+
"queryType": "traceql",
269+
"query": "{name=\"agent.impvm.vtep_register\"}",
270+
"refId": "A",
271+
"limit": 20
272+
}
273+
],
274+
"title": "VTEP Register",
275+
"type": "traces"
276+
},
277+
{
278+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
279+
"fieldConfig": {"defaults": {}, "overrides": []},
280+
"gridPos": {"h": 10, "w": 12, "x": 12, "y": 53},
281+
"id": 12,
282+
"options": {
283+
"dedupStrategy": "none",
284+
"sortBy": [{"displayName": "Start time", "desc": true}]
285+
},
286+
"targets": [
287+
{
288+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
289+
"queryType": "traceql",
290+
"query": "{name=\"agent.impvm.fdb_sync\"}",
291+
"refId": "A",
292+
"limit": 20
293+
}
294+
],
295+
"title": "FDB Sync",
296+
"type": "traces"
297+
},
298+
{
299+
"collapsed": false,
300+
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 63},
301+
"id": 103,
302+
"title": "Errors",
303+
"type": "row"
304+
},
305+
{
306+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
307+
"fieldConfig": {"defaults": {}, "overrides": []},
308+
"gridPos": {"h": 10, "w": 24, "x": 0, "y": 64},
309+
"id": 13,
310+
"options": {
311+
"dedupStrategy": "none",
312+
"sortBy": [{"displayName": "Start time", "desc": true}]
313+
},
314+
"targets": [
315+
{
316+
"datasource": {"type": "tempo", "uid": "${tempo_datasource}"},
317+
"queryType": "traceql",
318+
"query": "{status=error}",
319+
"refId": "A",
320+
"limit": 20
321+
}
322+
],
323+
"title": "All Error Spans",
324+
"type": "traces"
325+
}
326+
]
327+
}

charts/imp/templates/agent/daemonset.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,13 @@ spec:
4545
valueFrom:
4646
fieldRef:
4747
fieldPath: status.hostIP
48+
- name: OTEL_SERVICE_NAME
49+
value: imp-agent
4850
- name: FC_KERNEL
4951
value: {{ .Values.agent.env.kernelPath | required "agent.env.kernelPath is required" | quote }}
52+
{{- with .Values.agent.extraEnv }}
53+
{{- toYaml . | nindent 8 }}
54+
{{- end }}
5055
ports:
5156
- name: metrics
5257
containerPort: 9090

charts/imp/templates/grafana/dashboard.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ metadata:
1010
data:
1111
imp-overview.json: |-
1212
{{ .Files.Get "dashboards/imp-overview.json" | indent 4 }}
13+
imp-traces.json: |-
14+
{{ .Files.Get "dashboards/imp-traces.json" | indent 4 }}
1315
{{- end }}

charts/imp/templates/operator/deployment.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@ spec:
3535
- name: operator
3636
image: {{ include "imp.operator.image" . }}
3737
imagePullPolicy: {{ .Values.operator.image.pullPolicy }}
38+
env:
39+
- name: OTEL_SERVICE_NAME
40+
value: imp-operator
41+
{{- with .Values.operator.extraEnv }}
42+
{{- toYaml . | nindent 8 }}
43+
{{- end }}
3844
args:
3945
- --leader-elect
4046
- --health-probe-bind-address=:8081

charts/imp/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ operator:
1717
nodeSelector: {}
1818
rbac:
1919
cniDetection: minimal
20+
extraEnv: []
2021

2122
agent:
2223
image:
@@ -37,6 +38,7 @@ agent:
3738
maxUnavailable: 1
3839
env:
3940
kernelPath: ""
41+
extraEnv: []
4042
hostPaths:
4143
socketDir:
4244
# enabled: true ensures sockets survive agent pod restarts (required for
@@ -69,3 +71,5 @@ grafana:
6971
key: grafana_dashboard
7072
value: "1"
7173
namespace: ""
74+
tempo:
75+
datasourceUid: "" # optional: pre-fill the Tempo datasource UID

0 commit comments

Comments
 (0)