Set an app's server monitoring
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.
Authorization
cloady Personal API token (cldy_…)
In: header
Path Parameters
Query Parameters
Value in
- "production"
- "preview"
- "development"
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X PUT "https://example.com/api/workspaces/string/apps/string/tracing" \ -H "Content-Type: application/json" \ -d '{ "mode": "off" }'{ "mode": "off", "services": [ { "name": "string", "env": { "property1": "string", "property2": "string" }, "receiving": true, "agent": "node", "start": { "property1": "string", "property2": "string" } } ]}Read an app's server monitoring GET
Returns the app's server monitoring mode, the OpenTelemetry variables each compose service gets while it is on, the agent Cloady loads into each service in `auto` mode and what it adds at start, and which services have sent spans in the last 7 days. In `manual` mode spans need an OpenTelemetry SDK or agent in the app's own code.
Detect what an app's services run GET
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.