Keys / Pydantic Logfire
LOGFIRE_TOKEN
The token your app sends traces, logs and metrics to one Logfire project with: a write token, or a project API key with Send telemetry.
- Starts with
pylf_v- Expires
- the docs don't say
- API
- create, list, rotate, expire and revoke write tokens, with an API key
Get it
Create one on logfire.pydantic.dev. The steps aren't recorded yet.
Set it
LOGFIRE_TOKEN=pylf_v...
The Logfire SDKs for Python and Node.js read it from this variable when you don't pass a token. Or keep it out of .env with keypin: keypin run -- npm run dev
Replace it
- In the project's settings, open Write tokens and click New write token.
- Deploy it everywhere that reads
LOGFIRE_TOKEN. Both tokens work in the meantime. - Check that data still arrives in the project, then revoke the old token.
Set rotate_every on the key in keypin.toml and a rotated date on its vault item, and keypin status shows when it's due.