BugsRadar

Go, PHP, Ruby, Java: alerts without a package

Updated 1 October 2026 · BugsRadar team

There is no BugsRadar package for Go, PHP, Ruby or Java yet, and there doesn't need to be one for the alert to work. Everything that can send an HTTP request can send an alert: the project's key in a header, the text of the message in the body, and optional query parameters for the level, a category, the environment and the host.

The request

POST https://api.bugsradar.com/api/v3/notify with X-Api-Key and a plain-text body. The server answers 202 as soon as it has the message, and delivery to the channels goes on in the background. The parameters, the responses and the limits are in the HTTP endpoint docs.

Go

orders.go
req, _ := http.NewRequest("POST",
    "https://api.bugsradar.com/api/v3/notify?level=error&category=orders",
    strings.NewReader("Order "+orderID+" failed: "+err.Error()))
req.Header.Set("X-Api-Key", os.Getenv("BUGSRADAR_KEY"))
req.Header.Set("Content-Type", "text/plain; charset=utf-8")
resp, sendErr := http.DefaultClient.Do(req)
if sendErr == nil {
    resp.Body.Close()
}

PHP

orders.php
$ch = curl_init('https://api.bugsradar.com/api/v3/notify?level=error&category=orders');
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => "Order $orderId failed: " . $e->getMessage(),
    CURLOPT_HTTPHEADER => ['X-Api-Key: ' . getenv('BUGSRADAR_KEY'), 'Content-Type: text/plain; charset=utf-8'],
    CURLOPT_TIMEOUT => 15,
    CURLOPT_RETURNTRANSFER => true,
]);
curl_exec($ch);
curl_close($ch);

Ruby's Net::HTTP, Java's HttpClient, Rust's reqwest and everything else look the same: one POST, one header, one string.

What arrives and how it is grouped

The message arrives in your chat with the level, the category and the host, and repeats are counted in it. Numbers, ids, URLs and quoted values don't count when messages are compared, so Order 48213 failed and Order 48214 failed are one error with a count, not two messages. Put the thing that identifies the error in the text and the thing that varies in a number or in quotes. See What you receive.

What the packages add on top

A package catches uncaught exceptions by itself, sends the stack trace and the message template, folds repeats before they leave the process and never makes your code wait for the network. Over HTTP you send what you put in the text, the request is as synchronous as you make it, and you decide where in the code to call it. Give the request a timeout of a few seconds and call it from the catch that matters.

Scripts too

The same request works from Bash, PowerShell, cron, systemd, SQL Server Agent and CI pipelines: see the guides. If you would like a package for your platform, write to us.

Where to go next

The parameters and the responses are in the HTTP endpoint docs; the overview is BugsRadar for scripts.

Next: Set it up with Claude Code or Copilot in one prompt →