Love that queues are public. I just launched a queue to help dedupe slack message processing in our platform, but I’m noticing that I’m not seeing any logging on the consumer side of the queue.
First off, my vercel.json settings:
"functions": {
"app/api/queues/slack-events/route.ts": {
"experimentalTriggers": [
{
"type": "queue/v2beta",
"topic": "slack-events"
}
]
}
}
I can validate that messages get enqueued, and that the consumer is firing and correctly handling the events, so not a concern on the functionality side of things.
I have a thread with the vercel AI support bot (ef053f60-b2ac-4a80-90cd-c227b1a5925f) where I ran down the issue, and it suggested sending a support request (which you cannot do for beta features).
Here is a snippet from our consumer
const processSlackEvent = (payload: SlackQueuePayload, queueMessageId: string) =>
Effect.gen(function* () {
const prisma = yield* PrismaDb
const { event, teamId } = payload
yield* Effect.logInfo(
`[SlackQueueConsumer] Processing event (channel=${event.channel}, ts=${event.ts})`,
)
const say = createSayFunction(prisma, teamId, event)
yield* handleSlackMessage(event, teamId, say, { queueMessageId }).pipe(
Effect.catchAllCause((cause) =>
Effect.gen(function* () {
yield* Effect.logError("[SlackQueueConsumer] Failed to handle Slack message", cause)
}),
),
)
yield* Effect.logInfo(
`[SlackQueueConsumer] Finished processing event (channel=${event.channel}, ts=${event.ts})`,
)
}).pipe(WithSpan.named("slack-queue-consumer", "processSlackEvent"))
export const POST = handleCallback<SlackQueuePayload>(async (message, metadata) => {
await runtime.runPromise(processSlackEvent(message, metadata.messageId))
})
Again, everything is working great, but those logInfo (same behavior when replaced with console.log) never seem to show up in the runtime logs. I’ts not a runtime log filtering issue, they just never appear.
I don’t believe this is expected behavior, but I wanted to check in.
Thanks so much in advance,
Peter