OpenFn / OpenFn/kit

ws-worker: tracing events

Open
#402 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
21
Forks
23
Avg merge
1d 22h
Merged PRs (30d)
17

Description

Most of what the worker does is listen to events going on inside the engine and reporting them back to lighting. As well as managing the work loop to pull attempts from lightining.

But the worker is going to get an extra responsibility: tracing.

We want to be able to attach an event listener to the worker to track what's going on inside it. We should listen to workflow and job star/tcomplete and stuff.

But we also want to monitor the loading of dataclips, the time it takes to send messages to lightning (especially messages with dataclips attached), the loading of credentials, errors which occur, and so on.

These events can be pushed out to prometheus or whatever to track metrics and general behaviour.

I don't think it's a particularly big job, there's already an event hook on the worker. It just needs rationalising a bit - like should it directly emit events from the inner worker or catch and wrap them? Also monitoring of lightning comms needs adding seperately.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the existing event hook on the worker and trace how events from the inner worker, workflow and job lifecycle, dataclip loading, credentials, errors, and Lightning communication flow through it. Clarify the event surface and wrapping strategy with maintainers, then verify that the agreed tracing events expose the listed worker activity for metrics consumers.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend, observability
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.