@@ -322,55 +322,75 @@ func loggerFromFlags(cmd *cli.Command) *slog.Logger {
322
322
func newMetrics () * metrics.Metrics {
323
323
return & metrics.Metrics {
324
324
TMIMsgsCount : metrics .NewPromCounter (
325
- prometheus .NewCounter (prometheus.CounterOpts {
326
- Namespace : "robot" ,
327
- Subsystem : "tmi" ,
328
- Name : "messages" ,
329
- Help : "Number of PRIVMSGs received from TMI." ,
330
- }),
325
+ prometheus .NewCounter (
326
+ prometheus.CounterOpts {
327
+ Namespace : "robot" ,
328
+ Subsystem : "tmi" ,
329
+ Name : "messages" ,
330
+ Help : "Number of PRIVMSGs received from TMI." ,
331
+ },
332
+ ),
331
333
),
332
334
TMICommandCount : metrics .NewPromCounter (
333
- prometheus .NewCounter (prometheus.CounterOpts {
334
- Namespace : "robot" ,
335
- Subsystem : "tmi" ,
336
- Name : "commands" ,
337
- Help : "Number of command invocations received in Twitch chat." ,
338
- }),
335
+ prometheus .NewCounter (
336
+ prometheus.CounterOpts {
337
+ Namespace : "robot" ,
338
+ Subsystem : "tmi" ,
339
+ Name : "commands" ,
340
+ Help : "Number of command invocations received in Twitch chat." ,
341
+ },
342
+ ),
339
343
),
340
344
LearnedCount : metrics .NewPromCounter (
341
- prometheus .NewCounter (prometheus.CounterOpts {
342
- Namespace : "robot" ,
343
- Subsystem : "brain" ,
344
- Name : "learned" ,
345
- Help : "Number of messages learned." ,
346
- }),
345
+ prometheus .NewCounter (
346
+ prometheus.CounterOpts {
347
+ Namespace : "robot" ,
348
+ Subsystem : "brain" ,
349
+ Name : "learned" ,
350
+ Help : "Number of messages learned." ,
351
+ },
352
+ ),
347
353
),
348
354
ForgotCount : metrics .NewPromCounter (
349
- prometheus .NewCounter (prometheus.CounterOpts {
350
- Namespace : "robot" ,
351
- Subsystem : "brain" ,
352
- Name : "forgot" ,
353
- Help : "Number of individual messages deleted. Does not include messages deleted by user or time." ,
354
- }),
355
+ prometheus .NewCounter (
356
+ prometheus.CounterOpts {
357
+ Namespace : "robot" ,
358
+ Subsystem : "brain" ,
359
+ Name : "forgot" ,
360
+ Help : "Number of individual messages deleted. Does not include messages deleted by user or time." ,
361
+ },
362
+ ),
355
363
),
356
364
SpeakLatency : metrics .NewPromObserverVec (
357
- prometheus .NewHistogramVec (prometheus.HistogramOpts {
358
- Buckets : []float64 {0.01 , 0.05 , 0.1 , 0.2 , 0.5 , 1 , 5 , 10 },
359
- Namespace : "robot" ,
360
- Subsystem : "commands" ,
361
- Name : "speak-latency" ,
362
- Help : "How long it takes for robot to speak once prompted in seconds" ,
363
- }, []string {"channel" , "empty-prompt" },
365
+ prometheus .NewHistogramVec (
366
+ prometheus.HistogramOpts {
367
+ Buckets : []float64 {0.01 , 0.05 , 0.1 , 0.2 , 0.5 , 1 , 5 , 10 },
368
+ Namespace : "robot" ,
369
+ Subsystem : "commands" ,
370
+ Name : "speak-latency" ,
371
+ Help : "How long it takes for robot to speak once prompted in seconds" ,
372
+ }, []string {"channel" , "empty-prompt" },
364
373
),
365
374
),
366
375
LearnLatency : metrics .NewPromObserverVec (
367
- prometheus .NewHistogramVec (prometheus.HistogramOpts {
368
- Buckets : []float64 {1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 },
369
- Namespace : "robot" ,
370
- Subsystem : "brain" ,
371
- Name : "learn-latency" ,
372
- Help : "How long it takes robot to learn a non discarded message in seconds" ,
373
- }, []string {"channel" },
376
+ prometheus .NewHistogramVec (
377
+ prometheus.HistogramOpts {
378
+ Buckets : []float64 {1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 },
379
+ Namespace : "robot" ,
380
+ Subsystem : "brain" ,
381
+ Name : "learn-latency" ,
382
+ Help : "How long it takes robot to learn a non discarded message in seconds" ,
383
+ }, []string {"channel" },
384
+ ),
385
+ ),
386
+ UsedMessagesForGeneration : metrics .NewPromHistogram (
387
+ prometheus .NewHistogram (
388
+ prometheus.HistogramOpts {
389
+ Namespace : "robot" ,
390
+ Subsystem : "commands" ,
391
+ Name : "used-messages" ,
392
+ Help : "How many messages were used while generating a new message" ,
393
+ },
374
394
),
375
395
),
376
396
}
0 commit comments