File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 66### Bugfixes
77 * fixed an issue with empty responses from APM Server's config endpoint (#562 , #563 )
88 * fixed Windows tests by avoiding time.sleep in breakdown metrics tests (#537 , #550 )
9+ * fixed container ID matching to match CloudFoundry Garden container IDs (#523 , #564 )
910
1011## v5.1.0
1112[ Check the diff] ( https://github.com/elastic/apm-agent-python/compare/v5.0.0...v5.1.0 )
Original file line number Diff line number Diff line change 3939 r"(?:^/kubepods/[^/]+/pod([^/]+)$)|(?:^/kubepods\.slice/kubepods-[^/]+\.slice/kubepods-[^/]+-pod([^/]+)\.slice$)"
4040)
4141
42- container_id_regexp = re .compile ("^[0-9A-Fa-f]{64}$" )
42+ container_id_regexp = re .compile (
43+ "^(?:[0-9a-f]{64}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4,})$" , re .IGNORECASE
44+ )
4345
4446
4547def get_cgroup_container_metadata ():
@@ -85,10 +87,8 @@ def parse_cgroups(filehandle):
8587 #
8688 # In a Kubernetes pod, the cgroup path will look like:
8789 #
88- # systemd:
89- # /kubepods.slice/kubepods-<QoS-class>.slice/kubepods-<QoS-class>-pod<pod-UID>.slice/<container-iD>.scope
90- # cgroupfs:
91- # /kubepods/<QoS-class>/pod<pod-UID>/<container-iD>
90+ # systemd:/kubepods.slice/kubepods-<QoS-class>.slice/kubepods-<QoS-class>-pod<pod-UID>.slice/<container-iD>.scope
91+ # cgroupfs:/kubepods/<QoS-class>/pod<pod-UID>/<container-iD>
9292
9393 directory , container_id = os .path .split (cgroup_path )
9494 if container_id .endswith (SYSTEMD_SCOPE_SUFFIX ):
Original file line number Diff line number Diff line change 5959 "kubernetes" : {"pod" : {"uid" : "90d81341_92de_11e7_8cf2_507b9d4141fa" }},
6060 },
6161 ),
62+ (
63+ "1:name=systemd:/system.slice/garden.service/garden/70eb4ce5-a065-4401-6990-88ed" ,
64+ {"container" : {"id" : "70eb4ce5-a065-4401-6990-88ed" }},
65+ ),
6266 ],
6367)
6468def test_cgroup_parsing (test_input , expected ):
You can’t perform that action at this time.
0 commit comments