# Copy to .env for local development: cp .env-example .env

# --- Application (examples/fastapi_service) ---
APP_NAME=platform-fastapicommon-example
APP_ENV=dev
APP_PORT=8080
BUILD_VERSION=dev

# --- OpenTelemetry (same variables and defaults as platform-gincommon) ---
# OTLP/gRPC collector (default localhost:4317, the otel-collector of `make docker-up`);
# "none" keeps spans in-process. OTLP_ENDPOINT, if set, overrides it.
OTEL_EXPORTER_OTLP_ENDPOINT=localhost:4317
# Plaintext export: default true only for APP_ENV=dev|local.
# OTEL_EXPORTER_OTLP_INSECURE=true
# Root sampling ratio (parent-based): default 1.0 in dev/local, 0.1 otherwise.
# OTEL_TRACES_SAMPLER_RATIO=1.0
# OTEL_TRACES_IGNORE_REMOTE_PARENT_SAMPLED=false
# OTEL_PROPAGATOR_BAGGAGE=false
ENABLE_TRACING=true
ENABLE_METRICS=true

# --- Enterprise Platform Observability Standard (platform_* metrics) ---
# Registry domain (iam, workflow, billing, tender_management, notifications, documents).
# REQUIRED while ENABLE_METRICS=true: startup raises ValueError without it. APP_ENV above is
# also the environment label and must be one of local|dev|test|staging|prod, and APP_NAME
# must match ^[a-z][a-z0-9_-]{0,62}$.
OBSERVABILITY_DOMAIN=iam

# --- Logs (same variables as platform-gincommon) ---
# LOG_LEVEL=debug|info|warn|error (default: debug for APP_ENV=dev|local, info otherwise).
# LOG_SAMPLING=false
# Also write JSON logs here; Promtail tails this file when using make docker-up.
LOG_FILE=logs/app.log

# --- Observability stack (Docker host port mappings) ---
OTEL_COLLECTOR_GRPC_PORT=4317
OTEL_COLLECTOR_HTTP_PORT=4318
TEMPO_HTTP_PORT=3200
LOKI_HTTP_PORT=3100
PROMETHEUS_HTTP_PORT=9090
GRAFANA_HTTP_PORT=3000
GRAFANA_ADMIN_USER=admin
GRAFANA_ADMIN_PASSWORD=admin

# Prometheus scrapes the example app on the host, not in the compose network.
PROMETHEUS_SCRAPE_TARGET=host.docker.internal:8080

# --- Tooling ---
PYTHON=python3

# Proxies / load balancers whose X-Forwarded-For / X-Real-IP are believed for the client IP
# (comma-separated IPs or CIDRs). Empty: the client IP is the socket peer.
# TRUSTED_PROXIES=10.0.0.0/8
