hydra-notify: track the duration of handling an event

[?]
Dec 22, 2021, 12:46 AM
M3VKUXQLUTRT2JM732U24MYH2RGWVNPDR66PM5BTBUARULSVGQUQC

Dependencies

  • [2] DHOKYWTS Hook up the retryable tasks with hydra-notify
  • [3] CQZQE32V Improve handling of Perl's block eval errors
  • [4] 4ZCUCACY hydra-notify: Fix processing notifications
  • [5] 32KJOERM Turn hydra-notify into a daemon
  • [6] I7DFJWL6 hydra-notify: initial scratch take of prometheus events
  • [*] IE2PRAQU hydra-queue-runner: Send build notifications
  • [*] QEXFA5Y2 hydra-notify: use Hydra::Event
  • [*] BJJLHGFC hydra-notify: pre-declare metrics
  • [*] P4SME2BC Abstract over postgres' LISTEN/NOTIFY

Change contents

  • edit in src/script/hydra-notify at line 7
    [9.18]
    [3.37]
    use Time::HiRes qw( gettimeofday tv_interval );
  • edit in src/script/hydra-notify at line 49
    [10.1339]
    [10.1339]
    );
    $prom->declare(
    "notify_event_runtime",
    type => "histogram",
    help => "Number of seconds spent executing events by channel."
  • edit in src/script/hydra-notify at line 118
    [11.2017]
    [3.1058]
    my $start_time = [gettimeofday()];
  • replacement in src/script/hydra-notify at line 139
    [3.894][3.3440:3450](),[3.3440][3.3440:3450]()
    }
    [3.894]
    [2.213]
    };
    $prom->histogram_observe("notify_event_runtime", tv_interval($start_time), { channel => $channelName });