From 7e9cde59f6e5ceeee83291ce43940bf89365c7c3 Mon Sep 17 00:00:00 2001 From: Steven Blumenthal Date: Thu, 28 Mar 2024 12:02:16 -0400 Subject: [PATCH] Fix cgroup parsing in ECS Fargate (#305) --- statsd/container_linux.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/statsd/container_linux.go b/statsd/container_linux.go index bc5af6d2..12513234 100644 --- a/statsd/container_linux.go +++ b/statsd/container_linux.go @@ -35,9 +35,9 @@ const ( // ContainerRegexpStr defines the regexp used to match container IDs // ([0-9a-f]{64}) is standard container id used pretty much everywhere - // ([0-9a-f]{32}-[0-9]{10}) is container id used by AWS ECS + // ([0-9a-f]{32}-\d+) is container id used by AWS ECS // ([0-9a-f]{8}(-[0-9a-f]{4}){4}$) is container id used by Garden - containerRegexpStr = "([0-9a-f]{64})|([0-9a-f]{32}-[0-9]{10})|([0-9a-f]{8}(-[0-9a-f]{4}){4}$)" + containerRegexpStr = "([0-9a-f]{64})|([0-9a-f]{32}-\\d+)|([0-9a-f]{8}(-[0-9a-f]{4}){4}$)" // cIDRegexpStr defines the regexp used to match container IDs in /proc/self/mountinfo cIDRegexpStr = `.*/([^\s/]+)/(` + containerRegexpStr + `)/[\S]*hostname`