Skip to content

Commit 9a99a2e

Browse files
authored
Relax ECS container ID regex (#2430)
As agreed in the weekly team call, we will relax the ECS container ID regex in the spec since we have seen examples where the container ID suffix is shorter than the documented ten characters.
1 parent d74c1cb commit 9a99a2e

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

CHANGELOG.asciidoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ endif::[]
2323
[[release-notes-1.x]]
2424
=== .NET Agent version 1.x
2525
26+
[[release-notes-1.28.5]]
27+
==== 1.28.5 - 2024/08/28
28+
29+
===== Bug fixes
30+
31+
{pull}2430[#2430] Relax ECS container ID regex.
32+
2633
[[release-notes-1.28.4]]
2734
==== 1.28.4 - 2024/08/19
2835

src/Elastic.Apm/Helpers/SystemInfoHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ internal class SystemInfoHelper
1818
{
1919
private readonly Regex _containerUidRegex = new Regex("^[0-9a-fA-F]{64}$");
2020
private readonly Regex _shortenedUuidRegex = new Regex("^[0-9a-fA-F]{8}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4}\\-[0-9a-fA-F]{4,}");
21-
private readonly Regex _ecsContainerIdRegex = new Regex("^[a-z0-9]{32}-[0-9]{10}$");
21+
private readonly Regex _ecsContainerIdRegex = new Regex("^[a-z0-9]{32}-[0-9]{1,10}$");
2222
private readonly Regex _podRegex = new Regex(
2323
@"(?:^/kubepods[\S]*/pod([^/]+)$)|(?:^/kubepods\.slice/(kubepods-[^/]+\.slice/)?kubepods[^/]*-pod([^/]+)\.slice$)");
2424

0 commit comments

Comments
 (0)