-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add healthchecks for transforms #2495
Comments
Thanks. Isn't a better approach to implement an initialization callback? The healthcheck shouldn't be responsible for initialization, it should only verify that it has everything it needs to function properly. |
@binarylogic I believe if you run vector to block on healthy healthchecks then you get the behavior of no events missing data. If you don't include that then it won't so I see healthchecks as aligning with the behavior we want. As for an init future, that could work but would deviate from what we currently do with our other components. We generally prefer to lazily do things instead of upfront with an init future. I'd like to hear what @lukesteensen thinks of that. |
That's good, but I think it's misleading. It's not obvious to users that healtchecks change state. FTR, I don't think they should either.
Sure, then I'd say the |
I agree that using a healthcheck as initialization is a confusing combination of two concerns that should be separate. Currently, our "init" phase is just the |
The way I was viewing it is the metadata for the vector instance is global, so if the first fetch happens during a healthcheck we can just use that data. But I agree it is a bit confusing.
Yeah, that could work I really wonder if that is a healthcheck or if we can change healthchecks in general to be an init and if it fails we don't run the components? |
So I think this is a particular case where health checking and initialization consist of basically the same action. That certainly isn't always the case, so I think we should be cautious of drawing general conclusions based on it. It'd be better to wait until we have a least a handful of transform use cases that would benefit from health checking and/or initialization before deciding on a design. |
Some of our transforms need to fetch data from external systems. This means the data may not be available by the time the first event comes through the system. Currently, the behavior is to just let the event pass through without enriching it. To avoid this we can instead add healthchecks for these transforms that will block the topology from being ready until data is available. This achieves the proper healthcheck requirement but will also provide a much more consistent experience for users.
We most likely want to update the
TransformConfig
trait to add a healthcheck method that has a default implementation that always resolves to ready.The text was updated successfully, but these errors were encountered: