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

Add Probes.stop behavior #569

Closed
2 tasks
tombruijn opened this issue Jan 27, 2022 · 1 comment · Fixed by #612
Closed
2 tasks

Add Probes.stop behavior #569

tombruijn opened this issue Jan 27, 2022 · 1 comment · Fixed by #612
Assignees

Comments

@tombruijn
Copy link
Member

tombruijn commented Jan 27, 2022

As agreed upon in https://github.com/appsignal/integration-guide/pull/124, add a function to manually stop the minutely probes.

This may help with issue #418

To do

  • Implement a public Probes.stop function.
  • Call Probes.stop in Appsignal.stop
@tombruijn
Copy link
Member Author

I think we should try and pick up this one at least, because it may help with issue #418, and is a good way to test if these types of issues are resolved by this in practice.

@unflxw unflxw self-assigned this Feb 11, 2022
unflxw added a commit that referenced this issue Feb 11, 2022
Implement a `.stop` method on the `BaseProbes` class and on the
`Probes` interface, along with a read-only `.isStopped` property.

The new `BaseProbes` object handles only the stopping logic. The
actual behaviour of the probes is delegated to two private classes:
`StartedProbes` (which used to be `BaseProbes`) and `StoppedProbes`
(which used to be `NoopProbes`). Both of these implement the
`InternalProbes` private interface. Stopping the probes permanently
switches the implementation used.

`NoopProbes` no longer exists, but `BaseProbes({ stopped: true })`
can be used to initialise it in the stopped state, which is
functionally equivalent.

Call `metrics().probes().stop()` from the `BaseClient.stop()`
method, ensuring the probes system is stopped when AppSignal is
stopped.

Fixes #418 and closes #569.
unflxw added a commit that referenced this issue Feb 11, 2022
Implement a `.stop` method on the `BaseProbes` class and on the
`Probes` interface, along with a read-only `.isRunning` property.

The new `BaseProbes` object handles only the stopping logic. The
actual behaviour of the probes is delegated to two private classes:
`BaseProbeRunner` (which used to be `BaseProbes`) and
`NoopProbeRunner` (which used to be `NoopProbes`). Both of these
implement the `ProbeRunner` private interface. Stopping the probes
permanently switches the implementation used.

`NoopProbes` no longer exists, but `BaseProbes({ run: false })`
can be used to initialise it in the stopped state, which is
functionally equivalent.

Call `metrics().probes().stop()` from the `BaseClient.stop()`
method, ensuring the probes system is stopped when AppSignal is
stopped.

Fixes #418 and closes #569.
unflxw added a commit that referenced this issue Feb 11, 2022
Implement a `.stop` method on the `BaseProbes` class and on the
`Probes` interface, along with a read-only `.isRunning` property.

The new `BaseProbes` object handles only the stopping logic. The
actual behaviour of the probes is delegated to two private classes:
`BaseProbeRunner` (which used to be `BaseProbes`) and
`NoopProbeRunner` (which used to be `NoopProbes`). Both of these
implement the `ProbeRunner` private interface. Stopping the probes
permanently switches the implementation used.

`NoopProbes` no longer exists, but `BaseProbes({ run: false })`
can be used to initialise it in the stopped state, which is
functionally equivalent.

Call `metrics().probes().stop()` from the `BaseClient.stop()`
method, ensuring the probes system is stopped when AppSignal is
stopped.

Fixes #418 and closes #569.
unflxw added a commit that referenced this issue Feb 11, 2022
Implement a `.stop` method on the `BaseProbes` class and on the
`Probes` interface, along with a read-only `.isRunning` property.

The new `BaseProbes` object handles only the stopping logic. The
actual behaviour of the probes is delegated to two private classes:
`BaseProbeRunner` (which used to be `BaseProbes`) and
`NoopProbeRunner` (which used to be `NoopProbes`). Both of these
implement the `ProbeRunner` private interface. Stopping the probes
permanently switches the implementation used.

`NoopProbes` no longer exists, but `BaseProbes({ run: false })`
can be used to initialise it in the stopped state, which is
functionally equivalent.

Call `metrics().probes().stop()` from the `BaseClient.stop()`
method, ensuring the probes system is stopped when AppSignal is
stopped.

Fixes #418 and closes #569.
unflxw added a commit that referenced this issue Feb 14, 2022
Implement a `.stop` method on the `BaseProbes` class and on the
`Probes` interface, along with a read-only `.isRunning` property.

The new `BaseProbes` object handles only the stopping logic. The
actual behaviour of the probes is delegated to two private classes:
`BaseProbeRunner` (which used to be `BaseProbes`) and
`NoopProbeRunner` (which used to be `NoopProbes`). Both of these
implement the `ProbeRunner` private interface. Stopping the probes
permanently switches the implementation used.

`NoopProbes` no longer exists, but `BaseProbes({ run: false })`
can be used to initialise it in the stopped state, which is
functionally equivalent.

Call `metrics().probes().stop()` from the `BaseClient.stop()`
method, ensuring the probes system is stopped when AppSignal is
stopped.

Fixes #418 and closes #569.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants