Skip to content

Commit

Permalink
Include attachmentId in error metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Inrixia committed Apr 12, 2024
1 parent 6d782d5 commit 30d520b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/Video.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const promQueued = new Gauge({
const promErrors = new Counter({
name: "errors",
help: "Video errors",
labelNames: ["message"],
labelNames: ["message", "attachmentId"],
});
const promDownloadedTotal = new Counter({
name: "downloaded_total",
Expand Down Expand Up @@ -133,7 +133,7 @@ export class Video extends VideoBase {
break;
} catch (error) {
const message = this.parseErrorMessage(error);
promErrors.labels({ message: message }).inc();
promErrors.labels({ message, attachmentId: this.attachmentId }).inc();

if (retries < Video.MaxRetries) {
logger.error(`${message} - Retrying in ${retries}s [${retries}/${Video.MaxRetries}]`);
Expand Down

0 comments on commit 30d520b

Please sign in to comment.