Cloudwatch: Fix LaunchTime attribute tag bug (#20237)

* Cast tags of type Time to string

* Fig go lint issue
pull/20486/head
Erik Sundell 6 years ago committed by GitHub
parent e03d702d0c
commit 359416b89f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      pkg/tsdb/cloudwatch/metric_find_query.go

@ -550,6 +550,8 @@ func (e *CloudWatchExecutor) handleGetEc2InstanceAttribute(ctx context.Context,
}
if attr, ok := v.Interface().(*string); ok {
data = *attr
} else if attr, ok := v.Interface().(*time.Time); ok {
data = (*attr).String()
} else {
return nil, errors.New("invalid attribute path")
}

Loading…
Cancel
Save