Skip to content
pingwright
Docs menu Errors

Logs, metrics and errors

Errors

Pingwright groups your services' errors into issues, as Sentry does: one issue per problem, with the stack trace, breadcrumbs, how often it happens, and the logs that share its trace id. Keep the Sentry SDK you already use and change only its DSN.

Errors is a beta feature preview. An owner or admin turns it on under Settings › Feature previews.

Where errors come from

  • Any Sentry SDK, with its DSN pointed at Pingwright.
  • The Go client: pingwright.CaptureError, pingwright.Recover and pingwright.Middleware report errors and panics with the ingest key, no DSN needed. The key must be allowed to send logs as well as errors, and the Logs preview must be on too, since errors travel as log records.
  • OpenTelemetry logs: a log record at level error or fatal with exception.type or exception.stacktrace becomes an error event. See Logs.
  • Your checks: failed check runs are grouped into issues too, so a check's failures and your code's errors are in one list.

Get a DSN

Errors are organized in projects, each with its own DSN. Create a project under Settings › Telemetry; the DSN looks like this:

Text
https://<your-ingest-key>@ingest.pingwright.app/<project-id>

For a DSN that ships in a browser bundle, use a key that can only send errors. The console offers to create one.

Sentry SDKs

Only the DSN changes. Performance traces aren't stored yet, so turn trace sampling off.

Go

Shell
go get github.com/getsentry/sentry-go

export SENTRY_DSN=<your-dsn>
Go
err := sentry.Init(sentry.ClientOptions{
	Dsn:              os.Getenv("SENTRY_DSN"),
	Environment:      "production",
	Release:          "[email protected]",
	AttachStacktrace: true,
})
if err != nil {
	log.Fatal(err)
}
defer sentry.Flush(2 * time.Second)

sentry.CaptureException(err)

JavaScript

Shell
npm install @sentry/node   # or @sentry/browser, @sentry/react
JavaScript
import * as Sentry from "@sentry/node";

Sentry.init({
  dsn: "<your-dsn>",
  environment: "production",
  release: "[email protected]",
  // Performance traces are not stored yet.
  tracesSampleRate: 0,
});

Python

Shell
pip install sentry-sdk
Python
import sentry_sdk

sentry_sdk.init(
    dsn="<your-dsn>",
    environment="production",
    release="[email protected]",
    # Performance traces are not stored yet.
    traces_sample_rate=0,
)

Other Sentry SDKs work the same way: Pingwright accepts Sentry's envelope and store endpoints and keeps error events. Other kinds of Sentry data, such as transactions, replays and profiles, are dropped.

Issues

  • Events with the same stack are grouped into one issue, with a count and when it was first and last seen.
  • Open an issue for the stack trace, breadcrumbs, tags, the environment and release, and the logs with the same trace id.
  • Resolve, ignore or assign an issue. A resolved issue that happens again comes back.
  • Alert rules can tell you about a new issue, one that came back, or one that's happening faster than you set.

Secrets are scrubbed

Before an event is stored, Pingwright removes what looks like a secret:

  • Values whose key contains password, passwd, secret, token, api_key, auth, cookie, session, csrf, credential or private_key become [Filtered], in headers, tags, extra data, contexts, breadcrumbs and user data.
  • The Authorization, Proxy-Authorization, Cookie, Set-Cookie, X-Api-Key, X-Auth-Token, X-Forwarded-For, X-Real-Ip and Forwarded headers are dropped.
  • Sensitive query parameters and passwords in URLs are filtered.
  • Of the user, only the id and username are kept.

Scrubbing is a safety net, not a guarantee. Don't put secrets in error messages.

Retention and limits

Errors are kept for 30 days. Each project takes up to 1 000 events a minute and 100 000 a day; over the limit, the endpoint answers 429 with Retry-After. See Limits.

Your agent can read and triage issues with list_issues, get_issue and update_issues over MCP.

Open Errors in the console