Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Additional Docker Container Metadata to [resourcedetection/docker] #36105

Open
amal-v opened this issue Oct 31, 2024 · 4 comments
Open

Additional Docker Container Metadata to [resourcedetection/docker] #36105

amal-v opened this issue Oct 31, 2024 · 4 comments
Labels
enhancement New feature or request processor/resourcedetection Resource detection processor

Comments

@amal-v
Copy link

amal-v commented Oct 31, 2024

Component(s)

processor/resourcedetection, processor/resourcedetection/internal/docker

Is your feature request related to a problem? Please describe.

We are running the OTel collector to gather logs from a docker containers on a docker host. The docker resource detection processor only gives you the following.

Name Description Values Enabled
host.name The host.name Any Str true
os.type The os.type Any Str true

based on this document. We need additional container metadata to segregate logs.

Describe the solution you'd like

The resource detection processor adds:

  • Container ID
  • Name
  • Image
  • Labels

Similar to what's implemented in Filebeat.

Describe alternatives you've considered

Alternate would be a dockerattributesprocessor like k8sattributesprocessor to enrich the logs with additional metadata.

Additional context

No response

@amal-v amal-v added enhancement New feature or request needs triage New item requiring triage labels Oct 31, 2024
@github-actions github-actions bot added the processor/resourcedetection Resource detection processor label Oct 31, 2024
Copy link
Contributor

Pinging code owners:

See Adding Labels via Comments if you do not have permissions to add labels yourself.

@ChrsMark ChrsMark removed the needs triage New item requiring triage label Nov 1, 2024
@ChrsMark
Copy link
Member

ChrsMark commented Nov 1, 2024

I think this request is quite valid. From what I can understand the docker resource detector so far aims on host related attributes so not sure if container related metadata would fit there. I would lean towards creating a standalone dockerattributesprocessor component as it was suggested.

Pinging @mx-psi as the original author of the docker detector.

@mx-psi
Copy link
Member

mx-psi commented Nov 4, 2024

The resource detection processor adds:

  • Container ID
  • Name
  • Image
  • Labels

What container ID would we be fetching here? The Collector one? The purpose of the resourcedetection processor, as I understand it, is to populate the resource from the environment that the Collector is running on. If these attributes are about the Collector, then it would make sense to add them, but if they refer to other containers, then I don't think it makes much sense

@ChrsMark
Copy link
Member

ChrsMark commented Nov 4, 2024

I would assume these would refer to other containers. At least that's what Filebeat, that was mentioned, does.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request processor/resourcedetection Resource detection processor
Projects
None yet
Development

No branches or pull requests

3 participants