Add telemetry config to docker-compose and .env #374

Closed
opened 2026-02-15 05:29:18 +00:00 by jason.woltje · 1 comment
Owner

Summary

Add Mosaic Telemetry configuration to the Docker Compose stack and environment variable templates so telemetry is properly configured in both dev and production deployments.

Requirements

Environment Variables (.env.example)

Add the following to .env.example:

# Mosaic Telemetry (task completion tracking & predictions)
MOSAIC_TELEMETRY_ENABLED=true
MOSAIC_TELEMETRY_SERVER_URL=http://telemetry-api:8000
MOSAIC_TELEMETRY_API_KEY=your-64-char-hex-api-key-here
MOSAIC_TELEMETRY_INSTANCE_ID=your-instance-uuid-here
MOSAIC_TELEMETRY_DRY_RUN=false

docker-compose.yml (dev)

  • Pass MOSAIC_TELEMETRY_* env vars to api and coordinator services
  • Optionally include telemetry-api service for fully self-contained dev stack:
    telemetry-api:
      image: git.mosaicstack.dev/mosaic/telemetry-api:latest
      environment:
        - DATABASE_URL=postgresql://...
        - VALKEY_URL=redis://valkey:6379
      depends_on:
        postgres:
          condition: service_healthy
        valkey:
          condition: service_healthy
      networks:
        - internal
    
  • For dev, MOSAIC_TELEMETRY_SERVER_URL should point to Docker network name (e.g., http://telemetry-api:8000)

docker-compose.swarm.yml (prod)

  • Pass env vars from secrets/config
  • MOSAIC_TELEMETRY_SERVER_URL=https://tel-api.mosaicstack.dev (external URL)
  • API key from Docker secret or env

Documentation

  • Comment each env var with its purpose
  • Note that MOSAIC_TELEMETRY_ENABLED=false completely disables telemetry (no HTTP calls)
  • Note that MOSAIC_TELEMETRY_DRY_RUN=true logs events to console (useful for dev)

Acceptance Criteria

  • All MOSAIC_TELEMETRY_* vars in .env.example with descriptions
  • API service receives telemetry env vars in docker-compose.yml
  • Coordinator service receives telemetry env vars in docker-compose.yml
  • Swarm compose uses production telemetry URL
  • Dev stack works with telemetry disabled (default safe)
  • Optional telemetry-api service documented for self-contained dev
## Summary Add Mosaic Telemetry configuration to the Docker Compose stack and environment variable templates so telemetry is properly configured in both dev and production deployments. ## Requirements ### Environment Variables (.env.example) Add the following to `.env.example`: ```bash # Mosaic Telemetry (task completion tracking & predictions) MOSAIC_TELEMETRY_ENABLED=true MOSAIC_TELEMETRY_SERVER_URL=http://telemetry-api:8000 MOSAIC_TELEMETRY_API_KEY=your-64-char-hex-api-key-here MOSAIC_TELEMETRY_INSTANCE_ID=your-instance-uuid-here MOSAIC_TELEMETRY_DRY_RUN=false ``` ### docker-compose.yml (dev) - Pass `MOSAIC_TELEMETRY_*` env vars to `api` and `coordinator` services - Optionally include `telemetry-api` service for fully self-contained dev stack: ```yaml telemetry-api: image: git.mosaicstack.dev/mosaic/telemetry-api:latest environment: - DATABASE_URL=postgresql://... - VALKEY_URL=redis://valkey:6379 depends_on: postgres: condition: service_healthy valkey: condition: service_healthy networks: - internal ``` - For dev, `MOSAIC_TELEMETRY_SERVER_URL` should point to Docker network name (e.g., `http://telemetry-api:8000`) ### docker-compose.swarm.yml (prod) - Pass env vars from secrets/config - `MOSAIC_TELEMETRY_SERVER_URL=https://tel-api.mosaicstack.dev` (external URL) - API key from Docker secret or env ### Documentation - Comment each env var with its purpose - Note that `MOSAIC_TELEMETRY_ENABLED=false` completely disables telemetry (no HTTP calls) - Note that `MOSAIC_TELEMETRY_DRY_RUN=true` logs events to console (useful for dev) ## Acceptance Criteria - [ ] All MOSAIC_TELEMETRY_* vars in .env.example with descriptions - [ ] API service receives telemetry env vars in docker-compose.yml - [ ] Coordinator service receives telemetry env vars in docker-compose.yml - [ ] Swarm compose uses production telemetry URL - [ ] Dev stack works with telemetry disabled (default safe) - [ ] Optional telemetry-api service documented for self-contained dev
jason.woltje added the devops label 2026-02-15 05:29:18 +00:00
jason.woltje added this to the M10-Telemetry (0.0.10) milestone 2026-02-15 05:31:19 +00:00
Author
Owner

Completed in commit 0467f77 on feature/m10-telemetry. Added MOSAIC_TELEMETRY_* vars to .env.example, docker-compose.yml, docker/docker-compose.yml, and both swarm compose files.

Completed in commit 0467f77 on feature/m10-telemetry. Added MOSAIC_TELEMETRY_* vars to .env.example, docker-compose.yml, docker/docker-compose.yml, and both swarm compose files.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/stack#374