Last updated

Configure Respect Monitoring

You can configure Reunite to monitor the performance of your APIs using Arazzo Descriptions. The output of each workflow is displayed as a chart on the Respect Monitoring page in Reunite, providing metrics for your APIs performance.

Before you begin

Make sure you have the following:

  • One or more Arazzo Descriptions that reference OpenAPI Descriptions in your project
  • A redocly.yaml configuration file at the root of your project

Configure Respect Monitoring in redocly.yaml

To configure Respect Monitoring for your project:

  1. In the redocly.yaml file at the root of your project, add a reunite option.
  2. Inside reunite, add a jobs object.
  3. Add a path option with the value of the file path for each Arazzo Description in your project, as in the following example:
    redocly.yaml
    reunite:
      jobs:
        - path: '/arazzo-jobs/core-api/api-health-check.yaml'
        - path: '/arazzo-jobs/storefront-api/api-tests.yaml'
  4. For each item under the jobs object, in line with the path option add:
    • An agent option with respect as its value, as in the following example:
    redocly.yaml
    reunite:
      jobs:
        - path: '/arazzo-jobs/core-api/api-health-check.yaml'
          agent: respect
        - path: '/arazzo-jobs/storefront-api/api-tests.yaml'
          agent: respect
    • A trigger object with the following options:
      • An event option with schedule as its value.
      • (Optional) An interval option with a specified period as its value. If you don't define an interval, the workflow runs every hour by default. As in the following example:
        redocly.yaml
        reunite:
          jobs:
            - path: '/arazzo-jobs/core-apis/api-health-check.yaml'
              agent: respect
              trigger:
                event: schedule
                interval: 7d
            - path: '/arazzo-jobs/storefront-apis/api-tests.yaml'
              agent: respect
              trigger:
                event: schedule
                interval: 30d
  5. (Optional) Add an inputs object with a map of key-value pairs from the Arazzo Description.
  6. (Optional) Add a servers object with a sourceDescriptionName option to override a target URL described in an OpenAPI Description.
  7. (Optional) Add a severity object with a check type (statusCodeCheck | successCriteriaCheck | schemaCheck | contentTypeCheck) to severity level (error | warn | off) mapping, to override the severity level of the check. The default severity level is error.

View Respect Monitoring preview results

After you complete your configuration, commit your changes, and open a pull request, you can see your Respect Monitoring results on the pull request's checks. Respect Monitoring workflows only run once for preview builds.

To view your Respect Monitoring results on a preview build:

  1. Navigate to the Pull requests page in Reunite.
  2. Click the pull request with your Respect Monitoring configuration.
  3. Scroll to the bottom of the page and click the arrow to open the list of checks.
  4. Click the Details link next to Respect Monitoring.
  5. Click the workflow.
Screenshot of pull request checks with Respect Monitoring check

View Respect Monitoring result chart

When you merge your pull request with your Respect Monitoring configuration and deploy a production build, Reunite's Respect Monitoring page displays the results of each workflow in a chart.

To view your Respect Monitoring results on a production build, navigate to Respect Monitoring and click the workflow. You can filter the results by dates and status.

Respect Monitoring chartRespect Monitoring chart

Examples

The following example defines monitoring for two Arazzo Descriptions, the api-health-check.yaml description, running every seven days, and the api-tests.yaml description, running every 30 days:

redocly.yaml
reunite:
  jobs:
    - path: '/arazzo-jobs/core-apis/api-health-check.yaml'
      agent: respect
      trigger:
        event: schedule
        interval: 1w
      inputs:
        reportType: summary
        email: 'report@example.com'
    - path: '/arazzo-jobs/storefront-apis/api-tests.yaml'
      agent: respect
      trigger:
        event: schedule
        interval: 30d
      inputs:
        cleanupType: full

Job with secret value inputs

The following example adds a configuration containing inputs with secret values by adding a custom environment variable:

redocly.yaml
reunite:
  jobs:
    - path: '/arazzo-jobs/api-maintenance.yaml'
      agent: respect
      trigger:
        event: schedule
        interval: 1m
      inputs:
        apiKey: '{{ process.env.API_MAINTENANCE_KEY }}'

Job with server overrides

The following example adds server overrides to an Arazzo Description:

reunite:
  jobs:
    - path: '/arazzo-jobs/api-status.yaml'
      agent: respect
      trigger:
        event: schedule
        interval: 1m
      servers:
        sourceDescriptionName: 'https://server1.com'

Job with severity level overrides

The following example adds severity level overrides to an Arazzo Description:

reunite:
  jobs:
    - path: '/arazzo-jobs/api-status.yaml'
      agent: respect
      trigger:
        event: schedule
        interval: 1m
      severity:
        statusCodeCheck: off
        successCriteriaCheck: warn
        schemaCheck: warn
        contentTypeCheck: error

Resources

  • Learn about the Respect Monitoring configuration options in the reunite reference documentation.