Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #418 from yiqigao217/hnc-opentelemetry
Browse files Browse the repository at this point in the history
Add all controller metrics
  • Loading branch information
k8s-ci-robot authored Feb 18, 2020
2 parents 65a3a58 + 712a106 commit 3ee4a3e
Show file tree
Hide file tree
Showing 5 changed files with 281 additions and 11 deletions.
6 changes: 5 additions & 1 deletion incubator/hnc/cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ func main() {
// Exporters use Application Default Credentials to authenticate.
// See https://developers.google.com/identity/protocols/application-default-credentials
// for more details.
exporter, err := stackdriver.NewExporter(stackdriver.Options{})
exporter, err := stackdriver.NewExporter(stackdriver.Options{
// Stackdriver’s minimum stats reporting period must be >= 60 seconds.
// https://opencensus.io/exporters/supported-exporters/go/stackdriver/
ReportingInterval: stats.ReportingInterval,
})
if err != nil {
setupLog.Error(err, "cannot create Stackdriver exporter")
os.Exit(1)
Expand Down
2 changes: 2 additions & 0 deletions incubator/hnc/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/kubernetes-sigs/multi-tenancy/incubator/hnc
go 1.12

require (
contrib.go.opencensus.io/exporter/stackdriver v0.13.0
github.com/Azure/go-autorest/autorest v0.9.1 // indirect
github.com/Azure/go-autorest/autorest/adal v0.6.0 // indirect
github.com/emicklei/go-restful v2.10.0+incompatible // indirect
Expand All @@ -16,6 +17,7 @@ require (
github.com/onsi/gomega v1.7.0
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/spf13/cobra v0.0.5
go.opencensus.io v0.22.3
k8s.io/api v0.0.0-20190409021203-6e4e0e4f393b
k8s.io/apimachinery v0.0.0-20190404173353-6a84e37a896d
k8s.io/cli-runtime v0.0.0-20190314001948-2899ed30580f
Expand Down
Loading

0 comments on commit 3ee4a3e

Please sign in to comment.