feat(#374): add telemetry config to docker-compose and .env
- Add MOSAIC_TELEMETRY_* variables to .env.example with descriptions - Pass telemetry env vars to api service in production compose - Pass telemetry env vars to coordinator service in dev and swarm composes - Swarm composes default to production URL (https://tel-api.mosaicstack.dev) - Dev compose includes commented-out telemetry-api service placeholder - All compose files default MOSAIC_TELEMETRY_ENABLED to false for safety Refs #374 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
26
.env.example
26
.env.example
@@ -350,6 +350,32 @@ OLLAMA_MODEL=llama3.1:latest
|
|||||||
# Get your API key from: https://platform.openai.com/api-keys
|
# Get your API key from: https://platform.openai.com/api-keys
|
||||||
# OPENAI_API_KEY=sk-...
|
# OPENAI_API_KEY=sk-...
|
||||||
|
|
||||||
|
# ======================
|
||||||
|
# Mosaic Telemetry (Task Completion Tracking & Predictions)
|
||||||
|
# ======================
|
||||||
|
# Telemetry tracks task completion patterns to provide time estimates and predictions.
|
||||||
|
# Data is sent to the Mosaic Telemetry API (a separate service).
|
||||||
|
|
||||||
|
# Master switch: set to false to completely disable telemetry (no HTTP calls will be made)
|
||||||
|
MOSAIC_TELEMETRY_ENABLED=true
|
||||||
|
|
||||||
|
# URL of the telemetry API server
|
||||||
|
# For Docker Compose (internal): http://telemetry-api:8000
|
||||||
|
# For production/swarm: https://tel-api.mosaicstack.dev
|
||||||
|
MOSAIC_TELEMETRY_SERVER_URL=http://telemetry-api:8000
|
||||||
|
|
||||||
|
# API key for authenticating with the telemetry server
|
||||||
|
# Generate with: openssl rand -hex 32
|
||||||
|
MOSAIC_TELEMETRY_API_KEY=your-64-char-hex-api-key-here
|
||||||
|
|
||||||
|
# Unique identifier for this Mosaic Stack instance
|
||||||
|
# Generate with: uuidgen or python -c "import uuid; print(uuid.uuid4())"
|
||||||
|
MOSAIC_TELEMETRY_INSTANCE_ID=your-instance-uuid-here
|
||||||
|
|
||||||
|
# Dry run mode: set to true to log telemetry events to console instead of sending HTTP requests
|
||||||
|
# Useful for development and debugging telemetry payloads
|
||||||
|
MOSAIC_TELEMETRY_DRY_RUN=false
|
||||||
|
|
||||||
# ======================
|
# ======================
|
||||||
# Logging & Debugging
|
# Logging & Debugging
|
||||||
# ======================
|
# ======================
|
||||||
|
|||||||
@@ -255,6 +255,12 @@ services:
|
|||||||
COORDINATOR_POLL_INTERVAL: ${COORDINATOR_POLL_INTERVAL:-5.0}
|
COORDINATOR_POLL_INTERVAL: ${COORDINATOR_POLL_INTERVAL:-5.0}
|
||||||
COORDINATOR_MAX_CONCURRENT_AGENTS: ${COORDINATOR_MAX_CONCURRENT_AGENTS:-10}
|
COORDINATOR_MAX_CONCURRENT_AGENTS: ${COORDINATOR_MAX_CONCURRENT_AGENTS:-10}
|
||||||
COORDINATOR_ENABLED: ${COORDINATOR_ENABLED:-true}
|
COORDINATOR_ENABLED: ${COORDINATOR_ENABLED:-true}
|
||||||
|
# Telemetry (task completion tracking & predictions)
|
||||||
|
MOSAIC_TELEMETRY_ENABLED: ${MOSAIC_TELEMETRY_ENABLED:-false}
|
||||||
|
MOSAIC_TELEMETRY_SERVER_URL: ${MOSAIC_TELEMETRY_SERVER_URL:-https://tel-api.mosaicstack.dev}
|
||||||
|
MOSAIC_TELEMETRY_API_KEY: ${MOSAIC_TELEMETRY_API_KEY:-}
|
||||||
|
MOSAIC_TELEMETRY_INSTANCE_ID: ${MOSAIC_TELEMETRY_INSTANCE_ID:-}
|
||||||
|
MOSAIC_TELEMETRY_DRY_RUN: ${MOSAIC_TELEMETRY_DRY_RUN:-false}
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test:
|
test:
|
||||||
[
|
[
|
||||||
@@ -295,6 +301,12 @@ services:
|
|||||||
OLLAMA_ENDPOINT: ${OLLAMA_ENDPOINT:-http://ollama:11434}
|
OLLAMA_ENDPOINT: ${OLLAMA_ENDPOINT:-http://ollama:11434}
|
||||||
OPENBAO_ADDR: ${OPENBAO_ADDR:-http://openbao:8200}
|
OPENBAO_ADDR: ${OPENBAO_ADDR:-http://openbao:8200}
|
||||||
ENCRYPTION_KEY: ${ENCRYPTION_KEY}
|
ENCRYPTION_KEY: ${ENCRYPTION_KEY}
|
||||||
|
# Telemetry (task completion tracking & predictions)
|
||||||
|
MOSAIC_TELEMETRY_ENABLED: ${MOSAIC_TELEMETRY_ENABLED:-false}
|
||||||
|
MOSAIC_TELEMETRY_SERVER_URL: ${MOSAIC_TELEMETRY_SERVER_URL:-https://tel-api.mosaicstack.dev}
|
||||||
|
MOSAIC_TELEMETRY_API_KEY: ${MOSAIC_TELEMETRY_API_KEY:-}
|
||||||
|
MOSAIC_TELEMETRY_INSTANCE_ID: ${MOSAIC_TELEMETRY_INSTANCE_ID:-}
|
||||||
|
MOSAIC_TELEMETRY_DRY_RUN: ${MOSAIC_TELEMETRY_DRY_RUN:-false}
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test:
|
test:
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -283,6 +283,12 @@ services:
|
|||||||
COORDINATOR_POLL_INTERVAL: ${COORDINATOR_POLL_INTERVAL:-5.0}
|
COORDINATOR_POLL_INTERVAL: ${COORDINATOR_POLL_INTERVAL:-5.0}
|
||||||
COORDINATOR_MAX_CONCURRENT_AGENTS: ${COORDINATOR_MAX_CONCURRENT_AGENTS:-10}
|
COORDINATOR_MAX_CONCURRENT_AGENTS: ${COORDINATOR_MAX_CONCURRENT_AGENTS:-10}
|
||||||
COORDINATOR_ENABLED: ${COORDINATOR_ENABLED:-true}
|
COORDINATOR_ENABLED: ${COORDINATOR_ENABLED:-true}
|
||||||
|
# Telemetry (task completion tracking & predictions)
|
||||||
|
MOSAIC_TELEMETRY_ENABLED: ${MOSAIC_TELEMETRY_ENABLED:-false}
|
||||||
|
MOSAIC_TELEMETRY_SERVER_URL: ${MOSAIC_TELEMETRY_SERVER_URL:-https://tel-api.mosaicstack.dev}
|
||||||
|
MOSAIC_TELEMETRY_API_KEY: ${MOSAIC_TELEMETRY_API_KEY:-}
|
||||||
|
MOSAIC_TELEMETRY_INSTANCE_ID: ${MOSAIC_TELEMETRY_INSTANCE_ID:-}
|
||||||
|
MOSAIC_TELEMETRY_DRY_RUN: ${MOSAIC_TELEMETRY_DRY_RUN:-false}
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test:
|
test:
|
||||||
[
|
[
|
||||||
@@ -324,6 +330,12 @@ services:
|
|||||||
OPENBAO_ADDR: ${OPENBAO_ADDR:-http://openbao:8200}
|
OPENBAO_ADDR: ${OPENBAO_ADDR:-http://openbao:8200}
|
||||||
ORCHESTRATOR_URL: ${ORCHESTRATOR_URL:-http://orchestrator:3001}
|
ORCHESTRATOR_URL: ${ORCHESTRATOR_URL:-http://orchestrator:3001}
|
||||||
ENCRYPTION_KEY: ${ENCRYPTION_KEY}
|
ENCRYPTION_KEY: ${ENCRYPTION_KEY}
|
||||||
|
# Telemetry (task completion tracking & predictions)
|
||||||
|
MOSAIC_TELEMETRY_ENABLED: ${MOSAIC_TELEMETRY_ENABLED:-false}
|
||||||
|
MOSAIC_TELEMETRY_SERVER_URL: ${MOSAIC_TELEMETRY_SERVER_URL:-https://tel-api.mosaicstack.dev}
|
||||||
|
MOSAIC_TELEMETRY_API_KEY: ${MOSAIC_TELEMETRY_API_KEY:-}
|
||||||
|
MOSAIC_TELEMETRY_INSTANCE_ID: ${MOSAIC_TELEMETRY_INSTANCE_ID:-}
|
||||||
|
MOSAIC_TELEMETRY_DRY_RUN: ${MOSAIC_TELEMETRY_DRY_RUN:-false}
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test:
|
test:
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -377,6 +377,12 @@ services:
|
|||||||
OLLAMA_ENDPOINT: ${OLLAMA_ENDPOINT:-http://ollama:11434}
|
OLLAMA_ENDPOINT: ${OLLAMA_ENDPOINT:-http://ollama:11434}
|
||||||
# OpenBao (optional)
|
# OpenBao (optional)
|
||||||
OPENBAO_ADDR: ${OPENBAO_ADDR:-http://openbao:8200}
|
OPENBAO_ADDR: ${OPENBAO_ADDR:-http://openbao:8200}
|
||||||
|
# Telemetry (task completion tracking & predictions)
|
||||||
|
MOSAIC_TELEMETRY_ENABLED: ${MOSAIC_TELEMETRY_ENABLED:-false}
|
||||||
|
MOSAIC_TELEMETRY_SERVER_URL: ${MOSAIC_TELEMETRY_SERVER_URL:-http://telemetry-api:8000}
|
||||||
|
MOSAIC_TELEMETRY_API_KEY: ${MOSAIC_TELEMETRY_API_KEY:-}
|
||||||
|
MOSAIC_TELEMETRY_INSTANCE_ID: ${MOSAIC_TELEMETRY_INSTANCE_ID:-}
|
||||||
|
MOSAIC_TELEMETRY_DRY_RUN: ${MOSAIC_TELEMETRY_DRY_RUN:-false}
|
||||||
volumes:
|
volumes:
|
||||||
- openbao_init:/openbao/init:ro
|
- openbao_init:/openbao/init:ro
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -51,6 +51,12 @@ services:
|
|||||||
LOG_LEVEL: ${LOG_LEVEL:-info}
|
LOG_LEVEL: ${LOG_LEVEL:-info}
|
||||||
HOST: 0.0.0.0
|
HOST: 0.0.0.0
|
||||||
PORT: 8000
|
PORT: 8000
|
||||||
|
# Telemetry (task completion tracking & predictions)
|
||||||
|
MOSAIC_TELEMETRY_ENABLED: ${MOSAIC_TELEMETRY_ENABLED:-false}
|
||||||
|
MOSAIC_TELEMETRY_SERVER_URL: ${MOSAIC_TELEMETRY_SERVER_URL:-http://telemetry-api:8000}
|
||||||
|
MOSAIC_TELEMETRY_API_KEY: ${MOSAIC_TELEMETRY_API_KEY:-}
|
||||||
|
MOSAIC_TELEMETRY_INSTANCE_ID: ${MOSAIC_TELEMETRY_INSTANCE_ID:-}
|
||||||
|
MOSAIC_TELEMETRY_DRY_RUN: ${MOSAIC_TELEMETRY_DRY_RUN:-false}
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
@@ -122,6 +128,29 @@ services:
|
|||||||
com.mosaic.service: "secrets-init"
|
com.mosaic.service: "secrets-init"
|
||||||
com.mosaic.description: "OpenBao auto-initialization sidecar"
|
com.mosaic.description: "OpenBao auto-initialization sidecar"
|
||||||
|
|
||||||
|
# ======================
|
||||||
|
# Telemetry API (Optional - for local development)
|
||||||
|
# ======================
|
||||||
|
# Uncomment to run the telemetry API locally for self-contained development.
|
||||||
|
# For production, use an external telemetry API URL instead.
|
||||||
|
# telemetry-api:
|
||||||
|
# image: git.mosaicstack.dev/mosaic/telemetry-api:latest
|
||||||
|
# container_name: mosaic-telemetry-api
|
||||||
|
# restart: unless-stopped
|
||||||
|
# environment:
|
||||||
|
# HOST: 0.0.0.0
|
||||||
|
# PORT: 8000
|
||||||
|
# ports:
|
||||||
|
# - "8001:8000"
|
||||||
|
# healthcheck:
|
||||||
|
# test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
|
||||||
|
# interval: 30s
|
||||||
|
# timeout: 10s
|
||||||
|
# retries: 3
|
||||||
|
# start_period: 10s
|
||||||
|
# networks:
|
||||||
|
# - mosaic-network
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
postgres_data:
|
postgres_data:
|
||||||
name: mosaic-postgres-data
|
name: mosaic-postgres-data
|
||||||
|
|||||||
Reference in New Issue
Block a user