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. 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.

The payload when the webhook gets sent for a response time or failure rate failure is:

{
  "type": "response_time",
  "link": "https:\/\/app.tideways.io\/o\/demo\/shopware\/alerts\/incident\/1508569935",
  "organization": "demo",
  "application": "shopware",
  "date": "2017-10-21 07:12",
  "notification": {
    "incidient_id": 1508569935,
    "status": "opened",
    "value": 1234,
    "critical_threshold": 1000
  }
}

To send the weekly report to a webhook, select your webhook in the weekly report notifications. In json, it could look like this:

{
  "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
    }
  }
}

You can also send new and compare release notifications to your webhook. Here is an example of a new release notification:

{
  "type": "new_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"
  }
}

And the same with the compare release notification:

{
  "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
    }
  }
}

Webhooks for new exceptions have the following payload:

{
  "type": "compare_release",
  "link": "https:\/\/app.tideways.io\/o\/demo\/shopware\/events",
  "organization": "demo",
  "application": "shopware",
  "date": "2017-04-10 07:11:00",
  "notification": {
    "error_group": {
      "context": {
        "query": "",
        "sapi": "cli"
      },
      "environments": [
        "production"
      ],
      "exceptionType": "PhpAllowedMemorySizeReachedError",
      "firstOccured": "2017-07-17 12:28:52",
      "id": "1-cff6f577ede14445c911c558e3d07b68",
      "lastMessage": "Allowed memory size of 134217728 bytes exhausted (tried to allocate 32768 bytes)",
      "lastOccured": "2017-12-06 22:05:09",
      "lastStackTrace": [],
      "occurances": 8,
      "occurancesSinceLastRelease": 8,
      "source": "php:memory",
      "status": "open",
      "transactions": [
        "web_profiler.controller.profiler:panelAction"
      ],
      "type": "PhpAllowedMemorySizeReachedError"
    }
  }
}
Still need help? Email [email protected]