Skip to content

Commit

Permalink
fix:Improve unknown error handling and tracing.
Browse files Browse the repository at this point in the history
  • Loading branch information
PromiseFru committed Nov 8, 2024
1 parent 1ee2455 commit f5b4e5e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion grpc_publisher_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions sentry_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit f5b4e5e

Please sign in to comment.