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

[extension/filestorage] - Provide an option to the user to create a directory for them #34939

Closed
VihasMakwana opened this issue Aug 30, 2024 · 7 comments
Assignees

Comments

@VihasMakwana
Copy link
Contributor

Component(s)

extension/storage/filestorage

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

When using the filelog receiver with persistence enabled, I need to ensure that the directory exists before starting the collector; otherwise, it will throw an error.
It would be a great help if collector could automate this part for me.

Describe the solution you'd like

It would be convenient if the file_storage option had a setting that, when enabled, would automatically create the directory for you.
We can name the option auto_create_directory or create_directory and set it to false by default (existing behaviour), but if the user wants the collector to handle the directory creation, they can just turn this option on.

Describe alternatives you've considered

No response

Additional context

No response

@VihasMakwana VihasMakwana added enhancement New feature or request needs triage New item requiring triage labels Aug 30, 2024
Copy link
Contributor

Pinging code owners:

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

@VihasMakwana VihasMakwana changed the title [extension/filestorage] - Provider an option to the user to create a directory for them [extension/filestorage] - Provide an option to the user to create a directory for them Aug 30, 2024
@andrzej-stencel
Copy link
Member

I think this would be a useful feature.

What would be the permissions on the created directory? Would 0750 (rwxr-x---) be a good default? Do we need to let the user customize the permissions?

@VihasMakwana
Copy link
Contributor Author

@andrzej-stencel I think 0750 is a good default.

Do we need to let the user customize the permissions?

I think it would be sufficient to document that the default directory creation mode is 0750.

@andrzej-stencel
Copy link
Member

Do we need to let the user customize the permissions?

I think it would be sufficient to document that the default directory creation mode is 0750.

Ok let's start with that. 👍

@VihasMakwana
Copy link
Contributor Author

@andrzej-stencel can you assign this to me (or should we wait for @djaglowski to be back from vacation)?

@Frapschen
Copy link
Contributor

@VihasMakwana assigned

djaglowski added a commit that referenced this issue Sep 11, 2024
…34985)

**Description:** 
This PR introduces a new option that will create a directory for the
user if it doesn't already exist.

**Link to tracking Issue:**
#34939

**Testing:** Added

---------

Co-authored-by: Daniel Jaglowski <[email protected]>
Co-authored-by: Andrzej Stencel <[email protected]>
@VihasMakwana
Copy link
Contributor Author

Addressed via #34985. Closing.

jriguera pushed a commit to springernature/opentelemetry-collector-contrib that referenced this issue Oct 4, 2024
…pen-telemetry#34985)

**Description:** 
This PR introduces a new option that will create a directory for the
user if it doesn't already exist.

**Link to tracking Issue:**
open-telemetry#34939

**Testing:** Added

---------

Co-authored-by: Daniel Jaglowski <[email protected]>
Co-authored-by: Andrzej Stencel <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants