mirror of
https://github.com/coder/coder.git
synced 2025-07-03 16:13:58 +00:00
feat(coderd): add prometheus metrics to servertailnet (#11988)
This commit is contained in:
@ -472,7 +472,7 @@ func New(options *Options) *API {
|
||||
|
||||
api.Auditor.Store(&options.Auditor)
|
||||
api.TailnetCoordinator.Store(&options.TailnetCoordinator)
|
||||
api.agentProvider, err = NewServerTailnet(api.ctx,
|
||||
stn, err := NewServerTailnet(api.ctx,
|
||||
options.Logger,
|
||||
options.DERPServer,
|
||||
api.DERPMap,
|
||||
@ -485,6 +485,10 @@ func New(options *Options) *API {
|
||||
if err != nil {
|
||||
panic("failed to setup server tailnet: " + err.Error())
|
||||
}
|
||||
api.agentProvider = stn
|
||||
if options.DeploymentValues.Prometheus.Enable {
|
||||
options.PrometheusRegistry.MustRegister(stn)
|
||||
}
|
||||
api.TailnetClientService, err = tailnet.NewClientService(
|
||||
api.Logger.Named("tailnetclient"),
|
||||
&api.TailnetCoordinator,
|
||||
|
Reference in New Issue
Block a user