When looking into application insights a see most of the errors coming from:
Returning error 50000 running Sitecore 9.0.2. The stored procedure only checks some records and I don't see any exceptions in the logs.
How can I solve this issue or should this dependency be excluded?
SELECT * FROM sysmessages WHERE error = 50000- with just the error code, its impossible to see what your issue might be.
Msg 50000, Level 16, State 1, Procedure xdb_processing_tasks.History_GetTaskStateById, Line 77 [Batch Start Line 0] A rebuild process with the specified unique identifier does not exist.