Skip to content

Diagnostics

7 methods on the Diagnostics resource.

7 methods · 2 available to app tokens36 pages in SDK Reference

import { Compozy } from "@compozy/client";

7 of 7

captureDaemonProfile

Capture a runtime profile over the local socket

compozy.diagnostics.captureDaemonProfile({ path, query }) → Promise<Blob | File>

Options

kind"cpu" | "heap" | "allocs" | "goroutine" | "mutex" | "block" | "threadcreate"pathrequired
secondsintegerquery
Capture window for cpu, mutex and block only; snapshot profiles reject this parameter

GET /api/daemon/profile/{kind}app tokens denied

drainDaemon

Stop admitting new work

compozy.diagnostics.drainDaemon() → Promise<DrainStatusResponse>

POST /api/drainapp tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.diagnostics.drainDaemon();

getDoctor

Run runtime diagnostics

compozy.diagnostics.getDoctor({ query }) → Promise<DoctorPayload>

Options

onlystringquery
Comma-separated probe ids or categories to include
excludestringquery
Comma-separated probe ids or categories to exclude
quietbooleanquery
Omit OK diagnostics

GET /api/doctorapp tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.diagnostics.getDoctor();

getOpenAPIDocument

Get the running daemon's OpenAPI document

compozy.diagnostics.getOpenAPIDocument({ headers }) → Promise<unknown>

Options

If-None-Matchstringheader
Previously returned document ETag
Accept-Encodingstringheader
Use gzip to request compressed document bytes

GET /api/openapi.jsonapp tokens allowed

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.diagnostics.getOpenAPIDocument();

getRuntimeIdentity

Get the bounded runtime identity

compozy.diagnostics.getRuntimeIdentity() → Promise<RuntimeIdentityPayload>

GET /api/status/identityapp tokens allowed

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.diagnostics.getRuntimeIdentity();

getStatus

Get the runtime status snapshot

compozy.diagnostics.getStatus() → Promise<StatusPayload>

GET /api/statusapp tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.diagnostics.getStatus();

undrainDaemon

Resume admission of new work

compozy.diagnostics.undrainDaemon() → Promise<DrainStatusResponse>

POST /api/undrainapp tokens denied

example.ts
import { Compozy } from "@compozy/client"; const compozy = await Compozy.connect();const result = await compozy.diagnostics.undrainDaemon();