Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions snuba/web/rpc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
RoutingStrategySelector,
)

logger = logging.getLogger("snuba.rpc")

_TIME_PERIOD_HOURS_BUCKETS = [
1,
24,
Expand Down Expand Up @@ -316,7 +318,7 @@ def _before_execute(self, in_msg: Tin) -> None:
request_id = in_msg.meta.request_id

# Log RPC request start
logging.info(
logger.info(
f"RPC request started - endpoint: {self.__class__.__name__}, request_id: {request_id}"
)

Expand Down Expand Up @@ -380,7 +382,7 @@ def _after_execute(self, in_msg: Tin, out_msg: Tout, error: Exception | None) ->
request_id = in_msg.meta.request_id

status = "error" if error is not None else "success"
logging.info(
logger.info(
f"RPC request finished - endpoint: {self.__class__.__name__}, request_id: {request_id}, status: {status}"
)
flush_logs = state.get_float_config("rpc_logging_flush_logs", 0)
Expand Down
Loading