don't propagate ContainerHostname in MapContainer2Hostname

The container hostname is already the id of the node, and that's what
summarisation renders. Nothing looks at the docker.ContainerHostname
metadata of nodes in the ContainerHostname group topology.
This commit is contained in:
Matthias Radestock
2017-12-28 01:53:56 +00:00
parent bbd6c5fe47
commit a46b9c9c24

View File

@@ -352,13 +352,12 @@ func MapContainer2Hostname(n report.Node) report.Nodes {
// Otherwise, if some some reason the container doesn't have a hostname
// (maybe slightly out of sync reports), just drop it
id, timestamp, ok := n.Latest.LookupEntry(docker.ContainerHostname)
id, ok := n.Latest.Lookup(docker.ContainerHostname)
if !ok {
return report.Nodes{}
}
node := NewDerivedNode(id, n).WithTopology(MakeGroupNodeTopology(n.Topology, docker.ContainerHostname))
node.Latest = node.Latest.Set(docker.ContainerHostname, timestamp, id)
node.Counters = node.Counters.Add(n.Topology, 1)
return report.Nodes{id: node}
}