-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Consider testing enhancements for filelog
receiver
#32001
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
I agree in principle that we should have robust coverage for almost all these scenarios, but it's not clear to me whether we need these to be more than unit tests at the receiver level. For the most part, I'd like to try to find ways to localize the tests as much as possible without compromising the value they would provide. For example, I'd rather we develop a mock
This is relatively well tested in unit tests. What do we gain by making this an e2e test?
We have decent coverage for non-duplication after restarting in unit tests. However, we don't have coverage which also includes backpressure from downstream consumers. This seems like a good candidate for a receiver unit test, given a mock consumer which applies backpressure.
How would you test this in this repo?
This likely does require an e2e test. Do you have ideas how this would be implemented in this repo?
These are all relatively well tested in unit tests. What do we gain by making this an e2e test?
I don't think this is tested, but could be a unit test similar to the above. |
Thank's @djaglowski! It's true that For For For This test-case covers |
We have this unit test which tests correctness.
It would likely be good to involve restart into these tests. Ideally if there are some exact scenarios which could be problematic, we would cover them precisely in unit tests. However, rotation often comes down to timing and this can be difficult to test. I'd be curious to see what you can come up with though. I believe so
This test is aimed at |
filelog
receiver's offset trackingfilelog
receiver
Thinking of So back to your proposal for the backpressure unit test, do you mean that we could have a similar to the TestRestartOffsets with an extra delay (==backpressure) in the sink.Callback just to ensure the |
I think what may be missing is in our coverage is that when the reader emits a token it is processed within |
It looks like there's been some good discussion here, and a general direction is agreed upon. Removing |
Cool, I think something like the TestShutdownFlush from swiatekm@9747d92, which tried to prove #31074 is really close to what we need. Along with solving #31074 we should include a test like this as well. |
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 Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
/label -Stale |
Reading the discussion, it seems like the pending work at this point is #31074. @ChrsMark @djaglowski can we close this issue here then? |
From my perspective I'm fine with closing this. Most of the cases were already covered and some extra ones were added as well. Only the issue described in #31074 seems to not be covered. It can be re-opened if there is a tangible need for the |
Component(s)
receiver/filelog
Describe the issue you're reporting
As of today the OTel Collector can handle log collection without loss or duplication after restarts.
This is possible by using the storage extension to store the receiver's state and using a persistent-queue to persist the exporter's state.
This is documented at the offset tracking section and the fault-tolerant-logs-collection example.
However there are cases where it has been reported data loss like at #31074, in which is not quite straightforward from where the issue comes from. This also indicates the lack of e2e testing for this important use case.
It is already mentioned the need for e2e tests at #20552 however since that issue is more generic I would like to propose a more specific scope here to cover use cases like #31074.
In this regard, we should consider implementing e2e tests for at least the following scenarios:
A) Basic restart scenarios (offset tracking)
B) Nice to have(s):
C) Changes on target files
cc: @djaglowski @ycombinator
The text was updated successfully, but these errors were encountered: