Skip to content

Commit

Permalink
Add test spans
Browse files Browse the repository at this point in the history
  • Loading branch information
dneilroth committed Aug 26, 2024
1 parent c40fa0b commit 49aa81b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/web/pages/api/proofs/cb1/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
return res.status(500).json({ error: 'currently unable to sign' });
}

const span = tracer.startSpan('cb1_proof');
try {
const result = await sybilResistantUsernameSigning(
address as `0x${string}`,
Expand All @@ -60,6 +61,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
return res.status(error.statusCode).json({ error: error.message });
}
logger.error(error);
} finally {
span.finish();
}

// If error is not an instance of Error, return a generic error message
Expand Down
3 changes: 3 additions & 0 deletions apps/web/pages/api/proofs/coinbase/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
return res.status(500).json({ error: 'currently unable to sign' });
}

const span = tracer.startSpan('coinbase_proof');
try {
const result = await sybilResistantUsernameSigning(
address as `0x${string}`,
Expand All @@ -66,6 +67,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
return res.status(error.statusCode).json({ error: error.message });
}
logger.error(error);
} finally {
span.finish();
}

// If error is not an instance of Error, return a generic error message
Expand Down

0 comments on commit 49aa81b

Please sign in to comment.