Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TotalUsers = prometheus.NewGauge( prometheus.GaugeOpts{ Name: "app_total_users", Help: "Total number of unique users.", }, ) TotalRecords = prometheus.NewCounter( prometheus.CounterOpts{ Name: "app_total_records", Help: "Total number of records.", }, ) TotalTokens = prometheus.NewCounter( prometheus.CounterOpts{ Name: "app_total_tokens", Help: "Total number of tokens.", }, ) ConversationDuration = prometheus.NewHistogram( prometheus.HistogramOpts{ Name: "app_conversation_duration_seconds", Help: "Duration of conversations in seconds.", Buckets: prometheus.DefBuckets, }, ) ImageDuration = prometheus.NewHistogram( prometheus.HistogramOpts{ Name: "generate_image_duration_seconds", Help: "generate image API requests in seconds.", Buckets: prometheus.DefBuckets, }, ) )
define all metrics
Functions ¶
Types ¶
type PProfServer ¶
type PProfServer struct {
Addr string
}
func NewPProfServer ¶
func NewPProfServer(addr string) *PProfServer
NewPProfServer create http server, listen 36060 port.
Click to show internal directories.
Click to hide internal directories.