Skip to content

Commit

Permalink
Add query params to diagnose report transmission (#481)
Browse files Browse the repository at this point in the history
The query params to submit the diagnose report weren't included. This
way it matches the other integrations.
  • Loading branch information
tombruijn authored Nov 4, 2021
1 parent c04874f commit c750216
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
bump: "patch"
---

Send the diagnose report with correct query parameters to help link the report to the app and organization on AppSignal.com.
7 changes: 6 additions & 1 deletion packages/nodejs/src/diagnose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,12 @@ export class DiagnoseTool {
const json = JSON.stringify({ diagnose: data })

const config = this.#config.data
const params = new URLSearchParams({ api_key: config["apiKey"] || "" })
const params = new URLSearchParams({
api_key: config["apiKey"] || "",
name: config["name"] || "",
environment: config["environment"] || "",
hostname: config["hostname"] || ""
})

const diagnoseEndpoint =
process.env.APPSIGNAL_DIAGNOSE_ENDPOINT || "https://appsignal.com/diag"
Expand Down
2 changes: 1 addition & 1 deletion test/integration/diagnose

0 comments on commit c750216

Please sign in to comment.