mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-05-06 17:56:40 +02:00
fix: properly log ap send errors to the appropriate analytics namespace
This commit is contained in:
@@ -510,7 +510,7 @@ ActivityPub.record.sendError = async ({ payload, uri, error }) => {
|
||||
body: JSON.stringify(payload),
|
||||
stack: error.message,
|
||||
}),
|
||||
analytics.increment(['ap.out', `ap.out:byType:${payload.type}`, `ap.out:byHost:${hostname}`]),
|
||||
analytics.increment(['ap.outErr', `ap.outErr:byType:${payload.type}`, `ap.outErr:byHost:${hostname}`]),
|
||||
]);
|
||||
await db.expire(`ap.errors:${id}`, 60 * 60 * 24); // 24 hours
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user