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

filestats's "file_permissions" resource does not show when it is a directory #36444

Open
josepcorrea opened this issue Nov 19, 2024 · 1 comment
Labels
bug Something isn't working needs triage New item requiring triage receiver/filestats

Comments

@josepcorrea
Copy link

josepcorrea commented Nov 19, 2024

Component(s)

receiver/filestats

What happened?

Description

When file.ctime metric is true, the resouce file_permissions does not show when it is a directory.
When you specify a * in the include, and there is a folder in the path, the resource does not indicate that it is a directory.

Steps to Reproduce

 filestats:
   include: /tmp/jocorrea/*
   metrics:
     file.mtime:
       enabled: false
     file.ctime:
       enabled: true
   resource_attributes:
     file.path:
       enabled: true

Expected Result

{file_name="dir_jocorrea", file_path="/tmp/jocorrea/dir_jocorrea", file_permissions="drwxr-xr-x"}
{file_name="file_jocorrea", file_path="/tmp/jocorrea/file_jocorrea", file_permissions="-rw-r--r--"}

Actual Result

{file_name="dir_jocorrea", file_path="/tmp/jocorrea/dir_jocorrea", file_permissions="-rwxr-xr-x"}
{file_name="file_jocorrea", file_path="/tmp/jocorrea/file_jocorrea", file_permissions="-rw-r--r--"}

In the actual result, the dir_jocorrea file_permissions do not display the d.

Collector version

v0.108.1

Environment information

Environment

OS: Red Hat Enterprise Linux Server 7.5 (Maipo) (Linux)

OpenTelemetry Collector configuration

No response

Log output

No response

Additional context

No response

@josepcorrea josepcorrea added bug Something isn't working needs triage New item requiring triage labels Nov 19, 2024
Copy link
Contributor

Pinging code owners:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage New item requiring triage receiver/filestats
Projects
None yet
Development

No branches or pull requests

1 participant