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

[pkg/stanza] file read status observability #30473

Open
newly12 opened this issue Jan 12, 2024 · 8 comments
Open

[pkg/stanza] file read status observability #30473

newly12 opened this issue Jan 12, 2024 · 8 comments
Labels
enhancement New feature or request never stale Issues marked with this label will be never staled and automatically removed pkg/stanza receiver/filelog

Comments

@newly12
Copy link
Contributor

newly12 commented Jan 12, 2024

Component(s)

pkg/stanza

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

We are adopting file log receiver largely for collecting logs and would like to see apart from checking registry file manually for the last read offset, trying to figure out the possibility to build this feature as part of stanza package or the receiver itself.

Describe the solution you'd like

If we are adding this, I think it could be metrics use case, for example, something like following with the file path as the metrics label(as long as the file is still a valid input source)

  1. file size
  2. read offset

After checking the code, the best place for this is the Manager struct from the fileconsumer package as it has the info of file path and latest offset. One alternative I can think of is build something around the storage extension so when any offset/metadata is persisted via it, it can decode the data to get the offset, but this also means overhead on the decoding work.

I appreciate all suggestions or comments.

Describe alternatives you've considered

No response

Additional context

No response

@newly12 newly12 added enhancement New feature or request needs triage New item requiring triage labels Jan 12, 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 generally support the idea. I know there is some ongoing work to migrate the collector's internal telemetry to native otel instrumentation but we should be looking to define component-specific metrics in the near future.

One thing to keep in mind when reporting metrics in terms of file paths is that in many cases file rotation will result in a time series being "reset". It's not immediately clear what the proper way to model this is, but as the consumer of a time series it would not necessarily be obvious what this means. For example: file size for "foo.log" [ 4, 13, 42, /* file is rotated */ 5, 27, ... ]. It may just be that we need to use a monotonic counter and document that resets may be due to file rotation.

Copy link
Contributor

Pinging code owners for receiver/filelog: @djaglowski. See Adding Labels via Comments if you do not have permissions to add labels yourself.

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 Apr 17, 2024
@djaglowski djaglowski added release:required-for-ga Must be resolved before GA release never stale Issues marked with this label will be never staled and automatically removed and removed Stale release:required-for-ga Must be resolved before GA release never stale Issues marked with this label will be never staled and automatically removed labels Apr 17, 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.

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 Aug 28, 2024
@djaglowski djaglowski removed the Stale label Sep 3, 2024
Copy link
Contributor

github-actions bot commented Nov 4, 2024

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 Nov 4, 2024
@djaglowski djaglowski added never stale Issues marked with this label will be never staled and automatically removed and removed Stale labels Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request never stale Issues marked with this label will be never staled and automatically removed pkg/stanza receiver/filelog
Projects
None yet
Development

No branches or pull requests

2 participants