Features
Instrument your app
Capture your web app's write requests as memories, with one line of setup.
Adding capture calls to every route takes time, and new routes get missed. instrument attaches Dock to your web app once, and every write request is captured for you.
Instrument your app when...
- Your app's write requests already describe what users do, such as form submissions or settings changes.
- You want memory from day one, before you add hand-written captures.
Availability
| SDK | Frameworks |
|---|---|
| Python | FastAPI, Starlette, and other Starlette-based apps |
| TypeScript | Express, and other apps with Express-style use middleware |
Set it up
from fastapi import FastAPI
from docklee import Dock
app = FastAPI()
dock = Dock()
dock.instrument(app)In Express, register your body parser before instrument, so request bodies are available to capture.
What's captured
| Captured | Skipped |
|---|---|
POST, PUT, PATCH, and DELETE requests with a body | GET, HEAD, and OPTIONS requests |
| Bodies under 10,000 characters | Larger bodies |
In Python, the paths /health, /metrics, /docs, /openapi.json, and /favicon.ico |
Each request becomes an event memory with this metadata:
| Key | Value |
|---|---|
source | instrument |
method | The HTTP method |
path | The request path |
Capturing never blocks or fails a request. If a body can't be read, the request goes through as normal.
Request bodies can hold passwords, tokens, and personal data. Instrument only apps whose write requests are safe to remember, or capture by hand on routes that handle sensitive fields.
Per-user memory
Captured requests use the Dock instance's settings, including its default end user. In an app that serves many people, call capture with an end_user on the routes where memory belongs to one person. See End users.
Next steps
Your app's requests are captured. Capture database changes next.