mirror of
https://github.com/LamGC/ScalaBot.git
synced 2025-12-16 23:20:43 +00:00
feat(metrics): 初步增加获取运行指标的功能(兼容 Prometheus).
添加兼容 Prometheus 的运行指标收集导出功能, 通过内置 HttpServer 将其导出. 默认关闭.
This commit is contained in:
@ -60,6 +60,12 @@ internal data class ProxyConfig(
|
||||
val port: Int = 1080
|
||||
)
|
||||
|
||||
internal data class MetricsConfig(
|
||||
val enable: Boolean = false,
|
||||
val port: Int = 9386,
|
||||
val bindAddress: String? = null
|
||||
)
|
||||
|
||||
/**
|
||||
* ScalaBot App 配置.
|
||||
*
|
||||
@ -68,6 +74,7 @@ internal data class ProxyConfig(
|
||||
*/
|
||||
internal data class AppConfig(
|
||||
val proxy: ProxyConfig = ProxyConfig(),
|
||||
val metrics: MetricsConfig = MetricsConfig()
|
||||
)
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user