keryx 0.44.0 → 0.45.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/actions/status.ts +1 -0
- package/classes/Action.ts +17 -0
- package/package.json +1 -1
package/actions/status.ts
CHANGED
|
@@ -10,6 +10,7 @@ export class Status implements Action {
|
|
|
10
10
|
"Returns server health and runtime information including the server name, process ID, package version, uptime in milliseconds, memory consumption in MB, and dependency health checks for the database and Redis. Does not require authentication.";
|
|
11
11
|
inputs = z.object({});
|
|
12
12
|
web = { route: "/status", method: HTTP_METHOD.GET };
|
|
13
|
+
tracing = false;
|
|
13
14
|
|
|
14
15
|
async run() {
|
|
15
16
|
const consumedMemoryMB =
|
package/classes/Action.ts
CHANGED
|
@@ -189,6 +189,17 @@ export type ActionConstructorInputs = {
|
|
|
189
189
|
/** Per-action timeout in ms (overrides global `config.actions.timeout`; 0 disables) */
|
|
190
190
|
timeout?: number;
|
|
191
191
|
|
|
192
|
+
/**
|
|
193
|
+
* When `false`, tracing plugins (`@keryxjs/sentry`, `@keryxjs/tracing`) skip
|
|
194
|
+
* this action: no action span, and for HTTP / background tasks the whole
|
|
195
|
+
* request or job transaction is dropped. Error capture and metrics still
|
|
196
|
+
* run. Unset (the default) means the action is traced.
|
|
197
|
+
*
|
|
198
|
+
* Use this for high-frequency health checks so they don't flood the trace
|
|
199
|
+
* backend. The built-in `status` action sets `tracing = false`.
|
|
200
|
+
*/
|
|
201
|
+
tracing?: boolean;
|
|
202
|
+
|
|
192
203
|
/** Configure this action as a background task/job */
|
|
193
204
|
task?: {
|
|
194
205
|
/** Optional recurring frequency in milliseconds */
|
|
@@ -251,6 +262,11 @@ export abstract class Action {
|
|
|
251
262
|
rawBody?: boolean;
|
|
252
263
|
};
|
|
253
264
|
timeout?: number;
|
|
265
|
+
/**
|
|
266
|
+
* When `false`, tracing plugins skip this action. Unset means traced.
|
|
267
|
+
* See {@link ActionConstructorInputs.tracing}.
|
|
268
|
+
*/
|
|
269
|
+
tracing?: boolean;
|
|
254
270
|
task?: {
|
|
255
271
|
frequency?: number;
|
|
256
272
|
queue: string;
|
|
@@ -261,6 +277,7 @@ export abstract class Action {
|
|
|
261
277
|
this.inputs = args.inputs;
|
|
262
278
|
this.middleware = args.middleware ?? [];
|
|
263
279
|
this.timeout = args.timeout;
|
|
280
|
+
this.tracing = args.tracing;
|
|
264
281
|
// MCP tools are opt-in — see the actions initializer for rationale. An action
|
|
265
282
|
// becomes a tool only when it sets `mcp.tool = true` (or declares `mcp.ui`).
|
|
266
283
|
this.mcp = { tool: false, ...args.mcp };
|