我正在嘗試發(fā)送從我的 Go 微服務(wù)生成的指標(biāo),類(lèi)似于-import ( "github.com/DataDog/datadog-go/statsd" "log")func main() { // Create the client c, err := statsd.New("127.0.0.1:8125") if err != nil { log.Fatal(err) } // Prefix every metric with the app name c.Namespace = "myapp." // Count two events err = c.Count("my_counter", 2, nil, 1) if err != nil { log.Fatal(err) } // Close the client err = c.Close() if err != nil { log.Fatal(err) }}我正在使用 Gitlab 將映像推送到 Azure 容器注冊(cè)表,并最終將其部署到我的 Kubernetes 集群中。我能夠看到此微服務(wù)的日志,但無(wú)法看到生成的自定義指標(biāo)。我已經(jīng)為 Kubernetes 代理設(shè)置設(shè)置了此處hostPort提到的設(shè)置。找到錯(cuò)誤原因的任何幫助都將非常有幫助。
1 回答

12345678_0001
TA貢獻(xiàn)1802條經(jīng)驗(yàn) 獲得超5個(gè)贊
- 1 回答
- 0 關(guān)注
- 109 瀏覽
添加回答
舉報(bào)
0/150
提交
取消