Fix error in puslishing cloud watch metrics (#55)
Reported at: https://github.com/vmware/vmware-go-kcl/issues/54 The input params are not used to set monitor service in cloudwatch Init function. The empty appName, streamName and workerID cause PutMetricData failed with error string "Error in publishing cloudwatch metrics. Error: InvalidParameter...". Signed-off-by: Tao Jiang <taoj@vmware.com>
This commit is contained in:
parent
c9793728a3
commit
9ca9d901ca
1 changed files with 4 additions and 0 deletions
|
|
@ -89,6 +89,10 @@ func NewMonitoringServiceWithOptions(region string, creds *credentials.Credentia
|
|||
}
|
||||
|
||||
func (cw *MonitoringService) Init(appName, streamName, workerID string) error {
|
||||
cw.appName = appName
|
||||
cw.streamName = streamName
|
||||
cw.workerID = workerID
|
||||
|
||||
cfg := &aws.Config{Region: aws.String(cw.region)}
|
||||
cfg.Credentials = cw.credentials
|
||||
s, err := session.NewSession(cfg)
|
||||
|
|
|
|||
Loading…
Reference in a new issue