-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
11 changed files
with
122 additions
and
38 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
packages/nodejs/.changesets/stop-minutely-probes-when-stopping-appsignal.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
bump: "patch" | ||
type: "fix" | ||
--- | ||
|
||
The minutely probes are now stopped when `Appsignal.stop()` is called. | ||
In addition, the probes can be stopped independently of the rest of | ||
the integration by calling `probes.stop()`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export * from "./span" | ||
export * from "./tracer" | ||
export * from "./metrics" | ||
export * from "./probes" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters