Skip to content

[bug] "[evlog] log.set() called after the wide event was emitted — Keys dropped: ai #321

@serhii-chernenko

Description

@serhii-chernenko

evlog version

2.15.0

Runtime & OS

cloudflare workers

Framework / integration

Nuxt

Adapter or drain (optional)

No response

Description

After latest upgrade yesterday I see new warn in cloudflare workers observability:

"[evlog] log.set() called after the wide event was emitted — Keys dropped: ai. This data will not appear in observability. For intentional background work tied to this request, use log.fork('label', fn) when your integration supports it (see https://evlog.dev).

In my setup with Nuxt + Vercel AI SDK I strictly followed this doc:
https://www.evlog.dev/logging/ai-sdk/usage

The endpoint file is here:

Expected behavior

No warning or clear guidance / updated doc on how it should be fixed properly

Actual behavior

Warning in the workers observability tab

Reproduction

Steps to install & run in the cloudflare workers environment:
https://github.com/besidka/besidka#steps

Logs or structured output (optional)

{
  "level": "warn",
  "message": "[evlog] log.set() called after the wide event was emitted — Keys dropped: ai. This data will not appear in observability. For intentional background work tied to this request, use log.fork('label', fn) when your integration supports it (see https://evlog.dev).",
  "$workers": {
    "truncated": false,
    "event": {
      "request": {
        "url": "https://www.besidka.com/api/v1/chats/01KQVTQQ4KGPA7ZN6JBS12Z0KP",
        "method": "POST",
        "path": "/api/v1/chats/01KQVTQQ4KGPA7ZN6JBS12Z0KP"
      }
    },
    "outcome": "ok",
    "scriptName": "besidka",
    "eventType": "fetch",
    "executionModel": "stateless",
    "scriptVersion": {
      "id": "c0cb618c-7534-4674-a96c-baff3fc6080b"
    },
    "requestId": "9f6f0aa02cafcce9"
  },
  "$metadata": {
    "id": "01KQVTXX30YDWNJA6J2NT51WFK",
    "requestId": "9f6f0aa02cafcce9",
    "trigger": "POST /api/v1/chats/01KQVTQQ4KGPA7ZN6JBS12Z0KP",
    "service": "besidka",
    "level": "warn",
    "message": "[evlog] log.set() called after the wide event was emitted — Keys dropped: ai. This data will not appear in observability. For intentional background work tied to this request, use log.fork('label', fn) when your integration supports it (see https://evlog.dev).",
    "account": "5396970bbe7f97f2d01c5b759444cd40",
    "type": "cf-worker",
    "fingerprint": "bd3821c1a1df745a2dae1968d0dc4c04",
    "origin": "fetch",
    "messageTemplate": "[evlog] <DOMAIN>() called after the wide event was emitted — Keys dropped: ai. This data will not appear in observability. For intentional background work tied to this request, use <DOMAIN>('label', fn) when your integration supports it (see https://evlog.dev)."
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions