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.path" resource has the wrong directory #31738

Closed
ubcharron opened this issue Mar 13, 2024 · 2 comments · Fixed by #31753
Closed

filestats's "file.path" resource has the wrong directory #31738

ubcharron opened this issue Mar 13, 2024 · 2 comments · Fixed by #31753
Labels
bug Something isn't working receiver/filestats

Comments

@ubcharron
Copy link

ubcharron commented Mar 13, 2024

Component(s)

receiver/filestats

What happened?

Description

When resource_attributes.file.path.enabled is true, the resource attribute "file.path" has the current working directory rather than the one from the include statement.

Steps to Reproduce

Enable "resource_attributes.file.path" and include a glob path that is not under the current working directory.

receivers:
    filestats:
      include: /tmp/*
      resource_attributes:
        file.path:
          enabled: true

Expected Result

     -> file.path: Str(/tmp/myfile)

Actual Result

     -> file.path: Str(/home/bcharron/myfile)

Collector version

0.96.0

Environment information

No response

OpenTelemetry Collector configuration

exporters:
    debug:
        verbosity: detailed

receivers:
    filestats:
      include: /tmp/*
      resource_attributes:
        file.path:
          enabled: true

service:
    pipelines:
        metrics:
            exporters: [debug]
            processors: []
            receivers: [filestats]

Log output

No response

Additional context

No response

@ubcharron ubcharron added bug Something isn't working needs triage New item requiring triage labels Mar 13, 2024
Copy link
Contributor

Pinging code owners:

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

@atoulme atoulme removed the needs triage New item requiring triage label Mar 14, 2024
@atoulme
Copy link
Contributor

atoulme commented Mar 14, 2024

Thanks for the report!

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

Successfully merging a pull request may close this issue.

2 participants