Skip to content

Commit

Permalink
Add --[no-]send-report options to diagnose (#392)
Browse files Browse the repository at this point in the history
* Add --[no-]send-report options to diagnose

Replace the `--no-report` option--which turned sending the diagnose report
to AppSignal's servers off--with `--send-report` and `--no-send-report`.

By default, the report is not sent if you don't pass `--send-report`.
  • Loading branch information
jeffkreeftmeijer authored May 13, 2021
1 parent 648c644 commit 58e73ba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
bump: "patch"
---

Replace the `--no-report` option--which turned sending the diagnose report
to AppSignal's servers off--with `--send-report` and `--no-send-report`.

By default, the report is not sent if you don't pass `--send-report`.
4 changes: 2 additions & 2 deletions packages/nodejs/bin/diagnose
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ const { DiagnoseTool } = require("../dist/diagnose")
// enable diagnose mode
process.env["_APPSIGNAL_DIAGNOSE"] = "true"

// providing --no-report at runtime stops the report from bieng sent
// providing --send-report sends the report. --no-send-report stops the report from being sent
// it can also be passed by @appsignal/cli
const shouldSendReport = !process.argv.includes("--no-report")
const shouldSendReport = process.argv.includes("--send-report") && !process.argv.includes("--no-send-report")

const tool = new DiagnoseTool({})

Expand Down

0 comments on commit 58e73ba

Please sign in to comment.