Files
dance-lessons-coach/config.example.yaml
Gabriel Radureau 00e796c608 Enhance build system and logging configuration
- Add scripts/build.sh to compile binaries into bin/ directory

- Move all zerolog setup logic from cmd/server/main.go to pkg/config

- Add log level configuration support (trace, debug, info, warn, error, fatal, panic)

- Simplify cmd/server/main.go from 57 to 27 lines (53% reduction)

- Update .gitignore to use bin/ directory instead of individual files

- Document build process and bin directory in AGENTS.md

- Maintain backward compatibility with all existing functionality
2026-04-04 13:24:33 +02:00

67 lines
2.0 KiB
YAML

# DanceLessonsCoach Configuration Example
# This file shows the available configuration options
# You can use this as a template for your own configuration
# Server configuration
server:
# Host address to bind to (default: "0.0.0.0")
host: "0.0.0.0"
# Port to listen on (default: 8080)
port: 8080
# Shutdown configuration
shutdown:
# Timeout duration for graceful shutdown (default: 30s)
# Format: number + unit (s, m, h)
timeout: 30s
# Logging configuration
logging:
# Enable JSON output for structured logging (default: false)
# When true, logs are output in JSON format instead of console format
json: false
# Log level (default: "trace")
# Options: "trace", "debug", "info", "warn", "error", "fatal", "panic"
level: trace
# Telemetry configuration (OpenTelemetry)
telemetry:
# Enable OpenTelemetry tracing (default: false)
enabled: false
# OTLP endpoint for trace export (default: "localhost:4317")
# Format: host:port
otlp_endpoint: "localhost:4317"
# Service name for tracing (default: "DanceLessonsCoach")
service_name: "DanceLessonsCoach"
# Use insecure connection (no TLS) (default: true)
insecure: true
# Sampler configuration
sampler:
# Sampler type (default: "parentbased_always_on")
# Options: "always_on", "always_off", "traceidratio", "parentbased_always_on", "parentbased_always_off", "parentbased_traceidratio"
type: "parentbased_always_on"
# Sampling ratio (0.0 to 1.0, default: 1.0)
# Only used with traceidratio and parentbased_traceidratio samplers
ratio: 1.0
# Environment Variables
# You can also configure via environment variables with DLC_ prefix:
# DLC_SERVER_HOST=0.0.0.0
# DLC_SERVER_PORT=8080
# DLC_SHUTDOWN_TIMEOUT=30s
# DLC_LOGGING_JSON=false
# DLC_LOGGING_LEVEL=trace
# DLC_TELEMETRY_ENABLED=true
# DLC_TELEMETRY_OTLP_ENDPOINT="jaeger:4317"
# DLC_TELEMETRY_SERVICE_NAME="DanceLessonsCoach"
# DLC_TELEMETRY_INSECURE=true
# DLC_TELEMETRY_SAMPLER_TYPE="parentbased_always_on"
# DLC_TELEMETRY_SAMPLER_RATIO=1.0