| 540 | } |
| 541 | |
| 542 | func (s cloud) runRuntime(ctx context.Context, verbose bool, preset string) (err error) { |
| 543 | logInfo.Printf("Starting runtime\n") |
| 544 | defer logInfo.Printf("Stopped runtime\n") |
| 545 | |
| 546 | cmd := newCmd(ctx, "go", "run", "cli/main.go", "runtime", "start") |
| 547 | cmd.Env = os.Environ() |
| 548 | if preset == "minimal" { |
| 549 | cmd.Env = append( |
| 550 | cmd.Env, |
| 551 | // Disable traces |
| 552 | "RILL_RUNTIME_TRACES_EXPORTER="+string(observability.NoopExporter), |
| 553 | // Change metrics to Prometheus, which unlike Otel doesn't require an external collector. |
| 554 | "RILL_RUNTIME_METRICS_EXPORTER="+string(observability.PrometheusExporter), |
| 555 | ) |
| 556 | } |
| 557 | if verbose { |
| 558 | cmd.Env = append(cmd.Env, "RILL_RUNTIME_LOG_LEVEL=debug") |
| 559 | } |
| 560 | cmd.Stdout = os.Stdout |
| 561 | cmd.Stderr = os.Stdout |
| 562 | return cmd.Run() |
| 563 | } |
| 564 | |
| 565 | func (s cloud) awaitRuntime(ctx context.Context) error { |
| 566 | pingURL := lookupDotenv("RILL_RUNTIME_AUTH_AUDIENCE_URL") // TODO: This is a proxy for the runtime's external URL. Should be less implicit. |