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

Be able to include file owner and group as attribute on filelogreceiver #30775

Closed
tprelle opened this issue Jan 25, 2024 · 4 comments
Closed
Labels
enhancement New feature or request receiver/filelog

Comments

@tprelle
Copy link
Contributor

tprelle commented Jan 25, 2024

Component(s)

receiver/filelog

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

When you want to filter log on a shared host with multiple user, you want to be able to add owner and group of the file log. Currenly this lookup it's not possible so it's hard to filter after.

Describe the solution you'd like

During the resolver code on the file consumer, we can retrieve these infos

Describe alternatives you've considered

No response

Additional context

No response

@tprelle tprelle added enhancement New feature or request needs triage New item requiring triage labels Jan 25, 2024
Copy link
Contributor

Pinging code owners:

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

@djaglowski
Copy link
Member

I think this is reasonable assuming the following:

  • By default, this information is not attached.
  • When not enabled, there is no performance impact from adding this capability.
  • The settings are feature gated until semantic conventions have been established for these attributes.
  • We clearly document whether these are applicable to Windows or not and handle appropriately in code.

Additionally, I think we should separate this into two config flags e.g. include_file_owner and include_file_group, (and two corresponding feature gates).

@djaglowski djaglowski removed the needs triage New item requiring triage label Jan 25, 2024
Copy link
Contributor

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.

Pinging code owners:

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

@github-actions github-actions bot added the Stale label Mar 26, 2024
@djaglowski djaglowski removed the Stale label Mar 26, 2024
djaglowski pushed a commit that referenced this issue Mar 27, 2024
#30776)

**Description:** When you want to filter log on a shared host with
multiple user, you want to be able to add owner and group of the file
log. Currenly this lookup it's not possible so it's hard to filter
after.
If include_file_infos is true when reading a file on filelogreceiver, it
will add the file owner as the attribute `log.file.owner` and the file
group as the attribute `log.file.group`.
**Link to tracking Issue:** #30775

**Testing:** Add unity test 

**Documentation:** Add documentation on file_input and file log
receiver.
@djaglowski
Copy link
Member

Closed by #30776

LokeshOpsramp pushed a commit to opsramp/opentelemetry-collector-contrib that referenced this issue May 5, 2024
open-telemetry#30776)

**Description:** When you want to filter log on a shared host with
multiple user, you want to be able to add owner and group of the file
log. Currenly this lookup it's not possible so it's hard to filter
after.
If include_file_infos is true when reading a file on filelogreceiver, it
will add the file owner as the attribute `log.file.owner` and the file
group as the attribute `log.file.group`.
**Link to tracking Issue:** open-telemetry#30775

**Testing:** Add unity test 

**Documentation:** Add documentation on file_input and file log
receiver.
rimitchell pushed a commit to rimitchell/opentelemetry-collector-contrib that referenced this issue May 8, 2024
open-telemetry#30776)

**Description:** When you want to filter log on a shared host with
multiple user, you want to be able to add owner and group of the file
log. Currenly this lookup it's not possible so it's hard to filter
after.
If include_file_infos is true when reading a file on filelogreceiver, it
will add the file owner as the attribute `log.file.owner` and the file
group as the attribute `log.file.group`.
**Link to tracking Issue:** open-telemetry#30775

**Testing:** Add unity test 

**Documentation:** Add documentation on file_input and file log
receiver.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request receiver/filelog
Projects
None yet
Development

No branches or pull requests

2 participants