Sentry Rate Limiting

Viewed 294

We have a couple of aws lambda functions which are using the same Sentry Client Key for error reporting. Recently we started to receive rate limiting error.

{
    "errorType": "SentryError",
    "errorMessage": "HTTP Error (429)",
    "name": "SentryError",
    "stack": [
        "SentryError: HTTP Error (429)",
        "    at new SentryError (/var/task/node_modules/@sentry/utils/dist/error.js:9:28)",
        "    at ClientRequest.<anonymous> (/var/task/node_modules/@sentry/node/dist/transports/base/index.js:212:44)",
        "    at Object.onceWrapper (events.js:421:26)",
        "    at ClientRequest.emit (events.js:314:20)",
        "    at ClientRequest.EventEmitter.emit (domain.js:483:12)",
        "    at HTTPParser.parserOnIncomingClient (_http_client.js:601:27)",
        "    at HTTPParser.parserOnHeadersComplete (_http_common.js:122:17)",
        "    at TLSSocket.socketOnData (_http_client.js:474:22)",
        "    at TLSSocket.emit (events.js:314:20)",
        "    at TLSSocket.EventEmitter.emit (domain.js:483:12)"
    ]
}

However, no actual errors occurs in the lambda function. From what we understand Sentry is recording every lambda executions and sending this information as trace. We are using a low tracesSampleRate, but the error still occurs.

AWSLambda.init({
  dsn: process.env.SENTRY_DNS,
  sampleRate: 1.0,
  tracesSampleRate: 0.1,
});

I don't know if this is relevant, but the functions are not inside our VPC, they are using AWS ip address pool.

We tried to find any indication of errors related to rate limiting in the Sentry dashboard, but without success.

enter image description here

Thanks!

1 Answers

I started getting this issue in one of our systems around the same time you posted this. Something that stopped it happening was to disable tracing all together (tracesSampleRate: 0). Not truly a fix, but enough to clear our error logs for now while we investigate a proper fix.

Related