Some Cloudwatch queries - Tue Oct 248:57 AM

I self host my Next.js site, and as a result, errors sometimes get gnarly and hard to debug 😅. Here’s a CloudWatch query that I’ve been using to comb through the structured logs that I previously mentioned.

👆 outputs 👇

2023-10-24T12:55:54.473Z(blog)/[...slug]/page.tsxerrorBlogPage failed to renderENOENT: no such file or directory, open '/var/task/apps/web/posts/tags/terraform-provider.mdx'
2023-10-24T12:55:53.501Z(blog)/[...slug]/page.tsxinfonavData compiled

Also, TIL that Node.js's console.trace() includes a stack trace... big derp moment.

For tracing, novocaine/sourcemapped-stacktrace looks promising. My hope is that it'll make tracing back to exact log lines easier, and so that I don’t do a hack, like passing a filepath to my logger name, as seen in the @module column.