Skip to content

Update AWS ECS Fargate container ID regex. #888

Open
@Mpdreamz

Description

@Mpdreamz

Description

As per #886

We have new evidence that ID part of ECS Fargate container may end in 1 to 10 digits not exactly 10 digits.

And As per #887

Through a customer support case, we've been notified of a failure to parse the container ID from /proc/self/cgroup for a service running on ECS Fargate. In this customer's case, the container ID does not seem to conform to the expected format of the Docker ID in AWS ECS Fargate, which, per this documentation, is expected to be 32 hex characters followed by a dash and then ten numeric digits.

In this customer case, in two out of 30 services, there are only nine numeric digits after the dash. It is unclear if this is a bug in AWS, but as it is not documented, it could well be. AWS support has been unable to reproduce this on their end. Since our specification uses a strict regex to match the possibility of an ECS Fargate format, for this customer, our APM agents will be unable to parse the container ID while using our regex.

We in fact observed a new case since ending in 8 digits.

This issue is created to track everyone updating their regex for ECS Fargate container IDs to:

^[[:xdigit:]]{32}-[[:digit:]]{1,10}$

To be up to date with the specification change from: #886

Issues creation

Create Spec issue?

  • Spec issue

Create APM Agent issues?

  • elastic-otel-java
  • elastic-otel-dotnet
  • elastic-otel-node
  • elastic-otel-python
  • elastic-otel-php
  • apm-agent-java
  • apm-agent-dotnet
  • apm-agent-nodejs
  • apm-agent-python
  • apm-agent-go
  • apm-agent-php
  • apm-agent-ruby

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions