我正在嘗試發送從我的 Go 微服務生成的指標,類似于-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 容器注冊表,并最終將其部署到我的 Kubernetes 集群中。我能夠看到此微服務的日志,但無法看到生成的自定義指標。我已經為 Kubernetes 代理設置設置了此處hostPort提到的設置。找到錯誤原因的任何幫助都將非常有幫助。
- 1 回答
- 0 關注
- 106 瀏覽
添加回答
舉報
0/150
提交
取消