sdk-go
sdk-go copied to clipboard
Add ability to not log errors from activities
From Slack:
In the worker side, how would you skip logging activity errors (returned as *cadence.CustomError) that are subsequently handled gracefully (ContinueAsNewError) by the calling workflow? Possibly skip only partially. I couldn't find support for accessing error details + rescinding entry from zap hooks.
One idea is to move all such logging into interceptors and allow redefining them.
Another request is to be able to specify logging behavior per specific error. For example we recommend failing an activity constantly to implement polling. And in this case the error should not be logged. My strawman proposal is to add "doNotLog" flag to the ApplicationError.
@mfateev How is this issue status? I also have a case where I need to suppress error logging for a polling activity.
Is there a way to work around this while this issue is not resolved?
Thank you!
I also have a case where I need to suppress error logging for a polling activity. Any status update on this?
I also need that feature, any updates?
While this feature does not exist yet, you can customize your logger interface implementation to ignore "Activity error." messages. There are even tags on the log statement for which activity and error it is if you need to be specific.
Also need to suppress the metrics temporal_activity_execution_failed.