Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access to the ZBClient instance #16

Open
jwulf opened this issue Nov 18, 2019 · 2 comments
Open

Access to the ZBClient instance #16

jwulf opened this issue Nov 18, 2019 · 2 comments

Comments

@jwulf
Copy link
Contributor

jwulf commented Nov 18, 2019

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 and connectionError 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?

@jwulf
Copy link
Contributor Author

jwulf commented Nov 18, 2019

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?

@danshapir
Copy link
Contributor

The workers are created behind the scenes in the zeebe-server.ts so only there will you gain access to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants