diff --git a/grpc_publisher_service.py b/grpc_publisher_service.py index 6c42f21..2a9b4e8 100644 --- a/grpc_publisher_service.py +++ b/grpc_publisher_service.py @@ -74,7 +74,7 @@ def handle_create_grpc_error_response( """ user_msg = user_msg or str(error) - if error_type == "UNKNOWN": + if error_type == "UNKNOWN" and isinstance(error, Exception): traceback.print_exception(type(error), error, error.__traceback__) if send_to_sentry: sentry_sdk.capture_exception(error) diff --git a/sentry_config.py b/sentry_config.py index 224782a..0da2c00 100644 --- a/sentry_config.py +++ b/sentry_config.py @@ -23,6 +23,7 @@ def initialize_sentry(): get_configs("SENTRY_PROFILES_SAMPLE_RATE", default_value=1.0) ), integrations=[GRPCIntegration()], + enable_tracing=True, ) sentry_sdk.set_tag("project", "Publisher")