Open jwulf opened 4 years ago
For the client, I can do this:
export class WorkflowController {
constructor(
@Inject(ZEEBE_CONNECTION_PROVIDER) private readonly zbClient: ZBClient,
@Inject(WINSTON_MODULE_PROVIDER) private readonly logger: Logger,
) {
canaryize(zbClient, {
url: ChirpUrl,
minutes: 5,
})
}
What about for the worker?
The workers are created behind the scenes in the zeebe-server.ts
so only there will you gain access to it.
I've written a new monitoring package for Zeebe clients and workers: https://github.com/jwulf/zeebe-canaryize.
It relies on an upcoming patch that makes the ZBClient and the ZBWorker event emitters that emit
ready
andconnectionError
events.To use it, you need to pass in the ZBClient / ZBWorker instance to the
canaryize
function.What's the best way to integrate this functionality with this package?