Skip to content

Commit

Permalink
Relax ECS container ID regex (#2430)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
stevejgordon authored Aug 28, 2024
1 parent d74c1cb commit 9a99a2e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ endif::[]
[[release-notes-1.x]]
=== .NET Agent version 1.x
[[release-notes-1.28.5]]
==== 1.28.5 - 2024/08/28
===== Bug fixes
{pull}2430[#2430] Relax ECS container ID regex.
[[release-notes-1.28.4]]
==== 1.28.4 - 2024/08/19
Expand Down
2 changes: 1 addition & 1 deletion src/Elastic.Apm/Helpers/SystemInfoHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ internal class SystemInfoHelper
{
private readonly Regex _containerUidRegex = new Regex("^[0-9a-fA-F]{64}$");
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,}");
private readonly Regex _ecsContainerIdRegex = new Regex("^[a-z0-9]{32}-[0-9]{10}$");
private readonly Regex _ecsContainerIdRegex = new Regex("^[a-z0-9]{32}-[0-9]{1,10}$");
private readonly Regex _podRegex = new Regex(
@"(?:^/kubepods[\S]*/pod([^/]+)$)|(?:^/kubepods\.slice/(kubepods-[^/]+\.slice/)?kubepods[^/]*-pod([^/]+)\.slice$)");

Expand Down

0 comments on commit 9a99a2e

Please sign in to comment.