Documentation ¶
Index ¶
Constants ¶
View Source
const ( //最好是小写 Module = "mod" App = "app" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PromMetrics ¶
type PromMetrics struct { //上报的属性名/prometheus类型/反射 EXAMPLE_TOTAL prometheus.CounterVec `pml:";label1,label2;namespace;subsystem;example(help msg)"` //name is example_total ExampleTotal prometheus.CounterVec `pml:"example_test_total;label1,label2;namespace;subsystem;example(help msg)"` //name is example_test_total RECEIVE_REQUEST_RATE prometheus.GaugeVec //目前只支持Counter ,Gauge功能还未实现 RECEIVE_REQUEST_TOTAL prometheus.CounterVec `pml:";label1,label2;"` //有两个标签,label1,label2 DEAL_REQUEST_SUCC_TOTAL prometheus.CounterVec DEAL_REQUEST_FAIL_TOTAL prometheus.CounterVec HISTOGRAM_TEST prometheus.Histogram `pml:";;;;1,2,3,4;"` //buckets []float64{1,2,3,4} SUMMARY_TEST prometheus.Summary `pml:";;;;;"` //有两个标签,label1,label2 //TODO: add your metrics RECV_TEST_TOTAL prometheus.Counter `pml:";;;;just for test"` }
var M PromMetrics
Click to show internal directories.
Click to hide internal directories.