Cloady Docs
API ReferenceEndpointsApplications

Detect what an app's services run

Returns what each compose service runs, read from its latest build log, its image's configuration and its start command, and the OpenTelemetry agent Cloady recommends loading into it, or why none. Agents exist for Node.js 18.19 and 20.6 or later, Python 3.10 or later, Java 8 or later and .NET 8 or later. Databases, caches, queues, mail servers, proxies, TCP services and functions aren't inspected. Reads public registries, so it can take a few seconds.

GET
/api/workspaces/{workspaceSlug}/apps/{appSlug}/tracing/runtimes
AuthorizationBearer <token>

Personal API token (cldy_…)

In: header

Path Parameters

workspaceSlug*string
appSlug*string

Query Parameters

env?string

Value in

  • "production"
  • "preview"
  • "development"
region?string

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/workspaces/string/apps/string/tracing/runtimes"
{  "services": [    {      "name": "string",      "role": "web",      "runtime": "node",      "label": "string",      "version": "string",      "via": "railpack",      "agent": "node",      "reason": "string"    }  ]}

Set an app's server monitoring PUT

Turns OpenTelemetry tracing on or off for the app. `manual` and `auto` add the app variables OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_PROTOCOL, OTEL_EXPORTER_OTLP_COMPRESSION, OTEL_RESOURCE_ATTRIBUTES, OTEL_METRICS_EXPORTER and OTEL_LOGS_EXPORTER, which point an OpenTelemetry SDK at Cloady's trace store, and each service also gets OTEL_SERVICE_NAME. `auto` also writes CLOADY_SERVER_MONITORING, the agent for each service (`web=node,worker=python`), and Cloady loads that OpenTelemetry agent into the service when it starts, with no code change. `agents` sets the agent of each service it names, null removing it, and the other services keep the agents CLOADY_SERVER_MONITORING already lists (none unless the app is already in `auto` mode); without `agents` Cloady detects what each service runs and picks every agent itself. `off` deletes them all. The app is reconciled: turning it on or off restarts its running services once, and changing agents restarts only the services whose agent changed; a request that changes nothing restarts nothing. Answers 400 for a service the app doesn't have, and 502 when the variables were saved but the app couldn't be reconciled, which repeating a `manual` or `auto` request retries. Needs the developer role.

Search a service's traces GET

Returns a sample of the requests the service handled in the range, one per trace, with their method, route, status and duration, plus the range's request count and median and 95th-percentile duration. Filter on `route`, `method` and `status` (2xx to 5xx, or a code). Needs tracing on for the app and an OpenTelemetry SDK in the service; traces are kept for 7 days. `serviceName` is a compose service.