So, after trying it out and discussing how we should integrate it with our tools, there are some points we need to consider:
Sentry has a lot of integration with various frameworks in Go to enrich the context sent with events. However, we are not using any of them :) For example web frameworks include: gin, echo, net/http but not mux. Also, for loggers it supports logrus and we are using zerolog. It might be worth it to switch to one of the supported frameworks.
Since we will be sending some deployment data, we need to implement a proper redaction of deployment data to make sure no sensitive data is sent.
Instead of having to implement the same error capturing in all of our tools we could do it in the go-client itself so that it can be configured to capture and send data and all tools built on go-client can just add its specific context. For example: tfrobot can add some details about number of groups or number of vms.
We need to configure all of our tools to give the user the option whether to opt in with the error collection or not. I think for development/testing environment it should be on by default while production should have it turned off.
So, in summary:
[ ] Redact sensitive workload data in client.
[ ] Add an option to tfPluginClient to use an instance of Sentry client.
[ ] Based on whether the option is used report in different client operation (deploy, cancel, list, etc...)
[ ] Tools based on client would just need to add their context and just pass an instance to the plugin client where it will report the rest.
[ ] Tools not using the client (farmerbot, grid-proxy) needs to have a bit of a manual configuration since they are using mux and zerolog (which aren't supported).
Is your feature request related to a problem? Please describe
we need to track and monitor errors happends in sdk during deploymnets
Describe the solution you'd like
we will track errors on sentry more info is here https://github.com/threefoldtech/home/issues/1554