Skip to content

Bad request 400 on webvitals production #264

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions