Skip to content

feat: trace the Memory write path #1242

Description

@PsiACE

Feature description

Add bounded tracing for source capture and the Memory flush pipeline.

Problem and proposed solution

flush_memory currently covers extraction, embedding, and persistence without showing which stage completed or failed.

Possible trace structure:

powercontext capture_content_source
└── memory.capture

powercontext flush_memory
└── memory.flush
    ├── invoke_agent memory_extraction
    ├── embeddings <model>
    └── memory.commit

Record only bounded counts, latency, outcome, and error category. Do not record Source content, Memory content, prompts, responses, or vectors.

The PR should include an exported span tree or dashboard screenshot.

Alternatives considered

Keep one span for the complete flush operation.

Additional context

Part of #1214. Tracing remains optional and must not change Runtime behavior.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status
Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions