Fix usability issues for queue and inbox error metrics
All checks were successful
Lint / pnpm_install (pull_request) Successful in 1m22s
Publish Docker image / Build (pull_request) Successful in 4m47s
Test (production install and build) / production (22.11.0) (pull_request) Successful in 1m7s
Test (backend) / unit (22.11.0) (pull_request) Successful in 8m35s
Test (backend) / e2e (22.11.0) (pull_request) Successful in 12m9s
Lint / lint (backend) (pull_request) Successful in 2m47s
Lint / lint (frontend) (pull_request) Successful in 2m39s
Lint / lint (frontend-embed) (pull_request) Successful in 2m40s
Lint / lint (frontend-shared) (pull_request) Successful in 2m38s
Lint / lint (misskey-bubble-game) (pull_request) Successful in 2m36s
Lint / lint (misskey-js) (pull_request) Successful in 2m37s
Lint / lint (misskey-reversi) (pull_request) Successful in 2m41s
Lint / lint (sw) (pull_request) Successful in 2m43s
Lint / typecheck (backend) (pull_request) Successful in 2m25s
Lint / typecheck (misskey-js) (pull_request) Successful in 1m42s
Lint / typecheck (sw) (pull_request) Successful in 1m34s
Lint / pnpm_install (push) Successful in 2m12s
Publish Docker image / Build (push) Successful in 4m38s
Test (production install and build) / production (22.11.0) (push) Successful in 1m5s
Lint / lint (backend) (push) Successful in 2m19s
Test (backend) / unit (22.11.0) (push) Successful in 9m4s
Lint / lint (frontend) (push) Successful in 2m29s
Lint / lint (frontend-embed) (push) Successful in 2m29s
Lint / lint (frontend-shared) (push) Successful in 2m32s
Lint / lint (misskey-bubble-game) (push) Successful in 2m32s
Test (backend) / e2e (22.11.0) (push) Successful in 12m35s
Lint / lint (misskey-js) (push) Successful in 2m43s
Lint / lint (misskey-reversi) (push) Successful in 2m43s
Lint / lint (sw) (push) Successful in 2m37s
Lint / typecheck (backend) (push) Successful in 2m22s
Lint / typecheck (misskey-js) (push) Successful in 1m43s
Lint / typecheck (sw) (push) Successful in 1m44s
All checks were successful
Lint / pnpm_install (pull_request) Successful in 1m22s
Publish Docker image / Build (pull_request) Successful in 4m47s
Test (production install and build) / production (22.11.0) (pull_request) Successful in 1m7s
Test (backend) / unit (22.11.0) (pull_request) Successful in 8m35s
Test (backend) / e2e (22.11.0) (pull_request) Successful in 12m9s
Lint / lint (backend) (pull_request) Successful in 2m47s
Lint / lint (frontend) (pull_request) Successful in 2m39s
Lint / lint (frontend-embed) (pull_request) Successful in 2m40s
Lint / lint (frontend-shared) (pull_request) Successful in 2m38s
Lint / lint (misskey-bubble-game) (pull_request) Successful in 2m36s
Lint / lint (misskey-js) (pull_request) Successful in 2m37s
Lint / lint (misskey-reversi) (pull_request) Successful in 2m41s
Lint / lint (sw) (pull_request) Successful in 2m43s
Lint / typecheck (backend) (pull_request) Successful in 2m25s
Lint / typecheck (misskey-js) (pull_request) Successful in 1m42s
Lint / typecheck (sw) (pull_request) Successful in 1m34s
Lint / pnpm_install (push) Successful in 2m12s
Publish Docker image / Build (push) Successful in 4m38s
Test (production install and build) / production (22.11.0) (push) Successful in 1m5s
Lint / lint (backend) (push) Successful in 2m19s
Test (backend) / unit (22.11.0) (push) Successful in 9m4s
Lint / lint (frontend) (push) Successful in 2m29s
Lint / lint (frontend-embed) (push) Successful in 2m29s
Lint / lint (frontend-shared) (push) Successful in 2m32s
Lint / lint (misskey-bubble-game) (push) Successful in 2m32s
Test (backend) / e2e (22.11.0) (push) Successful in 12m35s
Lint / lint (misskey-js) (push) Successful in 2m43s
Lint / lint (misskey-reversi) (push) Successful in 2m43s
Lint / lint (sw) (push) Successful in 2m37s
Lint / typecheck (backend) (push) Successful in 2m22s
Lint / typecheck (misskey-js) (push) Successful in 1m43s
Lint / typecheck (sw) (push) Successful in 1m44s
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
This commit is contained in:
parent
31f19bd686
commit
6fab3e6087
3 changed files with 9 additions and 2 deletions
|
@ -18,7 +18,7 @@ import {
|
||||||
SystemWebhookDeliverJobData,
|
SystemWebhookDeliverJobData,
|
||||||
} from '../queue/types.js';
|
} from '../queue/types.js';
|
||||||
import type { Provider } from '@nestjs/common';
|
import type { Provider } from '@nestjs/common';
|
||||||
import { mActiveJobs, mDelayedJobs, mJobBlockedCounter, mWaitingJobs } from '@/queue/metrics.js';
|
import { mActiveJobs, mDelayedJobs, mFailedJobs, mJobBlockedCounter, mWaitingJobs } from '@/queue/metrics.js';
|
||||||
|
|
||||||
export type SystemQueue = Bull.Queue<Record<string, unknown>>;
|
export type SystemQueue = Bull.Queue<Record<string, unknown>>;
|
||||||
export type EndedPollNotificationQueue = Bull.Queue<EndedPollNotificationJobData>;
|
export type EndedPollNotificationQueue = Bull.Queue<EndedPollNotificationJobData>;
|
||||||
|
@ -36,6 +36,7 @@ function withMetrics<T>(queue: Bull.Queue<T>): Bull.Queue<T> {
|
||||||
mActiveJobs?.set({ queue: queue.name }, await queue.getActiveCount());
|
mActiveJobs?.set({ queue: queue.name }, await queue.getActiveCount());
|
||||||
mDelayedJobs?.set({ queue: queue.name }, await queue.getDelayedCount());
|
mDelayedJobs?.set({ queue: queue.name }, await queue.getDelayedCount());
|
||||||
mWaitingJobs?.set({ queue: queue.name }, await queue.getWaitingCount());
|
mWaitingJobs?.set({ queue: queue.name }, await queue.getWaitingCount());
|
||||||
|
mFailedJobs?.set({ queue: queue.name }, await queue.getFailedCount());
|
||||||
}, 2000);
|
}, 2000);
|
||||||
|
|
||||||
queue.on('waiting', () => {
|
queue.on('waiting', () => {
|
||||||
|
|
|
@ -24,6 +24,12 @@ export const mWaitingJobs = metricGauge({
|
||||||
labelNames: ['queue'],
|
labelNames: ['queue'],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
export const mFailedJobs = metricGauge({
|
||||||
|
name: 'misskey_queue_failed_jobs',
|
||||||
|
help: 'Total number of failed jobs',
|
||||||
|
labelNames: ['queue'],
|
||||||
|
});
|
||||||
|
|
||||||
export const mStalledWorkerCounter = metricCounter({
|
export const mStalledWorkerCounter = metricCounter({
|
||||||
name: 'misskey_queue_stalled_workers_total',
|
name: 'misskey_queue_stalled_workers_total',
|
||||||
help: 'Total number of stalled workers',
|
help: 'Total number of stalled workers',
|
||||||
|
|
|
@ -152,9 +152,9 @@ export class InboxProcessorService implements OnApplicationShutdown {
|
||||||
// 対象が4xxならスキップ
|
// 対象が4xxならスキップ
|
||||||
if (err instanceof StatusError) {
|
if (err instanceof StatusError) {
|
||||||
if (!err.isRetryable) {
|
if (!err.isRetryable) {
|
||||||
incCounter(mIncomingApReject, { reason: 'actor_key_unresolvable' });
|
|
||||||
throw new Bull.UnrecoverableError(`skip: Ignored deleted actors on both ends ${activity.actor} - ${err.statusCode}`);
|
throw new Bull.UnrecoverableError(`skip: Ignored deleted actors on both ends ${activity.actor} - ${err.statusCode}`);
|
||||||
}
|
}
|
||||||
|
incCounter(mIncomingApReject, { reason: 'actor_key_unresolvable' });
|
||||||
throw new Error(`Error in actor ${activity.actor} - ${err.statusCode}`);
|
throw new Error(`Error in actor ${activity.actor} - ${err.statusCode}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue