Skip to Content

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

SDKFrameworks
PythonFastAPI, Starlette, and other Starlette-based apps
TypeScriptExpress, 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

CapturedSkipped
POST, PUT, PATCH, and DELETE requests with a bodyGET, HEAD, and OPTIONS requests
Bodies under 10,000 charactersLarger bodies
In Python, the paths /health, /metrics, /docs, /openapi.json, and /favicon.ico

Each request becomes an event memory with this metadata:

KeyValue
sourceinstrument
methodThe HTTP method
pathThe 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.

On this page