File tree 1 file changed +3
-1
lines changed
plugins/outputs/stackdriver
1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,9 @@ import (
12
12
monitoring "cloud.google.com/go/monitoring/apiv3" // Imports the Stackdriver Monitoring client package.
13
13
googlepb "github.com/golang/protobuf/ptypes/timestamp"
14
14
"github.com/influxdata/telegraf"
15
+ "github.com/influxdata/telegraf/internal"
15
16
"github.com/influxdata/telegraf/plugins/outputs"
17
+ "google.golang.org/api/option"
16
18
metricpb "google.golang.org/genproto/googleapis/api/metric"
17
19
monitoredrespb "google.golang.org/genproto/googleapis/api/monitoredres"
18
20
monitoringpb "google.golang.org/genproto/googleapis/monitoring/v3"
@@ -88,7 +90,7 @@ func (s *Stackdriver) Connect() error {
88
90
89
91
if s .client == nil {
90
92
ctx := context .Background ()
91
- client , err := monitoring .NewMetricClient (ctx )
93
+ client , err := monitoring .NewMetricClient (ctx , option . WithUserAgent ( internal . ProductToken ()) )
92
94
if err != nil {
93
95
return err
94
96
}
You can’t perform that action at this time.
0 commit comments