Repository navigation
Expand file tree
/
Copy pathconfig.js
More file actions
495 lines (493 loc) · 15.1 KB
/
Copy pathconfig.js
File metadata and controls
495 lines (493 loc) · 15.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
function fz(obj) {
if (Array.isArray(obj)) {
return Object.freeze(obj.map(fz))
}
return Object.freeze(obj)
}
// The config is immutable at runtime and any effort to change it will have no effect
export const config = fz({
appName: 'SLC',
// This version will be changed when the URL parameters change
urlVer: 4,
displayName: fz({
minLength: 2,
maxLength: 300,
default: '',
}),
description: fz({
minLength: 0,
maxLength: 500,
default: '',
}),
timeslice: fz({
min: 1,
max: 3600,
step: 1,
default: 60,
presets: fz([
{
title: '1 second',
seconds: 1,
},
{
title: '1 minute',
seconds: 60,
},
{
title: '3 minutes',
seconds: 180,
},
{
title: '5 minutes',
seconds: 300,
},
{
title: '10 minutes',
seconds: 600,
},
{
title: '15 minutes',
seconds: 900,
},
{
title: '30 minutes',
seconds: 1800,
},
{
title: '1 hour',
seconds: 3600,
},
]),
}),
eventUnit: fz({
default: 'events',
minLength: 0,
maxLength: 200,
presets: fz([
{
eventUnit: 'events',
useCase: 'No custom name for the events (default)',
},
{
eventUnit: 'requests',
useCase: 'REST/GraphQL servers, serverless functions, ...',
},
{
eventUnit: 'queries',
useCase: 'Databases, LLM models, log servers, ...',
},
{
eventUnit: 'entries',
useCase: 'Storage systems, data processors, ...',
},
{
eventUnit: 'messages',
useCase: 'Queue systems, data pipelines, ...',
},
{
eventUnit: 'page_views',
useCase: 'Web Servers, Document Servers, ...',
},
{
eventUnit: 'logins',
useCase: 'Authentication providers, session servers, ...',
},
{
eventUnit: 'incidents',
useCase: 'Operational teams, ...',
},
{
eventUnit: 'sessions',
useCase: 'UIs supporting user flows, mobile apps, web apps, ...',
},
{
eventUnit: 'transactions',
useCase: 'Transaction services, data pipelines',
},
]),
}),
metricName: fz({
default: '',
placeholder: 'e.g. response_latency, error_rate, items_processed',
minLength: 3,
maxLength: 300,
}),
metricUnit: fz({
default: '',
placeholder: 'e.g. ms, errors, items, etc.',
minLength: 0,
maxLength: 100,
}),
lowerBound: fz({
possibleValues: fz(['', 'gt', 'ge']),
default: '',
}),
lowerThreshold: fz({
min: -1_000_000_000,
max: 1_000_000_000,
step: 1,
default: 0,
}),
upperBound: fz({
possibleValues: fz(['', 'lt', 'le']),
default: '',
}),
upperThreshold: fz({
min: -1_000_000_000,
max: 1_000_000_000,
step: 1,
default: 2000,
}),
slo: fz({
min: 50,
max: 99.999,
default: 99,
presets: fz([
{
title: 'One nine',
slo: 90,
},
{
title: 'One and a half nines',
slo: 95,
},
{
title: 'Two nines',
slo: 99,
},
{
title: 'Two and a half nines',
slo: 99.5,
},
{
title: 'Three nines',
slo: 99.9,
},
{
title: 'Three and a half nines',
slo: 99.95,
},
{
title: 'Four nines',
slo: 99.99,
},
{
title: 'Four and a half nines',
slo: 99.995,
},
{
title: 'Five nines',
slo: 99.999,
},
]),
}),
windowDays: fz({
min: 1,
max: 90,
step: 1,
default: 30,
presets: fz([
{
title: '1 week',
days: 7,
useCase: 'Forgives any breach after a week',
},
{
title: '2 weeks',
days: 14,
useCase: 'Maps well to a typical "sprint"',
},
{
title: '4 weeks',
days: 28,
useCase: 'Always start on the same day of the week',
},
{
title: 'A month',
days: 30,
useCase: 'Maps to typical subscription services',
},
{
title: 'A quarter',
days: 90,
useCase: 'Rather unforgiving to breaches in the past',
},
]),
}),
expectedDailyEvents: fz({
min: 1,
max: 1_000_000_000,
step: 1,
default: 10_000,
}),
alert: fz({
presets: fz([
{
burnRate: 1,
longWindowPerc: 10,
shortWindowDivider: 12,
useShortWindow: true,
},
{
burnRate: 6,
longWindowPerc: 5,
shortWindowDivider: 12,
useShortWindow: true,
},
{
burnRate: 14.4,
longWindowPerc: 2,
shortWindowDivider: 12,
useShortWindow: true,
},
]),
burnRate: fz({
min: 1,
max: 100,
step: 0.1,
default: 7,
}),
longWindowPerc: fz({
min: 0.1,
max: 99,
step: 0.1,
default: 6,
}),
shortWindowDivider: fz({
min: 2,
max: 20,
step: 1,
default: 12,
}),
}),
impactLevel: fz({
min: 1,
max: 100,
step: 1,
default: 50,
}),
notablePercentiles: [0.1, 0.5, 1, 5, 10, 20, 25, 50, 75, 80, 90, 95, 99, 99.5, 99.9],
simulator: {
dataCountPerDay: {
min: 1,
max: 24 * 60 * 60,
default: 60 * 60,
},
// How many windows of data should be generated in the simulation
windowCount: {
min: 1,
max: 5,
step: 1,
default: 2,
},
metricRange: {
min: {
min: -1_000_000_000,
max: 1_000_000_000,
step: 1,
default: 200,
},
max: {
min: -1_000_000_000,
max: 1_000_000_000,
step: 1,
default: 20000,
},
},
percentages: {
default: [95.3, 2.2, 0.9, 0.6, 0.5, 0.4],
presets: [
{
name: 'Normal',
values: [50],
},
{
name: 'Long Tail',
values: [100, 30, 10, 9, 3, 2, 1],
},
{
name: 'Long Tail Extreme',
values: [100, 3, 2, 1, 1, 0.5],
},
{
name: 'Hill',
values: [1, 2, 3, 9, 10, 30, 100],
},
{
name: 'Hill Extreme',
values: [0.5, 1, 1, 2, 3, 5, 100],
},
{
name: 'Two Tails',
values: [1, 2, 3, 7, 100, 7, 3, 2, 1],
},
{
name: 'Two Tails Extreme',
values: [0.5, 1, 1, 100, 1, 1, 0.5],
},
{
name: 'Camel',
values: [1, 2, 3, 7, 100, 7, 3, 2, 1, 1, 2, 3, 7, 100, 7, 3, 2, 1],
},
{
name: 'Timeout',
values: [100, 0, 0, 0, 0, 0, 0, 0.3],
},
{
name: 'Pits',
values: [0.3, 0, 0, 0, 0, 0, 0, 100],
},
{
name: 'Crazy Bounce',
values: [100, 2, 2, 2, 5, 2, 2, 2, 100],
},
],
},
},
slider: {
count: 10,
min: 0,
max: 100,
default: 50,
step: 0.01,
presets: [0, 0.1, 1, 5, 50, 95, 99, 99.9, 100],
},
// How long should an incident be in terms of window length
incidentLengthPerc: {
min: 0.01,
max: 100,
step: 0.01,
default: 10,
},
metricEffort: fz({
default: 'Easy',
possibleValues: fz([
'Easy', // We already get that out of the box
'Medium', // Some observability needs to be set up
'Hard', // New code needs to be written
'Very Hard', // A rough approximation can be made with significant effort
'Impossible', // It's not possible to measure accurately
]),
}),
llm: fz({
selectedEngineStateKey: 'LLM-SELECTED-ENGINE-STATE',
engines: [
/*
{
name: 'WebLLM',
baseUrl: undefined,
website: 'https://webllm.mlc.ai/',
description:
'The easiest option. It runs the LLM engine in this browser window and caches the model for later usage.',
},
*/
{
name: 'LLaMAC++',
baseUrl: 'http://localhost:8080/v1/',
website: 'https://github.com/ggml-org/llama.cpp/blob/master/tools/server/README.md',
suggestedModel: 'microsoft/phi-4-gguf',
description: 'Runs on a local or remote computer providing an OpenAI-compatible API (as well as a Web GUI similar to ChatGPT).',
},
{
name: 'LM Studio',
baseUrl: 'http://localhost:1234/v1/',
website: 'https://lmstudio.ai/docs/developer/core/server/',
suggestedModel: 'phi-4',
description: 'Desktop app that runs locally (or on a remote machine) and provides an OpenAI-compatible API. Make sure to enable CORS.',
},
{
name: 'Jan',
baseUrl: 'http://localhost:1337/v1/',
website: 'https://www.jan.ai/docs/desktop/api-server',
suggestedModel: 'llama3.1-8b-instruct',
description: 'Desktop app that runs locally (or on a remote machine) and provides an OpenAI-compatible API.',
},
{
name: 'Ollama',
baseUrl: 'http://localhost:11434/v1/',
website: 'https://ollama.ai/',
suggestedModel: 'gemma3',
description: 'Get up and running with large language models locally.',
},
{
name: 'Gemini',
baseUrl: 'https://generativelanguage.googleapis.com/v1beta/openai/',
website: 'https://gemini.google.com',
apiKeyWebsite: 'https://aistudio.google.com/apikey',
suggestedModel: 'models/gemini-2.5-flash-lite',
description:
'From Google which arguably started this whole AI wave with their Transformers architecture.',
},
{
name: 'OpenAI',
baseUrl: 'https://api.openai.com/v1/',
website: 'https://chatgpt.com/',
apiKeyWebsite: 'https://platform.openai.com/api-keys',
suggestedModel: 'o4-mini',
description: 'The company behind ChatGPT and run by a lunatic.',
},
{
name: 'Anthropic',
baseUrl: 'https://api.anthropic.com/v1/',
website: 'https://claude.ai/',
apiKeyWebsite: 'https://console.anthropic.com/settings/keys',
suggestedModel: 'claude-3-5-haiku-20241022',
description: 'Similar to OpenAI, run by some former OpenAI employees.',
},
{
name: 'Azure',
baseUrl: 'https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1/',
website: 'https://learn.microsoft.com/en-us/azure/ai-foundry/openai/latest',
apiKeyWebsite: 'https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to-get-access',
description: 'Microsoft\'s enterprise-grade platform for OpenAI models.',
},
{
name: 'Cohere',
baseUrl: 'https://api.cohere.ai/compatibility/v1/',
website: 'https://cohere.ai/',
apiKeyWebsite: 'https://dashboard.cohere.com/api-keys',
description: 'Enterprise AI platform focused on business applications.',
},
{
name: 'Open Router',
baseUrl: 'https://openrouter.ai/api/v1/',
website: 'https://openrouter.ai/',
apiKeyWebsite: 'https://openrouter.ai/keys',
description: 'A unified interface to access many models from different providers through one API.',
},
{
name: 'Mistral',
baseUrl: 'https://api.mistral.ai/v1/',
website: 'https://mistral.ai/',
apiKeyWebsite: 'https://console.mistral.ai/api-keys/',
description: 'European AI champion providing efficient open-weight and commercial models.',
},
{
name: 'Groq',
baseUrl: 'https://api.groq.com/openai/v1',
website: 'https://groq.com/',
apiKeyWebsite: 'https://console.groq.com/keys',
description: 'Incredibly fast inference engine using custom LPU hardware.',
},
{
name: 'HuggingFace',
baseUrl: 'https://router.huggingface.co/v1/',
website: 'https://huggingface.co/',
apiKeyWebsite: 'https://huggingface.co/settings/tokens',
description: 'The hub of the open-source AI community, offering a vast array of models.',
},
],
temperature: {
default: 0.1,
min: 0,
max: 2,
step: 0.1,
},
maxTokens: {
default: 4096,
min: 100,
max: 10000,
step: 100,
},
}),
})