Skip to content

Commit

Permalink
ecs: Also make service a parent of task
Browse files Browse the repository at this point in the history
  • Loading branch information
ekimekim committed Apr 11, 2017
1 parent 9f0f120 commit 18ba2c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions probe/awsecs/reporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ func (r Reporter) Tag(rpt report.Report) (report.Report, error) {
if serviceName, ok := ecsInfo.TaskServiceMap[taskArn]; ok {
serviceID := report.MakeECSServiceNodeID(cluster, serviceName)
parentsSets = parentsSets.Add(report.ECSService, report.MakeStringSet(serviceID))
// in addition, make service parent of task
rpt.ECSTask.Nodes[taskID] = rpt.ECSTask.Nodes[taskID].WithParents(report.MakeSets().Add(report.ECSService, report.MakeStringSet(serviceID)))
}
for _, containerID := range info.ContainerIDs {
if containerNode, ok := rpt.Container.Nodes[containerID]; ok {
Expand Down

0 comments on commit 18ba2c4

Please sign in to comment.