@runsignal/node 0.1.0 → 0.3.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/README.md CHANGED
@@ -1,17 +1,30 @@
1
1
  # RunSignal for Node.js
2
2
 
3
- Monitor Node.js background work that no HTTP status code describes, such as BullMQ queues, job schedulers and
4
- sync loops, with OpenTelemetry. It emits the same signals and manifest as every other RunSignal SDK, so the
5
- `runsignal` CLI provisions the same New Relic alerts for Node.js services as for .NET and Go ones. See the
6
- [main README](../../README.md) for the concepts and the alerts.
3
+ [![npm](https://img.shields.io/npm/v/@runsignal/node)](https://www.npmjs.com/package/@runsignal/node)
4
+ [![npm downloads](https://img.shields.io/npm/dm/@runsignal/node)](https://www.npmjs.com/package/@runsignal/node)
5
+ [![license](https://img.shields.io/npm/l/@runsignal/node)](https://github.com/gokhanertogan/RunSignal/blob/main/LICENSE)
6
+
7
+ **Cron job and background job monitoring for Node.js, on OpenTelemetry.** Get an alert when a scheduled job
8
+ does not run, fails, runs too long or processes nothing, and when a BullMQ worker or sync loop stops making
9
+ progress: the failures no HTTP status code describes. Works with node-cron, croner, cron, node-schedule and
10
+ BullMQ, with no hosted service and no ping URLs.
11
+
12
+ RunSignal records runs, items and heartbeats as OpenTelemetry metrics, with the same names as every other
13
+ RunSignal SDK, so the `runsignal` CLI provisions the same alerts for Node.js services as for .NET, Go, Java and
14
+ Rust ones: New Relic alerts and dashboards, or Prometheus rules and a Grafana dashboard. The
15
+ [main README](https://github.com/gokhanertogan/RunSignal#readme) covers the concepts, the alerts and the
16
+ backends.
17
+
18
+ ## Installation
7
19
 
8
20
  ```bash
9
- npm install @runsignal/node @opentelemetry/api # once published; until then, build from source
21
+ npm install @runsignal/node @opentelemetry/api
10
22
  ```
11
23
 
12
- Requires Node.js 20 or later. The package is ESM only and ships its own TypeScript types.
24
+ Requires Node.js 20 or later. The package is ESM only, ships its own TypeScript types, and depends only on
25
+ `@opentelemetry/api` (peer). BullMQ 5.16+ is an optional peer for the BullMQ integration.
13
26
 
14
- ## Usage
27
+ ## Quick start
15
28
 
16
29
  ```ts
17
30
  import { defaultRegistry } from '@runsignal/node';
@@ -23,45 +36,59 @@ const invoices = defaultRegistry.workload('nightly-invoice', {
23
36
  severity: 'critical',
24
37
  });
25
38
 
26
- // One run: succeeds when fn resolves, is cancelled if the signal was aborted, fails otherwise.
27
- await invoices.run(async (signal) => {
39
+ await invoices.run(async () => {
28
40
  for (const order of await unbilledOrders()) {
29
- await createInvoice(order, { signal });
41
+ await createInvoice(order);
30
42
  invoices.processed();
31
43
  }
32
- }, { signal: shutdown.signal });
44
+ });
33
45
  ```
34
46
 
35
- A long-running loop sends heartbeats, so a loop that is alive but stuck is noticed:
47
+ The registry follows the global meter provider, so it works even when it is created by an import before the
48
+ OpenTelemetry SDK starts. For an explicit provider, use `new WorkloadRegistry({ meterProvider })`.
36
49
 
37
- ```ts
38
- const sync = defaultRegistry.workload('stock-sync', { expectEvery: '5m' });
39
- setInterval(async () => {
40
- await syncStock();
41
- sync.beat();
42
- }, 60_000);
43
- ```
50
+ ## Recording work
44
51
 
45
- Manual runs, and failures without an error:
52
+ | Call | Records |
53
+ |---|---|
54
+ | `w.run(fn, { signal })` | One run. It succeeds when `fn` resolves, is cancelled when `signal` was aborted, and fails otherwise. The run's span is active inside `fn` (with a context manager, which `NodeSDK` registers). |
55
+ | `const run = w.start()` then `run.succeed()` / `fail(err)` / `failCode(code, msg)` / `cancel()` | A run ended by hand. Later calls are ignored. A run that is never ended stays in progress, so it opens the `hung` alert once it runs past `maxDuration`. |
56
+ | `w.processed(n)` / `w.itemFailed(n)` | Items handled. |
57
+ | `w.beat()` | A heartbeat from a long-running loop. |
46
58
 
47
- ```ts
48
- const run = imports.start();
49
- const file = await fetchStatement();
50
- if (!file) {
51
- run.failCode('statement_missing', 'no bank statement today');
52
- } else {
53
- run.succeed();
54
- }
55
- ```
59
+ While a run is in progress, the `runsignal.workload.active_run_age` gauge reports how long the oldest unfinished
60
+ run has been running (0 when none is), so a run that hangs is alerted on while it is still hanging, not only
61
+ when it finishes. It is reported for workloads that have `maxDuration` or have started a run.
56
62
 
57
63
  `error.type` is the error's `errorType` property if it has one, then its `code` if that is a string (such as
58
64
  `ECONNREFUSED`), then its class name.
59
65
 
60
- The registry follows the global meter provider. It works even when it is created, for example by an import,
61
- before the OpenTelemetry SDK starts. Run spans are nested under the active span when a context manager is
62
- registered, which `NodeSDK` does for you.
66
+ ## Cron libraries
67
+
68
+ Since 0.2.0, `cronJob` declares a scheduled job once, with its schedule, and gives you a tick handler for any cron library.
69
+ The workload is registered immediately, so a job that never fires still gets a `missed` alert.
70
+
71
+ ```ts
72
+ import { cronJob } from '@runsignal/node/cron';
73
+
74
+ const invoices = cronJob('nightly-invoice', { schedule: '0 2 * * *', maxDuration: '30m', minProcessed: 100 }, async (w) => {
75
+ for (const order of await unbilledOrders()) {
76
+ await createInvoice(order);
77
+ w.processed();
78
+ }
79
+ });
80
+
81
+ cron.schedule(invoices.schedule, invoices.run); // node-cron
82
+ new Cron(invoices.schedule, invoices.run); // croner
83
+ CronJob.from({ cronTime: invoices.schedule, onTick: invoices.run, start: true }); // cron
84
+ schedule.scheduleJob(invoices.schedule, invoices.run); // node-schedule
85
+ ```
86
+
87
+ - **Failures:** a failed tick is recorded with its error type and passed to `onError` (default `console.error`). It is not rethrown, because most cron libraries turn a rejected tick into an unhandled rejection.
88
+ - **Options:** everything `workload()` takes, plus `registry` and `onError`. Declaring the same name twice throws.
89
+ - **Time zones:** if your scheduler runs the pattern in a time zone, pass the same one to the CLI with `--time-zone`.
63
90
 
64
- ### BullMQ
91
+ ## BullMQ
65
92
 
66
93
  ```ts
67
94
  import { discoverSchedulers, instrument, workloadOf } from '@runsignal/node/bullmq';
@@ -75,20 +102,20 @@ await queue.upsertJobScheduler('Daily Sales Report', { pattern: '0 0 6 * * *' },
75
102
  await discoverSchedulers(queue); // registers schedulers before they first fire
76
103
  ```
77
104
 
78
- - **What gets recorded:** every job, including success, failure with its error type, cancellation (when BullMQ aborts the job) and duration. Results and errors pass through, so retries work as before.
105
+ - **What is recorded:** every job, including success, failure with its error type, cancellation (when BullMQ aborts the job) and duration. Results and errors pass through, so retries work as before.
79
106
  - **Naming:** jobs from a job scheduler are named after the scheduler (`Daily Sales Report` becomes `daily-sales-report`). Other jobs are named after their queue and job name (`emails.send-welcome`).
80
- - **Discovery:** `discoverSchedulers` takes each scheduler's cron pattern as its schedule, so a scheduler that never fires gets a `missed` alert. Schedulers that use `every` get no schedule.
81
- - **Redis client:** in ESM, BullMQ 6 needs a constructed Redis client, such as `connection: new Redis({ maxRetriesPerRequest: null })` from `ioredis`, instead of connection options.
107
+ - **Discovery:** `discoverSchedulers` takes each scheduler's cron pattern as its schedule, so a scheduler that never fires gets a `missed` alert.
108
+ - **Redis client:** in ESM, BullMQ 6 needs a constructed client, such as `connection: new Redis({ maxRetriesPerRequest: null })` from `ioredis`.
82
109
 
83
- ### Manifest
110
+ ## Manifest
84
111
 
85
112
  ```ts
86
113
  defaultRegistry.writeManifestFromEnv('billing-service'); // writes to RUNSIGNAL_MANIFEST_PATH when it is set
87
114
  ```
88
115
 
89
- ### Exporting to New Relic
116
+ ## Exporting
90
117
 
91
- Use delta temporality. With cumulative, a stopped workload never looks stopped:
118
+ **New Relic** needs delta temporality. With cumulative, a stopped workload never looks stopped:
92
119
 
93
120
  ```ts
94
121
  new OTLPMetricExporter({
@@ -98,12 +125,15 @@ new OTLPMetricExporter({
98
125
  });
99
126
  ```
100
127
 
101
- A complete program is in [examples/worker](examples/worker).
128
+ **Prometheus 3** receives OTLP at `/api/v1/otlp/v1/metrics` with the default (cumulative) temporality. Generate
129
+ its rules with `runsignal export prometheus`.
130
+
131
+ A complete program is in [examples/worker](https://github.com/gokhanertogan/RunSignal/tree/main/src/RunSignal.Node/examples/worker).
102
132
 
103
133
  ## Performance
104
134
 
105
135
  Measured on Apple Silicon with Node.js 26 and the OpenTelemetry metrics SDK attached; the times include its
106
- aggregation. Run with `npm run bench`.
136
+ aggregation. Run `npm run bench`.
107
137
 
108
138
  | Operation | Time |
109
139
  |---|---|
@@ -115,6 +145,10 @@ create the registry with `new WorkloadRegistry({ tracing: false })`.
115
145
 
116
146
  ## Development
117
147
 
118
- ```bash
119
- npm test # needs redis-server on the PATH; the BullMQ tests start their own instance
120
- ```
148
+ `npm test` needs `redis-server` on the `PATH`; the BullMQ tests start their own instance.
149
+
150
+ ## Links
151
+
152
+ [Specification](https://github.com/gokhanertogan/RunSignal/blob/main/spec/README.md) ·
153
+ [Changelog](https://github.com/gokhanertogan/RunSignal/blob/main/CHANGELOG.md) ·
154
+ [Other languages](https://github.com/gokhanertogan/RunSignal#quick-start)
package/dist/cron.d.ts ADDED
@@ -0,0 +1,33 @@
1
+ import { type Workload, type WorkloadOptions, type WorkloadRegistry } from './registry.js';
2
+ export interface CronJobOptions extends WorkloadOptions {
3
+ /** Cron expression the job runs on. Pass `job.schedule` to your scheduler so the alert and the job agree. */
4
+ schedule: string;
5
+ /** The registry to record on. Defaults to `defaultRegistry`. */
6
+ registry?: WorkloadRegistry;
7
+ /**
8
+ * Called with the error of a failed run, after the failure is recorded. Defaults to `console.error`. The error
9
+ * is not rethrown, because most cron libraries turn a rejected tick into an unhandled rejection.
10
+ */
11
+ onError?: (error: unknown, workload: Workload) => void;
12
+ }
13
+ export interface CronJob {
14
+ /** The workload each tick runs as, for counting items or heartbeats outside `fn`. */
15
+ readonly workload: Workload;
16
+ /** The cron expression the job was declared with. */
17
+ readonly schedule: string;
18
+ /** Runs `fn` once as a run of the workload. Pass it to your cron library as the tick handler. */
19
+ readonly run: () => Promise<void>;
20
+ }
21
+ /**
22
+ * Declares a scheduled job as a workload with `options.schedule` as its schedule, so it gets a missed alert from
23
+ * startup, even before it first fires. Works with any cron library: node-cron, croner, cron or node-schedule.
24
+ *
25
+ * ```ts
26
+ * const invoices = cronJob('nightly-invoice', { schedule: '0 2 * * *', maxDuration: '30m' }, async (w) => {
27
+ * for (const order of await unbilledOrders()) { await createInvoice(order); w.processed(); }
28
+ * });
29
+ * cron.schedule(invoices.schedule, invoices.run); // node-cron
30
+ * new Cron(invoices.schedule, invoices.run); // croner
31
+ * ```
32
+ */
33
+ export declare function cronJob(name: string, options: CronJobOptions, fn: (workload: Workload) => unknown): CronJob;
package/dist/cron.js ADDED
@@ -0,0 +1,33 @@
1
+ import { defaultRegistry } from './registry.js';
2
+ /**
3
+ * Declares a scheduled job as a workload with `options.schedule` as its schedule, so it gets a missed alert from
4
+ * startup, even before it first fires. Works with any cron library: node-cron, croner, cron or node-schedule.
5
+ *
6
+ * ```ts
7
+ * const invoices = cronJob('nightly-invoice', { schedule: '0 2 * * *', maxDuration: '30m' }, async (w) => {
8
+ * for (const order of await unbilledOrders()) { await createInvoice(order); w.processed(); }
9
+ * });
10
+ * cron.schedule(invoices.schedule, invoices.run); // node-cron
11
+ * new Cron(invoices.schedule, invoices.run); // croner
12
+ * ```
13
+ */
14
+ export function cronJob(name, options, fn) {
15
+ const { registry = defaultRegistry, onError = defaultOnError, ...expectations } = options;
16
+ const workload = registry.workload(name, expectations);
17
+ return {
18
+ workload,
19
+ schedule: options.schedule,
20
+ run: async () => {
21
+ try {
22
+ await workload.run(() => fn(workload));
23
+ }
24
+ catch (error) {
25
+ onError(error, workload);
26
+ }
27
+ },
28
+ };
29
+ }
30
+ function defaultOnError(error, workload) {
31
+ console.error(`runsignal: a run of ${workload.name} failed`, error);
32
+ }
33
+ //# sourceMappingURL=cron.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cron.js","sourceRoot":"","sources":["../src/cron.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAA8D,MAAM,eAAe,CAAC;AAuB5G;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,OAAO,CAAC,IAAY,EAAE,OAAuB,EAAE,EAAmC;IAChG,MAAM,EAAE,QAAQ,GAAG,eAAe,EAAE,OAAO,GAAG,cAAc,EAAE,GAAG,YAAY,EAAE,GAAG,OAAO,CAAC;IAC1F,MAAM,QAAQ,GAAG,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IACvD,OAAO;QACL,QAAQ;QACR,QAAQ,EAAE,OAAO,CAAC,QAAQ;QAC1B,GAAG,EAAE,KAAK,IAAI,EAAE;YACd,IAAI,CAAC;gBACH,MAAM,QAAQ,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;YACzC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,cAAc,CAAC,KAAc,EAAE,QAAkB;IACxD,OAAO,CAAC,KAAK,CAAC,uBAAuB,QAAQ,CAAC,IAAI,SAAS,EAAE,KAAK,CAAC,CAAC;AACtE,CAAC"}
@@ -11,7 +11,7 @@ export type Duration = number | string;
11
11
  export interface WorkloadOptions {
12
12
  /** Cron expression for when the workload should run. Produces the missed alert. */
13
13
  schedule?: string;
14
- /** Longest acceptable run. Produces the overrun alert. */
14
+ /** Longest acceptable run. Produces the overrun alert (a finished run took longer) and the hung alert (an unfinished run has been running longer). */
15
15
  maxDuration?: Duration;
16
16
  /** Longest acceptable gap between heartbeats. Produces the stalled alert. */
17
17
  expectEvery?: Duration;
@@ -119,7 +119,9 @@ export declare class Workload {
119
119
  constructor(registry: WorkloadRegistry, name: string, expectations: Expectations);
120
120
  /**
121
121
  * Starts a run. End it with exactly one call to `succeed`, `fail`, `failCode` or `cancel`; later calls are
122
- * ignored. Prefer `run`, which ends the run for you and makes the run's span active for `fn`.
122
+ * ignored. A run that is never ended stays in progress: it reports a growing `active_run_age`, which opens the
123
+ * hung alert once it passes `maxDuration`. Prefer `run`, which ends the run for you and makes the run's span
124
+ * active for `fn`.
123
125
  */
124
126
  start(): Run;
125
127
  /**
@@ -136,20 +138,23 @@ export declare class Workload {
136
138
  /** Records a heartbeat: the workload is alive and making progress. */
137
139
  beat(): void;
138
140
  /** @internal */
139
- complete(start: number, span: Span | undefined, outcome: Outcome, errorType?: string, error?: unknown, description?: string): void;
141
+ complete(start: number, slot: number, span: Span | undefined, outcome: Outcome, errorType?: string, error?: unknown, description?: string): void;
140
142
  /** @internal */
141
143
  secondsSinceSuccess(now: number): number | undefined;
142
144
  /** @internal */
143
145
  secondsSinceHeartbeat(now: number): number | undefined;
146
+ /** @internal */
147
+ activeRunAge(now: number): number | undefined;
144
148
  }
145
149
  /** One run of a Workload, started with `Workload.start`. */
146
150
  export declare class Run {
147
151
  #private;
148
152
  readonly workload: Workload;
149
153
  private readonly started;
154
+ private readonly slot;
150
155
  readonly span: Span | undefined;
151
156
  /** @internal */
152
- constructor(workload: Workload, started: number, span: Span | undefined);
157
+ constructor(workload: Workload, started: number, slot: number, span: Span | undefined);
153
158
  /** Milliseconds since the run started. */
154
159
  get elapsedMs(): number;
155
160
  /** Ends the run as successful. */
package/dist/registry.js CHANGED
@@ -75,6 +75,10 @@ export class WorkloadRegistry {
75
75
  unit: 's',
76
76
  description: 'Seconds since the last heartbeat of a workload, or since it was registered.',
77
77
  });
78
+ const activeRunAge = meter.createObservableGauge(Metrics.activeRunAge, {
79
+ unit: 's',
80
+ description: 'Seconds the oldest unfinished run of a workload has been running, or 0 while none is.',
81
+ });
78
82
  meter.addBatchObservableCallback((observer) => {
79
83
  const now = performance.now();
80
84
  for (const workload of this.#workloads.values()) {
@@ -84,8 +88,11 @@ export class WorkloadRegistry {
84
88
  const heartbeat = workload.secondsSinceHeartbeat(now);
85
89
  if (heartbeat !== undefined)
86
90
  observer.observe(sinceHeartbeat, heartbeat, workload.nameAttributes);
91
+ const active = workload.activeRunAge(now);
92
+ if (active !== undefined)
93
+ observer.observe(activeRunAge, active, workload.nameAttributes);
87
94
  }
88
- }, [sinceSuccess, sinceHeartbeat]);
95
+ }, [sinceSuccess, sinceHeartbeat, activeRunAge]);
89
96
  return {
90
97
  provider,
91
98
  runs: meter.createCounter(Metrics.runs, { unit: '{run}', description: 'Completed runs of a workload.' }),
@@ -125,6 +132,10 @@ export class WorkloadRegistry {
125
132
  validateName(name);
126
133
  const created = new Workload(this, name, toExpectations(options));
127
134
  this.#workloads.set(name, created);
135
+ // Moves the gauges to the global meter provider if it has changed since the registry was created, for example
136
+ // when the default registry was created by an import before the SDK started. Otherwise a workload that never
137
+ // runs would report nothing, and its missed and hung alerts would never open.
138
+ void this.instruments;
128
139
  return created;
129
140
  }
130
141
  /** Every workload created so far, sorted by name. */
@@ -166,6 +177,9 @@ export class WorkloadRegistry {
166
177
  return path;
167
178
  }
168
179
  }
180
+ // How many runs in progress a workload tracks for active_run_age. Runs started while every slot is taken are not
181
+ // tracked, so with more concurrent runs the reported age is a lower bound.
182
+ const ACTIVE_RUN_SLOTS = 64;
169
183
  /**
170
184
  * A unit of background work, such as a scheduled job, a queue consumer or a sync loop. Get one from a
171
185
  * WorkloadRegistry once and keep it.
@@ -184,6 +198,9 @@ export class Workload {
184
198
  #lastHeartbeat;
185
199
  #hasStarted = false;
186
200
  #hasBeaten = false;
201
+ // Start timestamps of the runs in progress, 0 for a free slot, allocated on the first run. A run claims a slot
202
+ // when it starts and frees it when it ends, so the oldest one gives active_run_age.
203
+ #activeRuns;
187
204
  /** @internal */
188
205
  constructor(registry, name, expectations) {
189
206
  this.name = name;
@@ -201,12 +218,33 @@ export class Workload {
201
218
  }
202
219
  /**
203
220
  * Starts a run. End it with exactly one call to `succeed`, `fail`, `failCode` or `cancel`; later calls are
204
- * ignored. Prefer `run`, which ends the run for you and makes the run's span active for `fn`.
221
+ * ignored. A run that is never ended stays in progress: it reports a growing `active_run_age`, which opens the
222
+ * hung alert once it passes `maxDuration`. Prefer `run`, which ends the run for you and makes the run's span
223
+ * active for `fn`.
205
224
  */
206
225
  start() {
207
226
  this.#hasStarted = true;
208
227
  const span = this.#registry.tracer?.startSpan(this.name, { kind: SpanKind.INTERNAL, attributes: this.nameAttributes });
209
- return new Run(this, performance.now(), span);
228
+ const started = performance.now();
229
+ return new Run(this, started, this.#trackStart(started), span);
230
+ }
231
+ // Returns the claimed slot, or -1 when every slot is taken; such a run is not tracked.
232
+ #trackStart(started) {
233
+ const runs = (this.#activeRuns ??= new Float64Array(ACTIVE_RUN_SLOTS));
234
+ for (let i = 0; i < runs.length; i++) {
235
+ if (runs[i] === 0) {
236
+ // performance.now() is positive after startup; guard 0 so a run can never look like a free slot.
237
+ runs[i] = started || Number.MIN_VALUE;
238
+ return i;
239
+ }
240
+ }
241
+ return -1;
242
+ }
243
+ // Frees the run's slot only if it still holds this run, so ending a run twice cannot end a newer one.
244
+ #trackEnd(started, slot) {
245
+ const runs = this.#activeRuns;
246
+ if (slot >= 0 && runs !== undefined && runs[slot] === (started || Number.MIN_VALUE))
247
+ runs[slot] = 0;
210
248
  }
211
249
  /**
212
250
  * Runs `fn` as one run of the workload: it succeeds when `fn` resolves, is cancelled when `fn` rejects after
@@ -245,7 +283,8 @@ export class Workload {
245
283
  this.#registry.instruments.heartbeats.add(1, this.nameAttributes);
246
284
  }
247
285
  /** @internal */
248
- complete(start, span, outcome, errorType, error, description) {
286
+ complete(start, slot, span, outcome, errorType, error, description) {
287
+ this.#trackEnd(start, slot);
249
288
  const now = performance.now();
250
289
  const instruments = this.#registry.instruments;
251
290
  if (errorType === undefined) {
@@ -284,17 +323,36 @@ export class Workload {
284
323
  secondsSinceHeartbeat(now) {
285
324
  return this.#hasBeaten || this.expectations.expectEveryMs !== undefined ? (now - this.#lastHeartbeat) / 1000 : undefined;
286
325
  }
326
+ // Seconds the oldest run in progress has been running, or 0. Reported for workloads that have a maximum
327
+ // duration or have run, so the hung alert has a value to evaluate, and closes, while nothing is running.
328
+ /** @internal */
329
+ activeRunAge(now) {
330
+ if (!this.#hasStarted && this.expectations.maxDurationMs === undefined)
331
+ return undefined;
332
+ const runs = this.#activeRuns;
333
+ if (runs === undefined)
334
+ return 0;
335
+ let oldest = Infinity;
336
+ for (let i = 0; i < runs.length; i++) {
337
+ const started = runs[i];
338
+ if (started !== 0 && started < oldest)
339
+ oldest = started;
340
+ }
341
+ return oldest === Infinity ? 0 : Math.max(0, (now - oldest) / 1000);
342
+ }
287
343
  }
288
344
  /** One run of a Workload, started with `Workload.start`. */
289
345
  export class Run {
290
346
  workload;
291
347
  started;
348
+ slot;
292
349
  span;
293
350
  #ended = false;
294
351
  /** @internal */
295
- constructor(workload, started, span) {
352
+ constructor(workload, started, slot, span) {
296
353
  this.workload = workload;
297
354
  this.started = started;
355
+ this.slot = slot;
298
356
  this.span = span;
299
357
  }
300
358
  /** Milliseconds since the run started. */
@@ -304,7 +362,7 @@ export class Run {
304
362
  /** Ends the run as successful. */
305
363
  succeed() {
306
364
  if (this.#end())
307
- this.workload.complete(this.started, this.span, 'success');
365
+ this.workload.complete(this.started, this.slot, this.span, 'success');
308
366
  }
309
367
  /**
310
368
  * Ends the run as failed because of `error`. Its `error.type` is the error's `errorType` if it has one, then
@@ -312,7 +370,7 @@ export class Run {
312
370
  */
313
371
  fail(error) {
314
372
  if (this.#end())
315
- this.workload.complete(this.started, this.span, 'failure', errorTypeOf(error), error, error instanceof Error ? error.message : String(error));
373
+ this.workload.complete(this.started, this.slot, this.span, 'failure', errorTypeOf(error), error, error instanceof Error ? error.message : String(error));
316
374
  }
317
375
  /**
318
376
  * Ends the run as failed without an error, for example when an expected input file is missing. `code` must be
@@ -320,12 +378,12 @@ export class Run {
320
378
  */
321
379
  failCode(code, description) {
322
380
  if (this.#end())
323
- this.workload.complete(this.started, this.span, 'failure', code || 'unknown', undefined, description);
381
+ this.workload.complete(this.started, this.slot, this.span, 'failure', code || 'unknown', undefined, description);
324
382
  }
325
383
  /** Ends the run as cancelled, for example on shutdown. Cancelled runs do not count as failures. */
326
384
  cancel() {
327
385
  if (this.#end())
328
- this.workload.complete(this.started, this.span, 'cancelled');
386
+ this.workload.complete(this.started, this.slot, this.span, 'cancelled');
329
387
  }
330
388
  #end() {
331
389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AAC;IACpI,CAAC;IAED,mGAAmG;IACnG,MAAM;QACJ,IAAI,IAAI,CAAC,IAAI,EAAE;YAAE,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAC3F,CAAC;IAED,IAAI;QACF,IAAI,IAAI,CAAC,MAAM;YAAE,OAAO,KAAK,CAAC;QAC9B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC;QACnB,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAgD,CAAC;QAC7E,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,SAAS;YAAE,OAAO,SAAS,CAAC;QACjE,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI;YAAE,OAAO,IAAI,CAAC;QAClD,MAAM,IAAI,GAAG,KAAK,CAAC,WAAW,EAAE,IAAI,CAAC;QACrC,IAAI,IAAI,IAAI,IAAI,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC;IAC7C,CAAC;IACD,OAAO,OAAO,KAAK,CAAC;AACtB,CAAC;AAED,qEAAqE;AACrE,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,gBAAgB,EAAE,CAAC;AAEtD,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -3,7 +3,7 @@
3
3
  * SDK (see spec/README.md in the repository), so one set of alert rules covers every language.
4
4
  */
5
5
  export declare const SCOPE_NAME = "RunSignal";
6
- export declare const VERSION = "0.1.0";
6
+ export declare const VERSION = "0.3.0";
7
7
  export declare const Metrics: {
8
8
  readonly runs: 'runsignal.workload.runs';
9
9
  readonly duration: 'runsignal.workload.duration';
@@ -11,6 +11,7 @@ export declare const Metrics: {
11
11
  readonly heartbeats: 'runsignal.workload.heartbeats';
12
12
  readonly sinceSuccess: 'runsignal.workload.since_success';
13
13
  readonly sinceHeartbeat: 'runsignal.workload.since_heartbeat';
14
+ readonly activeRunAge: 'runsignal.workload.active_run_age';
14
15
  };
15
16
  export declare const Attributes: {
16
17
  readonly workload: 'runsignal.workload';
package/dist/telemetry.js CHANGED
@@ -3,7 +3,7 @@
3
3
  * SDK (see spec/README.md in the repository), so one set of alert rules covers every language.
4
4
  */
5
5
  export const SCOPE_NAME = 'RunSignal';
6
- export const VERSION = '0.1.0';
6
+ export const VERSION = '0.3.0';
7
7
  export const Metrics = {
8
8
  runs: 'runsignal.workload.runs',
9
9
  duration: 'runsignal.workload.duration',
@@ -11,6 +11,7 @@ export const Metrics = {
11
11
  heartbeats: 'runsignal.workload.heartbeats',
12
12
  sinceSuccess: 'runsignal.workload.since_success',
13
13
  sinceHeartbeat: 'runsignal.workload.since_heartbeat',
14
+ activeRunAge: 'runsignal.workload.active_run_age',
14
15
  };
15
16
  export const Attributes = {
16
17
  workload: 'runsignal.workload',
@@ -1 +1 @@
1
- {"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC;AACtC,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAE/B,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,IAAI,EAAE,yBAAyB;IAC/B,QAAQ,EAAE,6BAA6B;IACvC,KAAK,EAAE,0BAA0B;IACjC,UAAU,EAAE,+BAA+B;IAC3C,YAAY,EAAE,kCAAkC;IAChD,cAAc,EAAE,oCAAoC;CAC5C,CAAC;AAEX,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,QAAQ,EAAE,oBAAoB;IAC9B,OAAO,EAAE,mBAAmB;IAC5B,UAAU,EAAE,uBAAuB;IACnC,SAAS,EAAE,YAAY;CACf,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK;CAC3F,CAAC"}
1
+ {"version":3,"file":"telemetry.js","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,WAAW,CAAC;AACtC,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC;AAE/B,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,IAAI,EAAE,yBAAyB;IAC/B,QAAQ,EAAE,6BAA6B;IACvC,KAAK,EAAE,0BAA0B;IACjC,UAAU,EAAE,+BAA+B;IAC3C,YAAY,EAAE,kCAAkC;IAChD,cAAc,EAAE,oCAAoC;IACpD,YAAY,EAAE,mCAAmC;CACzC,CAAC;AAEX,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,QAAQ,EAAE,oBAAoB;IAC9B,OAAO,EAAE,mBAAmB;IAC5B,UAAU,EAAE,uBAAuB;IACnC,SAAS,EAAE,YAAY;CACf,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAsB;IACjD,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK;CAC3F,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@runsignal/node",
3
- "version": "0.1.0",
4
- "description": "Monitor Node.js background work that no HTTP status code describes (scheduled jobs, BullMQ queues, sync loops) with OpenTelemetry, and alert on missed, overrunning, stalled or low-output jobs.",
3
+ "version": "0.3.0",
4
+ "description": "Cron job and background job monitoring for Node.js with OpenTelemetry: alert when a scheduled job is missed, fails, overruns or stalls, or a BullMQ queue stops processing. Works with node-cron, croner, cron, node-schedule and BullMQ; alerts for New Relic, Prometheus and Grafana.",
5
5
  "license": "MIT",
6
6
  "author": "Gokhan Ertogan",
7
7
  "repository": {
@@ -10,15 +10,29 @@
10
10
  "directory": "src/RunSignal.Node"
11
11
  },
12
12
  "keywords": [
13
- "observability",
14
- "opentelemetry",
15
- "monitoring",
16
- "alerting",
17
- "background-jobs",
13
+ "cron-monitoring",
18
14
  "cron",
15
+ "job-monitoring",
16
+ "background-jobs",
17
+ "scheduled-jobs",
19
18
  "heartbeat",
19
+ "dead-mans-switch",
20
+ "healthcheck",
20
21
  "bullmq",
21
- "newrelic"
22
+ "node-cron",
23
+ "croner",
24
+ "node-schedule",
25
+ "queue-monitoring",
26
+ "worker",
27
+ "opentelemetry",
28
+ "otel",
29
+ "observability",
30
+ "monitoring",
31
+ "alerting",
32
+ "prometheus",
33
+ "grafana",
34
+ "newrelic",
35
+ "typescript"
22
36
  ],
23
37
  "type": "module",
24
38
  "engines": {
@@ -32,6 +46,10 @@
32
46
  "./bullmq": {
33
47
  "types": "./dist/bullmq.d.ts",
34
48
  "default": "./dist/bullmq.js"
49
+ },
50
+ "./cron": {
51
+ "types": "./dist/cron.d.ts",
52
+ "default": "./dist/cron.js"
35
53
  }
36
54
  },
37
55
  "files": [