axiomhq/next-axiom

404 on _axiom/logs and _axiom/web-vitals

Closed this issue · 2 comments

Hi there, i'm trying to set this up in a standard vercel project using the integration, and in my production deployment I get 404's on both the /logs and /web-vitals requests from my frontend.

Screenshot 2022-12-20 at 10 43 37 PM

Looks like axiom has spun up some lambdas in my project but my build output doesnt show them.

Screenshot 2022-12-20 at 10 43 53 PM

A look at the log stream for the apis shows this message: INVALID_REQUEST_METHOD: This Request was not made with an accepted method, so I guess the lambda does exist it just doesnt know how to handle a post request 🤔

What have I done wrong? I've just followed the standard setup instructions from the vercel integration page.

I'm a goose, I had messed around with my next.config.js file and turned it into a .cjs extension to use require syntax, but next.js apparantly doesnt support that so it was just not seeing the withAxiom wrapper at all. My bad!

glad you figured out the problem 👍 Will close this issue, feel free to re-open if there is something we can help with.