# Deployment notes

Milestone 4 adapters are designed for explicit opt-in.

Default local verification does not contact:

- etcd
- Kubernetes API
- Redis
- OTLP collector
- Pyroscope server

Production applications should provide credentials and endpoints through their own configuration layer. Do not commit real cluster URLs, database passwords, Redis credentials, or collector tokens.

## Runtime defaults

- REST/RPC 服务应从环境变量或配置文件读取监听地址、超时、日志级别和外部 endpoint。
- `LogConfig::from_env` 支持 `RUST_LOG`；生产建议输出 JSON 到 stdout，由平台收集。
- 文件日志只在明确需要时启用；运行期轮转建议交给容器平台或宿主 logrotate。
- `profiling` feature 默认不启用。启用 Pyroscope 前先在压测环境确认采样开销和网络出口策略。
- RPC 客户端默认保守；需要重试、deadline 传播、discovery 和 streaming 观测时使用 `RpcClientConfig::go_zero_defaults` 或显式配置。

External tests can be run with:

```bash
docker compose -f examples/production-adapters/docker-compose.yml up -d
cargo test --ignored --features external-tests
```

Before publishing a service, use the [production checklist](production-checklist.md). It covers configuration, authentication, reliability, observability, data adapters, registry adapters, verification commands, and rollback boundaries.
