Skip to content

Add Nakama metrics and structured AI decision observability #81

@JOY

Description

@JOY

Project: Second Spawn
Area: Nakama
Milestone: Foundation
Priority: P1
Size: M
Review Gate: Local Review
Verification: Backend Tests

Goal

Make Nakama and AI-agent behavior observable before larger autonomous NPC tests.

Scope

  • Document and enable Nakama metrics export for local/staging operations.
  • Add structured logs for agent decisions: actor id, source, source reason, allowed actions, selected action, target id, validation result, model, and latency.
  • Track rate-limit, token-budget, storage-conflict, reward-claim, and BodyTime mutation events.
  • Preserve player privacy and avoid logging provider secrets.

Acceptance Criteria

  • Local/staging operators can see model vs fallback rate.
  • Important AI and economy validation branches produce structured logs.
  • No API keys or private prompt payloads are logged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:ai-agentOffline player agent, NPC intelligence, and agent observabilityarea:devopsCI, deployment, build, and infrastructure workflowarea:nakamaNakama runtime, storage, auth, social, or backend modulesenhancementNew feature or requestpriority:p1High priority for current milestonesize:mMedium task

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Backlog

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions