Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AsyncTaskDurationSeconds = promauto.NewHistogramVec( prometheus.HistogramOpts{ Name: "asynctask_task_duration_seconds", Help: "Time spent processing an asynctask message", Buckets: taskDurationBuckets, }, []string{"task_name", "queue", "status"}, )
AsyncTaskDurationSeconds 与 Python coast 库的 ASYNC_TASK_DURATION_SECONDS 同名同 label,可以在同一个 Prometheus/Grafana 查询里合并两边的数据; 两边 buckets 不同,跨语言做 histogram_quantile 时需要留意分位数偏差。 包级 var,Go 保证进程内只初始化一次——即便同一个 extension 类型有多个实例 (如 one_asynctask_/two_asynctask_)反复 Init 也不会重复 promauto 注册导致 panic。
View Source
var BusTaskDurationSeconds = promauto.NewHistogramVec( prometheus.HistogramOpts{ Name: "bus_task_duration_seconds", Help: "Time spent processing a bus message", Buckets: taskDurationBuckets, }, []string{"task_name", "queue", "status"}, )
BusTaskDurationSeconds 与 Python coast 库的 BUS_TASK_DURATION_SECONDS 同名同 label。
Functions ¶
func GetApmEnable ¶ added in v1.2.5
func GetApmEnable() bool
func GetOtelEnable ¶ added in v1.2.5
func GetOtelEnable() bool
func Initialize ¶ added in v1.2.5
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.