Merge branch 'beorn7/release'

This commit is contained in:
beorn7 2017-11-04 12:32:49 +01:00
commit 348ea482ea
2 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,7 @@
## 1.8.2 / 2017-11-04
* [BUGFIX] EC2 service discovery: Do not crash if tags are empty.
## 2.0.0-rc.2 / 2017-10-25 ## 2.0.0-rc.2 / 2017-10-25
* [ENHANCEMENT] handle WAL segments with corrupted header gracefully * [ENHANCEMENT] handle WAL segments with corrupted header gracefully

View File

@ -221,6 +221,9 @@ func (d *Discovery) refresh() (tg *config.TargetGroup, err error) {
} }
for _, t := range inst.Tags { for _, t := range inst.Tags {
if t == nil || t.Key == nil || t.Value == nil {
continue
}
name := strutil.SanitizeLabelName(*t.Key) name := strutil.SanitizeLabelName(*t.Key)
labels[ec2LabelTag+model.LabelName(name)] = model.LabelValue(*t.Value) labels[ec2LabelTag+model.LabelName(name)] = model.LabelValue(*t.Value)
} }