Skip to content

Bad request 400 on webvitals production #264

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
gaufranc opened this issue Feb 14, 2025 · 0 comments
Open

Bad request 400 on webvitals production #264

gaufranc opened this issue Feb 14, 2025 · 0 comments

Comments

@gaufranc
Copy link

Hi there, i have my logs with axiom working perfectly both in my backend and frontend, however, when i tried to implement webvitals, the response is always the same (on production)

Response:
POST 400 {"message":"Bad Request"}

Request:
POST https://mysite/_axiom/web-vitals
Request object:

{
    "webVitals": [
        {
            "route": "/",
            "id": "v3-1739554802146-5095691802954",
            "name": "CLS",
            "startTime": 3292.5,
            "value": 0.009110793759829353,
            "label": "web-vital"
        },
        {
            "route": "/",
            "id": "v3-1739554802147-7353210960343",
            "name": "INP",
            "startTime": 2343.699999988079,
            "value": 128,
            "label": "web-vital"
        },
        {
            "route": "/",
            "id": "v3-1739554802147-4263518551461",
            "name": "LCP",
            "startTime": 2016,
            "value": 1259.300000011921,
            "label": "web-vital"
        }
    ],
    "environment": "production"
}

My NEXT_PUBLIC_AXIOM_INGEST_ENDPOINT is setup aswell.

Package versions:
next: 14.2.1
next-axiom: ^0.18.1

I need to use next-axiom version 0 since version 1 doesnt allow for tRPC

My next.config.js is wrapped with withAxiom and also is my tRPC context.

Any ideas?

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant