@mnemom/aip-otel-exporter 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +172 -0
  2. package/dashboards/README.md +92 -0
  3. package/dashboards/datadog-aip-overview.json +311 -0
  4. package/dashboards/grafana-aip-detail.json +403 -0
  5. package/dashboards/grafana-aip-overview.json +431 -0
  6. package/dist/attributes.d.ts +70 -0
  7. package/dist/attributes.d.ts.map +1 -0
  8. package/dist/attributes.js +81 -0
  9. package/dist/attributes.js.map +1 -0
  10. package/dist/auto/aap-instrumentation.d.ts +23 -0
  11. package/dist/auto/aap-instrumentation.d.ts.map +1 -0
  12. package/dist/auto/aap-instrumentation.js +112 -0
  13. package/dist/auto/aap-instrumentation.js.map +1 -0
  14. package/dist/auto/aip-instrumentation.d.ts +22 -0
  15. package/dist/auto/aip-instrumentation.d.ts.map +1 -0
  16. package/dist/auto/aip-instrumentation.js +87 -0
  17. package/dist/auto/aip-instrumentation.js.map +1 -0
  18. package/dist/auto/index.d.ts +20 -0
  19. package/dist/auto/index.d.ts.map +1 -0
  20. package/dist/auto/index.js +22 -0
  21. package/dist/auto/index.js.map +1 -0
  22. package/dist/index.d.ts +33 -0
  23. package/dist/index.d.ts.map +1 -0
  24. package/dist/index.js +58 -0
  25. package/dist/index.js.map +1 -0
  26. package/dist/manual/record-coherence.d.ts +12 -0
  27. package/dist/manual/record-coherence.d.ts.map +1 -0
  28. package/dist/manual/record-coherence.js +21 -0
  29. package/dist/manual/record-coherence.js.map +1 -0
  30. package/dist/manual/record-drift.d.ts +14 -0
  31. package/dist/manual/record-drift.d.ts.map +1 -0
  32. package/dist/manual/record-drift.js +48 -0
  33. package/dist/manual/record-drift.js.map +1 -0
  34. package/dist/manual/record-integrity-check.d.ts +19 -0
  35. package/dist/manual/record-integrity-check.d.ts.map +1 -0
  36. package/dist/manual/record-integrity-check.js +92 -0
  37. package/dist/manual/record-integrity-check.js.map +1 -0
  38. package/dist/manual/record-verification.d.ts +14 -0
  39. package/dist/manual/record-verification.d.ts.map +1 -0
  40. package/dist/manual/record-verification.js +40 -0
  41. package/dist/manual/record-verification.js.map +1 -0
  42. package/dist/manual/span-builder.d.ts +28 -0
  43. package/dist/manual/span-builder.d.ts.map +1 -0
  44. package/dist/manual/span-builder.js +42 -0
  45. package/dist/manual/span-builder.js.map +1 -0
  46. package/dist/metrics/integrity-metrics.d.ts +44 -0
  47. package/dist/metrics/integrity-metrics.d.ts.map +1 -0
  48. package/dist/metrics/integrity-metrics.js +128 -0
  49. package/dist/metrics/integrity-metrics.js.map +1 -0
  50. package/dist/types.d.ts +205 -0
  51. package/dist/types.d.ts.map +1 -0
  52. package/dist/types.js +8 -0
  53. package/dist/types.js.map +1 -0
  54. package/dist/workers/index.d.ts +8 -0
  55. package/dist/workers/index.d.ts.map +1 -0
  56. package/dist/workers/index.js +7 -0
  57. package/dist/workers/index.js.map +1 -0
  58. package/dist/workers/otlp-serializer.d.ts +90 -0
  59. package/dist/workers/otlp-serializer.d.ts.map +1 -0
  60. package/dist/workers/otlp-serializer.js +133 -0
  61. package/dist/workers/otlp-serializer.js.map +1 -0
  62. package/dist/workers/workers-exporter.d.ts +26 -0
  63. package/dist/workers/workers-exporter.d.ts.map +1 -0
  64. package/dist/workers/workers-exporter.js +228 -0
  65. package/dist/workers/workers-exporter.js.map +1 -0
  66. package/package.json +83 -0
@@ -0,0 +1,403 @@
1
+ {
2
+ "__inputs": [
3
+ {
4
+ "name": "DS_PROMETHEUS",
5
+ "label": "Prometheus",
6
+ "description": "",
7
+ "type": "datasource",
8
+ "pluginId": "prometheus",
9
+ "pluginName": "Prometheus"
10
+ }
11
+ ],
12
+ "__requires": [
13
+ {
14
+ "type": "grafana",
15
+ "id": "grafana",
16
+ "name": "Grafana",
17
+ "version": "10.0.0"
18
+ },
19
+ {
20
+ "type": "datasource",
21
+ "id": "prometheus",
22
+ "name": "Prometheus",
23
+ "version": "1.0.0"
24
+ },
25
+ {
26
+ "type": "panel",
27
+ "id": "timeseries",
28
+ "name": "Time series",
29
+ "version": ""
30
+ },
31
+ {
32
+ "type": "panel",
33
+ "id": "table",
34
+ "name": "Table",
35
+ "version": ""
36
+ },
37
+ {
38
+ "type": "panel",
39
+ "id": "stat",
40
+ "name": "Stat",
41
+ "version": ""
42
+ },
43
+ {
44
+ "type": "panel",
45
+ "id": "barchart",
46
+ "name": "Bar chart",
47
+ "version": ""
48
+ }
49
+ ],
50
+ "id": null,
51
+ "uid": "aip-otel-detail",
52
+ "title": "AIP Integrity Detail (Per Agent)",
53
+ "description": "Per-agent deep-dive dashboard for AIP integrity checks. Select an agent_id to view detailed integrity data.",
54
+ "tags": ["aip", "integrity", "otel", "detail"],
55
+ "timezone": "browser",
56
+ "editable": true,
57
+ "graphTooltip": 1,
58
+ "refresh": "30s",
59
+ "schemaVersion": 39,
60
+ "version": 1,
61
+ "time": {
62
+ "from": "now-6h",
63
+ "to": "now"
64
+ },
65
+ "templating": {
66
+ "list": [
67
+ {
68
+ "name": "agent_id",
69
+ "type": "query",
70
+ "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
71
+ "query": "label_values(aip_integrity_checks_total, agent_id)",
72
+ "refresh": 2,
73
+ "includeAll": false,
74
+ "current": {},
75
+ "multi": false,
76
+ "sort": 1
77
+ }
78
+ ]
79
+ },
80
+ "panels": [
81
+ {
82
+ "title": "Summary",
83
+ "type": "row",
84
+ "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 },
85
+ "collapsed": false,
86
+ "panels": []
87
+ },
88
+ {
89
+ "title": "Total Checks",
90
+ "type": "stat",
91
+ "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
92
+ "gridPos": { "h": 4, "w": 6, "x": 0, "y": 1 },
93
+ "fieldConfig": {
94
+ "defaults": {
95
+ "color": { "mode": "thresholds" },
96
+ "thresholds": {
97
+ "mode": "absolute",
98
+ "steps": [{ "color": "blue", "value": null }]
99
+ }
100
+ },
101
+ "overrides": []
102
+ },
103
+ "options": {
104
+ "colorMode": "background",
105
+ "graphMode": "area",
106
+ "justifyMode": "auto",
107
+ "orientation": "auto",
108
+ "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
109
+ "textMode": "auto"
110
+ },
111
+ "targets": [
112
+ {
113
+ "expr": "sum(increase(aip_integrity_checks_total{agent_id=\"$agent_id\"}[$__range]))",
114
+ "legendFormat": "Total",
115
+ "refId": "A"
116
+ }
117
+ ]
118
+ },
119
+ {
120
+ "title": "Clear Verdicts",
121
+ "type": "stat",
122
+ "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
123
+ "gridPos": { "h": 4, "w": 6, "x": 6, "y": 1 },
124
+ "fieldConfig": {
125
+ "defaults": {
126
+ "color": { "mode": "thresholds" },
127
+ "thresholds": {
128
+ "mode": "absolute",
129
+ "steps": [{ "color": "green", "value": null }]
130
+ }
131
+ },
132
+ "overrides": []
133
+ },
134
+ "options": {
135
+ "colorMode": "background",
136
+ "graphMode": "area",
137
+ "justifyMode": "auto",
138
+ "orientation": "auto",
139
+ "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
140
+ "textMode": "auto"
141
+ },
142
+ "targets": [
143
+ {
144
+ "expr": "sum(increase(aip_integrity_checks_total{agent_id=\"$agent_id\", verdict=\"clear\"}[$__range]))",
145
+ "legendFormat": "Clear",
146
+ "refId": "A"
147
+ }
148
+ ]
149
+ },
150
+ {
151
+ "title": "Review Needed",
152
+ "type": "stat",
153
+ "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
154
+ "gridPos": { "h": 4, "w": 6, "x": 12, "y": 1 },
155
+ "fieldConfig": {
156
+ "defaults": {
157
+ "color": { "mode": "thresholds" },
158
+ "thresholds": {
159
+ "mode": "absolute",
160
+ "steps": [{ "color": "yellow", "value": null }]
161
+ }
162
+ },
163
+ "overrides": []
164
+ },
165
+ "options": {
166
+ "colorMode": "background",
167
+ "graphMode": "area",
168
+ "justifyMode": "auto",
169
+ "orientation": "auto",
170
+ "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
171
+ "textMode": "auto"
172
+ },
173
+ "targets": [
174
+ {
175
+ "expr": "sum(increase(aip_integrity_checks_total{agent_id=\"$agent_id\", verdict=\"review_needed\"}[$__range]))",
176
+ "legendFormat": "Review needed",
177
+ "refId": "A"
178
+ }
179
+ ]
180
+ },
181
+ {
182
+ "title": "Boundary Violations",
183
+ "type": "stat",
184
+ "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
185
+ "gridPos": { "h": 4, "w": 6, "x": 18, "y": 1 },
186
+ "fieldConfig": {
187
+ "defaults": {
188
+ "color": { "mode": "thresholds" },
189
+ "thresholds": {
190
+ "mode": "absolute",
191
+ "steps": [{ "color": "red", "value": null }]
192
+ }
193
+ },
194
+ "overrides": []
195
+ },
196
+ "options": {
197
+ "colorMode": "background",
198
+ "graphMode": "area",
199
+ "justifyMode": "auto",
200
+ "orientation": "auto",
201
+ "reduceOptions": { "calcs": ["lastNotNull"], "fields": "", "values": false },
202
+ "textMode": "auto"
203
+ },
204
+ "targets": [
205
+ {
206
+ "expr": "sum(increase(aip_integrity_checks_total{agent_id=\"$agent_id\", verdict=\"boundary_violation\"}[$__range]))",
207
+ "legendFormat": "Boundary violations",
208
+ "refId": "A"
209
+ }
210
+ ]
211
+ },
212
+ {
213
+ "title": "Integrity Ratio Timeline",
214
+ "type": "timeseries",
215
+ "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
216
+ "gridPos": { "h": 8, "w": 24, "x": 0, "y": 5 },
217
+ "fieldConfig": {
218
+ "defaults": {
219
+ "color": { "mode": "thresholds" },
220
+ "thresholds": {
221
+ "mode": "absolute",
222
+ "steps": [
223
+ { "color": "red", "value": null },
224
+ { "color": "orange", "value": 0.7 },
225
+ { "color": "yellow", "value": 0.85 },
226
+ { "color": "green", "value": 0.95 }
227
+ ]
228
+ },
229
+ "custom": {
230
+ "axisBorderShow": false,
231
+ "axisCenteredZero": false,
232
+ "axisLabel": "Integrity ratio",
233
+ "drawStyle": "line",
234
+ "fillOpacity": 15,
235
+ "lineInterpolation": "smooth",
236
+ "lineWidth": 2,
237
+ "pointSize": 5,
238
+ "showPoints": "auto",
239
+ "spanNulls": false,
240
+ "thresholdsStyle": { "mode": "area" }
241
+ },
242
+ "min": 0,
243
+ "max": 1,
244
+ "unit": "percentunit"
245
+ },
246
+ "overrides": []
247
+ },
248
+ "options": {
249
+ "legend": { "displayMode": "list", "placement": "bottom" },
250
+ "tooltip": { "mode": "single" }
251
+ },
252
+ "targets": [
253
+ {
254
+ "expr": "histogram_quantile(0.5, sum(rate(aip_window_integrity_ratio_bucket{agent_id=\"$agent_id\"}[5m])) by (le))",
255
+ "legendFormat": "p50 integrity ratio",
256
+ "refId": "A"
257
+ },
258
+ {
259
+ "expr": "histogram_quantile(0.05, sum(rate(aip_window_integrity_ratio_bucket{agent_id=\"$agent_id\"}[5m])) by (le))",
260
+ "legendFormat": "p5 integrity ratio",
261
+ "refId": "B"
262
+ }
263
+ ]
264
+ },
265
+ {
266
+ "title": "Concerns",
267
+ "type": "row",
268
+ "gridPos": { "h": 1, "w": 24, "x": 0, "y": 13 },
269
+ "collapsed": false,
270
+ "panels": []
271
+ },
272
+ {
273
+ "title": "Concern Categories Over Time",
274
+ "type": "timeseries",
275
+ "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
276
+ "gridPos": { "h": 8, "w": 24, "x": 0, "y": 14 },
277
+ "fieldConfig": {
278
+ "defaults": {
279
+ "color": { "mode": "palette-classic" },
280
+ "custom": {
281
+ "axisBorderShow": false,
282
+ "axisCenteredZero": false,
283
+ "axisLabel": "Concerns",
284
+ "drawStyle": "bars",
285
+ "fillOpacity": 80,
286
+ "lineWidth": 1,
287
+ "stacking": { "group": "A", "mode": "normal" }
288
+ }
289
+ },
290
+ "overrides": []
291
+ },
292
+ "options": {
293
+ "legend": { "displayMode": "table", "placement": "right", "calcs": ["sum"] },
294
+ "tooltip": { "mode": "multi", "sort": "desc" }
295
+ },
296
+ "targets": [
297
+ {
298
+ "expr": "sum by (category) (increase(aip_concerns_total{agent_id=\"$agent_id\"}[5m]))",
299
+ "legendFormat": "{{category}}",
300
+ "refId": "A"
301
+ }
302
+ ]
303
+ },
304
+ {
305
+ "title": "History",
306
+ "type": "row",
307
+ "gridPos": { "h": 1, "w": 24, "x": 0, "y": 22 },
308
+ "collapsed": false,
309
+ "panels": []
310
+ },
311
+ {
312
+ "title": "Verdict History",
313
+ "description": "Recent integrity check verdicts for the selected agent. Shows verdict, concern count, integrity ratio, and analysis duration.",
314
+ "type": "table",
315
+ "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
316
+ "gridPos": { "h": 8, "w": 12, "x": 0, "y": 23 },
317
+ "fieldConfig": {
318
+ "defaults": {},
319
+ "overrides": [
320
+ {
321
+ "matcher": { "id": "byName", "options": "verdict" },
322
+ "properties": [
323
+ {
324
+ "id": "custom.cellOptions",
325
+ "value": {
326
+ "type": "color-text"
327
+ }
328
+ },
329
+ {
330
+ "id": "mappings",
331
+ "value": [
332
+ { "type": "value", "options": { "clear": { "color": "green", "text": "Clear" } } },
333
+ { "type": "value", "options": { "review_needed": { "color": "yellow", "text": "Review Needed" } } },
334
+ { "type": "value", "options": { "boundary_violation": { "color": "red", "text": "Boundary Violation" } } }
335
+ ]
336
+ }
337
+ ]
338
+ }
339
+ ]
340
+ },
341
+ "options": {
342
+ "showHeader": true,
343
+ "sortBy": [{ "desc": true, "displayName": "Time" }],
344
+ "footer": { "show": false }
345
+ },
346
+ "targets": [
347
+ {
348
+ "expr": "increase(aip_integrity_checks_total{agent_id=\"$agent_id\"}[1m])",
349
+ "legendFormat": "{{verdict}}",
350
+ "refId": "A",
351
+ "format": "table",
352
+ "instant": false
353
+ }
354
+ ],
355
+ "transformations": [
356
+ {
357
+ "id": "organize",
358
+ "options": {
359
+ "excludeByName": { "__name__": true, "job": true, "instance": true },
360
+ "renameByName": { "Time": "Time", "verdict": "Verdict", "Value": "Count" }
361
+ }
362
+ }
363
+ ]
364
+ },
365
+ {
366
+ "title": "Top Concerns",
367
+ "description": "Most frequent concern categories for the selected agent over the current time range.",
368
+ "type": "barchart",
369
+ "datasource": { "type": "prometheus", "uid": "${DS_PROMETHEUS}" },
370
+ "gridPos": { "h": 8, "w": 12, "x": 12, "y": 23 },
371
+ "fieldConfig": {
372
+ "defaults": {
373
+ "color": { "mode": "palette-classic" },
374
+ "custom": {
375
+ "axisBorderShow": false,
376
+ "axisCenteredZero": false,
377
+ "fillOpacity": 80,
378
+ "gradientMode": "none",
379
+ "lineWidth": 1
380
+ }
381
+ },
382
+ "overrides": []
383
+ },
384
+ "options": {
385
+ "barWidth": 0.7,
386
+ "groupWidth": 0.7,
387
+ "legend": { "displayMode": "list", "placement": "bottom" },
388
+ "orientation": "horizontal",
389
+ "tooltip": { "mode": "single" },
390
+ "xTickLabelRotation": 0,
391
+ "stacking": "none"
392
+ },
393
+ "targets": [
394
+ {
395
+ "expr": "topk(10, sum by (category) (increase(aip_concerns_total{agent_id=\"$agent_id\"}[$__range])))",
396
+ "legendFormat": "{{category}}",
397
+ "refId": "A",
398
+ "instant": true
399
+ }
400
+ ]
401
+ }
402
+ ]
403
+ }