Skip to content

Commit da3bc2e

Browse files
committed
Reduce log spam! Makes it much easier to follow agent traces in jlv
1 parent 8ed66f1 commit da3bc2e

File tree

4 files changed

+19
-28
lines changed

4 files changed

+19
-28
lines changed

backend/src/run-programmatic-step.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -318,14 +318,6 @@ export async function runProgrammaticStep(
318318
case 'subagent_start':
319319
case 'subagent_finish':
320320
if (!chunk.parentAgentId) {
321-
logger.debug(
322-
{
323-
eventType: chunk.type,
324-
agentId: chunk.agentId,
325-
parentId: parentAgentId,
326-
},
327-
`run-programmatic-step: Adding parentAgentId to ${chunk.type} event`,
328-
)
329321
onResponseChunk({
330322
...chunk,
331323
parentAgentId,
@@ -347,10 +339,6 @@ export async function runProgrammaticStep(
347339
eventType: chunk.type,
348340
parentId: parentAgentId,
349341
}
350-
logger.debug(
351-
debugPayload,
352-
`run-programmatic-step: Adding parentAgentId to ${chunk.type} event`,
353-
)
354342
onResponseChunk({
355343
...chunk,
356344
parentAgentId,

common/src/analytics.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ export function trackEvent({
4646
logger: Logger
4747
}) {
4848
if (env.NEXT_PUBLIC_CB_ENVIRONMENT !== 'prod') {
49-
logger.info({ payload: { event, properties } }, 'Analytics event tracked')
49+
// Note (James): This log was too noisy. Reenable it as you need to test something.
50+
// logger.info({ payload: { event, properties } }, event)
5051
return
5152
}
5253

packages/bigquery/src/client.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,11 @@ export async function insertTrace({
148148

149149
await getClient().dataset(dataset).table(TRACES_TABLE).insert(traceToInsert)
150150

151-
logger.debug(
152-
{ traceId: trace.id, type: trace.type },
153-
'Inserted trace into BigQuery',
154-
)
151+
// Note (James): This log was too noisy.
152+
// logger.debug(
153+
// { traceId: trace.id, type: trace.type },
154+
// 'Inserted trace into BigQuery',
155+
// )
155156
return true
156157
} catch (error) {
157158
logger.error(

packages/billing/src/balance-calculator.ts

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,18 @@ export async function updateGrantBalance(params: {
8686
.set({ balance: newBalance })
8787
.where(eq(schema.creditLedger.operation_id, grant.operation_id))
8888

89-
logger.debug(
90-
{
91-
userId,
92-
grantId: grant.operation_id,
93-
grantType: grant.type,
94-
consumed,
95-
remaining: newBalance,
96-
expiresAt: grant.expires_at,
97-
},
98-
'Updated grant remaining amount after consumption',
99-
)
89+
// Note (James): This log was too noisy. Reenable it as you need to test something.
90+
// logger.debug(
91+
// {
92+
// userId,
93+
// grantId: grant.operation_id,
94+
// grantType: grant.type,
95+
// consumed,
96+
// remaining: newBalance,
97+
// expiresAt: grant.expires_at,
98+
// },
99+
// 'Updated grant remaining amount after consumption',
100+
// )
100101
}
101102

102103
/**

0 commit comments

Comments
 (0)