Webhook

Configuration

You can use webhooks to send notifications from Tideways to your own applications. To make this work, first you have to create a "Webhook" integration and point to your external URL. Open the dropdown menu in the top right of Tideways and click on Organizations. In the following screen click on Integrations for the organization that you want to change. In most cases you will only see your one organization here.

This opens up the Integrations screen, where different configured integrations may already be listed. Click the Add New Integration button and select the "Webhook" integration type, give it a name and paste your webhook url. The URL must use https://. If you want create Webhook for Slack-compatible Tools like Mattermost, Discord or Matrix, please use the Slack integration instead.

After saving the integration you can first use the Preview feature to test the integration.

To connect the integration with individual notifications, open up the Project Settings from the dropdown in the top right, while inside the project you want to modify. Click Configure Notifications and either modify an existing notification or create a new one connected with the Webhook integration created in the previous step.

Request format

Tideways sends an HTTP POST request with a Content-Type: application/json header and a JSON-encoded body. There is no other header, no signature and no HMAC on the request, so treat the URL itself as the shared secret and only use https:// endpoints you control.

Requests are not retried automatically. A 401 response is recorded as an authentication failure on the integration, and any other status code >= 400 is recorded as a delivery error; both are logged and shown on the integration.

Most payloads share the same envelope:

{
  "type": "...",
  "link": "...",
  "organization": "...",
  "application": "...",
  "date": "...",
  "notification": { }
}

type identifies which check triggered the notification (see below), link points back to the relevant page in Tideways, and notification carries the event-specific data.

Payload variants

Response Time / Error Rate / Transaction Response Time incidents

Sent when a Response Time, Failure Rate or Transaction Response Time check opens, stays open (ongoing) or closes. type is response_time for Response Time checks, error_rate for Failure Rate checks, and transaction-response-time for Transaction Response Time checks. notification.status is opened, ongoing or closed depending on the incident phase. notification.incidient_id is a legacy, misspelled duplicate of notification.incident_id kept for backwards compatibility — both carry the same value.

{
  "type": "response_time",
  "link": "https:\/\/app.tideways.io\/o\/demo\/shopware\/issues\/incident?error=0&env=production&s=web&source=webhook&status=0",
  "organization": "demo",
  "application": "shopware",
  "date": "2017-10-21 07:12",
  "notification": {
    "incidient_id": 1508569935,
    "incident_id": 1508569935,
    "status": "opened",
    "value": 1234,
    "criticalThreshold": 1000
  }
}

Transaction Failure Rate

Sent when the failure rate of an individual transaction crosses its configured threshold.

{
  "type": "transaction-failure-rate",
  "link": "https:\/\/app.tideways.io\/o\/demo\/shopware\/issues\/incident?error=0&env=production&s=web&source=webhook&status=0",
  "organization": "demo",
  "application": "shopware",
  "date": "2017-10-21 07:12:00",
  "notification": {
    "formatted_value": "12.5 %",
    "value": 12.5,
    "formatted_threshold": "5 %",
    "environment": "production",
    "transaction": "checkout::confirmAction",
    "service": "web"
  }
}

Missing data (heartbeat)

Sent once when a service or transaction stops sending data for longer than the configured duration. Unlike the incident types above, this is only sent when the incident is first opened, not on every ongoing check. notification.transaction is only present when the heartbeat check is scoped to a single transaction.

{
  "type": "missing-data",
  "link": "https:\/\/app.tideways.io\/o\/demo\/shopware\/issues\/incident?error=0&env=production&s=web&source=webhook&status=0",
  "organization": "demo",
  "application": "shopware",
  "date": "2017-10-21 07:12:00",
  "notification": {
    "environment": "production",
    "service": "web",
    "since_at_least_hours": 24,
    "last_data_transmitted_at": "2017-10-20 07:00",
    "transaction": "checkout::confirmAction"
  }
}

New exceptions

Sent when a new type of exception is seen, or a previously resolved one reappears. notification.error_group.status is one of new, open, resolved, not_error or ignored.

{
  "type": "exception",
  "link": "https:\/\/app.tideways.io\/o\/demo\/shopware\/issues\/errors?error=1-cff6f577ede14445c911c558e3d07b68&env=production&s=web&source=webhook",
  "organization": "demo",
  "application": "shopware",
  "date": "2017-12-06 22:05:09",
  "notification": {
    "error_group": {
      "id": "1-cff6f577ede14445c911c558e3d07b68",
      "exceptionType": "PhpAllowedMemorySizeReachedError",
      "source": "web_profiler.controller.profiler:panelAction",
      "occurrences": 8,
      "occurrencesSinceLastRelease": 8,
      "firstOccurred": "17.07.2017 12:28",
      "lastOccurred": "06.12.2017 22:05",
      "lastMessage": "Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes)",
      "lastStackTrace": [
        {
          "file": "src/AppBundle/Controller/DefaultController.php",
          "line": 42,
          "function": "AppBundle\\Controller\\DefaultController::indexAction",
          "previousException": null
        }
      ],
      "status": "open",
      "transactionIds": [123],
      "type": "PhpAllowedMemorySizeReachedError",
      "environments": ["production"]
    }
  }
}

New slow SQL queries

Sent for newly detected slow SQL query groups. It uses the same error_group structure as new exceptions — notification.error_group.type contains a human-readable description of the query (e.g. "New slow SELECT query on orders") rather than an exception class name, and exceptionType is null.

{
  "type": "slow-sql",
  "link": "https:\/\/app.tideways.io\/o\/demo\/shopware\/issues\/slow-sql?error=1-8f2c1c7c9c1b4a2e9c1b4a2e9c1b4a2e&env=production&s=web&source=webhook",
  "organization": "demo",
  "application": "shopware",
  "date": "2020-07-09 10:20:00",
  "notification": {
    "error_group": {
      "id": "1-8f2c1c7c9c1b4a2e9c1b4a2e9c1b4a2e",
      "exceptionType": null,
      "source": "AppBundle\\Repository\\OrderRepository::findOpenOrders",
      "occurrences": 42,
      "occurrencesSinceLastRelease": 5,
      "firstOccurred": "09.07.2020 10:20",
      "lastOccurred": "09.07.2020 10:20",
      "lastMessage": null,
      "lastStackTrace": [
        {
          "file": "src/AppBundle/Repository/OrderRepository.php",
          "line": 88,
          "function": "AppBundle\\Repository\\OrderRepository::findOpenOrders",
          "previousException": null
        }
      ],
      "status": "open",
      "transactionIds": [456],
      "type": "New slow SELECT query on orders",
      "environments": ["production", "staging"]
    }
  }
}

Weekly report

To send the weekly report to a webhook, select your webhook in the weekly report notifications.

{
  "type": "weekly_report",
  "link": "https:\/\/app.tideways.io\/o\/demo\/shopware\/history",
  "organization": "demo",
  "application": "shopware",
  "date": "03.04.2017 - 09.04.2017",
  "notification": {
    "current_week": {
      "response_time": 80,
      "requests": 15411,
      "error_rate": 0
    },
    "previous_week": {
      "response_time": 79,
      "requests": 16412,
      "error_rate": 0
    }
  }
}

New release

Sent when a new release event is recorded, if the release check’s notification policy is set to always notify.

{
  "type": "release",
  "link": "https:\/\/app.tideways.io\/o\/demo\/shopware\/events",
  "organization": "demo",
  "application": "shopware",
  "date": "2017-04-10 09:30:00",
  "notification": {
    "release_name": "Test"
  }
}

Compare release

Sent separately from the new release notification above, once enough data has been collected after a release to compare performance before and after. It is only sent if the release check’s notification policy is set to always notify, or set to notify only on regressions and a performance regression was detected.

{
  "type": "compare_release",
  "link": "https:\/\/app.tideways.io\/o\/demo\/shopware\/events",
  "organization": "demo",
  "application": "shopware",
  "date": "2017-04-10 07:11:00",
  "notification": {
    "release_name": "Test",
    "before_release": {
      "response_time": 1903,
      "requests": 2601,
      "error_rate": 0.12
    },
    "after_release": {
      "response_time": 1431,
      "requests": 3280,
      "error_rate": 0
    }
  }
}
Still need help? Email [email protected]