feature: add river inspector that returns various info about the system

オープン
#781 コメント 4 件 リアクション 5 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
25/100
issue の種類
機能追加
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
go, postgresql
領域
api, backend, databases

調査の方向性

Start by reviewing River's subscriptions documentation and the asynq Inspector API for the proposed inspection shape. Compare those options with riverui's internal/dbsqlc SQL queries and the listed approaches for collecting job metrics. Done would require an agreed API for counts by state and kind, but the issue does not define the final scope.

索引モデルが issue の本文から書いたものです。

説明

enhancement
Motivation

I want to periodically upload metrics about jobs count, state, and kind.

The API that allows that would be great, but at the same time I have a workaround and I think this is a low prio issue.

API

I think about something similar as asynq inspector, but only with few methods like:

  • JobsCountByState
  • JobsCountByKind
  • etc...

This API might be utilized by riverui, because right now riverui uses its own sql queries

API dosen't need to guarantee backward compatibility as it will probably change in upcoming versions.

Possible solutions
  1. River middleware that sends telemetry data about each job.

This would work, but many projects enable sampling to reduce the cost of storing large amount of data.

  1. subscriptions

This approach requires a leader election to make sure only one instance sends data.
Btw - I think exposing a leader election as an API would be a great value added by river.

  1. Collector

This is the most common setup and collector could aggregate metrics. But if you want to keep things simple then instances send the telemetry data straight to the external service.

  1. Perioding job + sql

Right now I use periodic job and custom sql queries to fetch the data and send it once a while.

主要言語
Go
スター
5.7k
フォーク
179
平均マージ
15時間 43分
マージ済み PR(30日)
13

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

riverqueue/river のほかの issue

riverqueue/river の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。