Skip to content

Allow exception logging to be customizable for activity failures #704

@markcho

Description

@markcho

Is your feature request related to a problem? Please describe.
We have some use cases where we leverage ApplicationFailure.nonRetryableError for some failures that we expect to happen from an activity.

In these cases, we don’t want these failures to be logged as error. Since we also use a service like Sentry for exception monitoring in our prod services, these expected activity failures will pollute the log and would prefer to only log unexpected failures.

Describe the solution you'd like
Some approach to customize activity failure error logging.
Maxim's proposal was to create a logger per error type as described in here: https://community.temporal.io/t/java-sdk-allow-exception-logging-to-be-customizable-for-activity-failures/2887

Describe alternatives you've considered
An alternative I've considered was to never let expected failures to cause an ApplicationFailure but to model this into a return type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions