Skip to main content

Logs

Every service emits three streams of logs as it moves through its lifecycle. You can read them in the console, fetch history via the API, or live-tail runtime output.

One service, three streams
BuildBuild logsOutput from compiling your image.
DeployDeploy logsPlatform events while rolling out.
RuntimeRuntime logsYour container's stdout and stderr.
StreamWhat's in itWhen you read it
Build logsOutput from building your container image — package installs, compile steps, final tag.You're debugging a failed build.
Deploy logsPlatform events while a service rolls out — image pulled, spherelet started, health check passed.A deploy is stuck or slow; you want to see why.
Runtime logsYour container's stdout and stderr — everything your application writes.Your service is running and you want to see what it's doing.

Build and deploy logs are tied to a specific deployment (a rollout). Runtime logs are continuous across the life of the service.

Read logs​

  1. Open the service.
  2. Click the Logs tab.
  3. Switch streams from the dropdown: Build, Deploy, or Runtime.
  4. Use the search box to filter, the date range picker to scope a window, and the Live toggle to tail new lines as they arrive (runtime only).

Tip: click any log line to expand it and copy the full message; click a spherelet ID to filter to lines from just that spherelet.

Live tail (runtime)​

To watch logs as they arrive, use the runtime stream — a Server-Sent Events endpoint that emits each new log line as an event.

Because SSE doesn't carry custom request headers, the stream is gated by a short-lived sse_token. The flow is two steps: mint the token, then open the stream with it in the query string.

# 1. Mint an SSE token for this service.
curl --request GET \
  --url "https://api.computesphere.com/v2/deployments/SERVICE_ID/logs/runtime/stream/token" \
  --header "Authorization: Bearer YOUR_API_TOKEN"
# → returns { "sse_token": "eyJ..." }

# 2. Open the stream with that token.
curl --no-buffer \
  "https://api.computesphere.com/v2/deployments/SERVICE_ID/logs/runtime/stream?sse_token=eyJ..."

Each event's data payload is one LogEntry (same shape as the history endpoint). Tokens expire quickly; if the stream drops, mint a new one. The console handles this automatically; SDKs follow the same two-step.

Cron job runs​

Cron jobs have their own per-run logs since each tick is a discrete execution. The shape is the same; the endpoints are nested under the cron job:

  • GET /v2/deployments/SERVICE_ID/cronjob/runs/RUN_ID/logs
  • GET /v2/deployments/SERVICE_ID/cronjob/runs/RUN_ID/stream (SSE)

See Cron jobs for the full run-history workflow.

Honest limits​

  • Retention. Logs are kept for 90 days, then aged out. For longer retention, export them (Team plan, see below).
  • Search is full-text within the window. The q parameter searches messages within the start_time–end_time window. There's no structured-field search; if you need queries like level=error AND spherelet=abc123, scope with separate query params instead of free-text.
  • Live tail is runtime-only. Build and deploy logs are batch-fetched; they don't stream. Refresh to pick up new lines while a build is running.
  • Cron run logs live with the run. When run history ages out, the run's logs go with it.

Log export​

On the Team and Enterprise plans, you can send the runtime logs of an environment to your own observability platform. Two destinations are supported:

  • Grafana Cloud: your stack's OTLP endpoint (https://otlp-gateway-<region>.grafana.net/otlp), its instance ID, and an access policy token that can write logs.
  • New Relic: your account's region (US or EU) and an ingest license key.

Export is set per environment: open the environment, go to Settings → Log export, choose the destination and save. Send a test line sends one line to check the destination accepts it. You can pause an export (the destination and its credential are kept) or remove it. The credential is never shown again after you save it; enter a new one to replace it. The same settings are available through the API at /v2/environments/{environment_id}/log-export (and /test).

What is sent. The runtime logs of every service in the environment, each line with three attributes: environment and service (the names you see in the console) and spherelet (the ID shown in the console). In Grafana Cloud, service_name is the service's name. Nothing else about the platform is sent, and another environment's logs never are. When you turn export on, lines from the last 15 minutes are sent too. Build and pre-deploy logs are not exported yet.

When your destination is down. If your destination is unreachable, we keep retrying for up to 15 minutes and hold a small buffer; lines beyond that are dropped and counted in the export's status.

What's next​

  • Spherelets — what a spherelet ID refers to in your log lines.
  • Cron jobs — per-run logs and history.
  • Pricing — log retention and log export by plan.