Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #71 from ar-io/prometheus-metrics
Browse files Browse the repository at this point in the history
fix(promehteus): move metric increment and add log
  • Loading branch information
dtfiedler authored Nov 27, 2023
2 parents a4fb4bf + 280d66c commit 9d4b38c
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/routes/contract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,24 @@ export async function contractInteractionsHandler(ctx: KoaContext) {
const mappedInteractions = [...interactions.keys()].map((id: string) => {
const interaction = interactions.get(id);
if (interaction) {
// record the mismatch so we can debug
if (!Object.keys(validity).includes(id)) {
logger.debug(
'Interaction found via GraphQL but not evaluated by warp',
{
contractTxId,
interaction: id,
},
);
mismatchedInteractionCount.inc();
}
return {
...interaction,
valid: validity[id] ?? false,
...(errorMessages[id] ? { error: errorMessages[id] } : {}),
id,
};
}
// record the mismatch so we can debug
mismatchedInteractionCount.inc();
return;
});

Expand Down

0 comments on commit 9d4b38c

Please sign in to comment.