HUB
Sign inSign up
flightlog logo

tuvl/flightlog

By tuvl

•Updated about 1 month ago

Collector for tuvl developer telemetry: teams register, send events, read what the team did.

Image
Developer tools
Monitoring & observability
0

252

tuvl/flightlog repository overview

⁠Tuvl Flightlog

The log of every flight a team's work takes. Flightlog is the collector for tuvl⁠ developer telemetry: developers register once, their tuvl sends what they do (ideas imported, specs approved, coding-agent attempts, branches, gate results, ships), and everyone on the team reads back what the team did, in Insight or the terminal.

It is itself a tuvl project: 5 models, 20 workflows and 24 small code agents, shipped as a hardened production image. It speaks the same contract as the Python build of Flightlog, so a developer's tuvl works against either.

  • Multi-arch: linux/amd64 and linux/arm64.
  • Production mode: no development routes, no Insight UI, JSON logs, non-root user, /health wired to the Docker HEALTHCHECK.
  • Runtime files only: no tests, specs or secrets in the image.
  • Needs PostgreSQL 15 or newer, and Redis if revoked and rotated tokens must stay revoked after a restart.

⁠Quick start

# compose.yaml
services:
  db:
    image: postgres:16-alpine
    environment:
      POSTGRES_USER: flightlog
      POSTGRES_PASSWORD: change-me
      POSTGRES_DB: flightlog
    volumes: [db:/var/lib/postgresql/data]
  redis:
    image: redis:7-alpine
  flightlog:
    image: tuvl/flightlog:0.1.0
    depends_on: [db, redis]
    environment:
      POSTGRES_HOST: db
      POSTGRES_DB: flightlog
      POSTGRES_USER: flightlog
      POSTGRES_PASSWORD: change-me
      REDIS_HOST: redis
      TUVL_SIGNING_KEY: ${TUVL_SIGNING_KEY}   # openssl rand -hex 32
    ports: ["127.0.0.1:8885:8885"]
volumes:
  db:
export TUVL_SIGNING_KEY=$(openssl rand -hex 32)   # keep it: it signs every token
docker compose up -d
curl -s localhost:8885/health

The tables are created on first start. Then:

  1. POST /auth/bootstrap {"email": "...", "password": "..."} once creates the administrator; sign in at /auth/token.

  2. Administration is workflows, started with the tuvl CLI (uv tool install --prerelease=allow tuvl, then set TUVL_URL and TUVL_TOKEN):

    tuvl run workflow admin_create_team -p '{"name":"payments"}'    # prints a run id
    tuvl show run RUN_ID                                            # the team's join code, once
    tuvl run workflow admin_list_developers
    tuvl run workflow admin_revoke_developer -p '{"who":"[email protected]"}'
    tuvl run workflow admin_export -p '{"team":"payments","format":"csv","since_days":30}'
    
  3. Each developer points their project at the collector and registers with the join code:

    tuvl set dev-telemetry https://flightlog.example.com
    tuvl register developer
    

⁠Configuration

VariableRequiredMeaning
TUVL_SIGNING_KEYyesSigns the tokens; generate with openssl rand -hex 32 and keep it stable
POSTGRES_HOST, POSTGRES_PORT, POSTGRES_DB, POSTGRES_USERyesThe database (localhost, 5432, tuvl, postgres by default)
POSTGRES_PASSWORDyesDatabase password
REDIS_HOST, REDIS_PORTrecommendedKeeps revoked and rotated tokens revoked across restarts and workers
FLIGHTLOG_FORWARD_URL, FLIGHTLOG_FORWARD_TOKENnoWhere the https forwarder sends events, if you turn it on

Retention, token lifetime, approval of new developers, the per-developer rate limit and forwarding are settings of the project's YAML workflows. See the source repository for how to change them and rebuild the image.

⁠Before you expose it

  • Terminate TLS in front of it (a reverse proxy) and publish port 8885 only to that proxy. Limit /v1/register by address there: the built-in rate limit is per developer, not per address.
  • Run records hold what a workflow returns. The join code an administrator sees and the token a registration returns are stored in the database's run records. Give the runs:read scope to administrators only, keep token lifetimes short, and treat a database backup like a secret. Where a leaked database must not yield usable tokens, use the Python build of Flightlog, which stores only hashes.
  • Without Redis, a revoked or rotated token works again after a restart.
  • PostgreSQL only. Back up with pg_dump.

⁠What it collects

Only what tuvl's developer telemetry sends: event ids, hashes and short details, never file contents, prompts or secrets. A developer chooses whether events name them by initials or by full name and email. See developer telemetry⁠ and the Flightlog page⁠ in the tuvl documentation.

⁠Credits and licenses

Flightlog is built and published by tuvl.io⁠, on the tuvl engine (Apache-2.0). The image also contains the engine's Python dependencies (among them FastAPI, Uvicorn, SQLAlchemy, asyncpg and redis-py), each under its own license; PostgreSQL and Redis are separate images that you run beside it.

Flightlog itself is licensed under the Apache License 2.0; the license and notice texts are in the project. "tuvl", "tuvl insight" and the feather mark are trademarks of tuvl.io and are not covered by that license except to describe where the software comes from.

Tags: 0.1.0 and latest.

Tag summary
Recent tags
Content type
Image
Digest
sha256:746f9fa3c…
Size
81.9 MB
Last updated
about 1 month ago
docker pull tuvl/flightlog:latest