bucket for tokens out
This commit is contained in:
@@ -90,14 +90,21 @@ func handleJsonLine(line []byte) {
|
||||
duration := jsonData["eval_duration"].(float64)
|
||||
fmt.Printf("Duration: %.2f seconds\n", duration/1000000000.0)
|
||||
opsProcessed.Inc()
|
||||
tokens_out.Observe(jsonData["prompt_eval_count"].(float64))
|
||||
}
|
||||
}
|
||||
|
||||
var opsProcessed = promauto.NewCounter(prometheus.CounterOpts{
|
||||
Name: "total_requests",
|
||||
Name: "llmproxymetrics_total_requests",
|
||||
Help: "The total number of processed events",
|
||||
})
|
||||
|
||||
var tokens_out = prometheus.NewHistogram(prometheus.HistogramOpts{
|
||||
Name: "llmproxymetrics_tokens_out",
|
||||
Help: "Tokens generated.",
|
||||
Buckets: prometheus.LinearBuckets(0, 100, 25),
|
||||
})
|
||||
|
||||
func main() {
|
||||
err := env.Parse(&cfg)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user