Skip to content

[Resource Detector] Improve container ID retrieval for Docker #9549

Description

@ps-mir

As per #9001 (comment), currently Docker resource detector in Contrib relies on os.Hostname to fetch the ContainerInfo. This setting can be overriden with --hostname (envs like k8s), leading to empty ContainerInfo response from moby client.

Followup includes

  • Checking other SDKs implementation.
  • Implementing support for cgroup(v1/v2) based container ID fetch
  • Develop a test matrix for supported cases [Good to have]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions