• 
      

    Add log timers around all outbound communications.

    Review Request #14372 — Created March 18, 2025 and submitted

    Information

    rbintegrations
    release-4.x

    Reviewers

    From time to time, network issues or service outages can cause slow or
    blocked communication, which can be difficult to diagnose.

    To help diagnose these problems, rbintegrations now logs the time taken
    for all outbound communications with third-party services, escalating
    the logs to warnings or critical errors if the service takes too long to
    respond.

    Errors encountered during this time are logged with the same trace ID
    that the timing logs use.

    Since the new logging functionality used for this does not exist in
    Review Board 7.0.x or older, a backport of log_timed() is provided in
    rbintegrations.util.compat.logs. This module is considered internal
    and will go away when we can rely on the modern support.

    All unit tests pass.

    Summary ID
    Add log timers around all outbound communications.
    From time to time, network issues or service outages can cause slow or blocked communication, which can be difficult to diagnose. To help diagnose these problems, rbintegrations now logs the time taken for all outbound communications with third-party services, escalating the logs to warnings or critical errors if the service takes too long to respond. Errors encountered during this time are logged with the same trace ID that the timing logs use. Since the new logging functionality used for this does not exist in Review Board 7.0.x or older, a backport of `log_timed()` is provided in `rbintegrations.util.compat.logs`. This module is considered internal and will go away when we can rely on the modern support.
    c0846059228cfd9aee09350ae234fc374e03202e
    Description From Last Updated

    Can we move this outside the log_timed block?

    daviddavid
    david
    1. 
        
    2. rbintegrations/asana/views.py (Diff revision 1)
       
       
       
       
       
      Show all issues

      Can we move this outside the log_timed block?

      1. I could I suppose. I kept this here in order to end up in the logging with the context of the "Requesting tasks...", replacing the former KeyError that would have appeared. It seemed a niche enough case with fewer lines of code affected to do it this way.

    3. 
        
    david
    1. Your choice about whether you want to move that exception handler. Otherwise, this looks good.

    2. 
        
    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-4.x (b4c2042)