Track transit occupancy data in Datadog with AnyHook GraphQL

See how often recent AtB transit reports include an occupancy status and how many reports the snapshot contains.

10 stepsOperations

Free to start, no card required.

How it works

  1. When this happens

    AtB sends updates through Entur

    AnyHook GraphQL

  2. Step 1 · Code

    Check the live AtB feed signal

  3. Step 2

    Check for fresh published updates

    Follows the first path that matches

    • Recent AtB report observed

      1. Step 3 · Storage

        Look up the quarter-hour sample

      2. Step 4

        Check for an unmeasured interval

        Follows the first path that matches

        • Interval awaiting a sample

          1. Step 5 · HTTP

            Read the public occupancy snapshot

          2. Step 6 · Code

            Measure coverage of occupancy data

          3. Step 7 · Datadog

            Submit the aggregate Datadog gauges

          4. Step 8 · Code

            Check acceptance of the gauges

          5. Step 9 · Storage

            Record the measured interval

        • Otherwise

          Nothing happens

    • Otherwise

      Nothing happens

Before you start

Connect your AnyHook GraphQL server and enter your Entur client name in the subscription headers and the snapshot check. Connect a Datadog key that can submit metrics to your site. Each quarter-hour with live updates, the flow measures published AtB records from the last ten minutes.

Accounts to connect

See all 419 in Operations

Your first automationstarts with one sentence.

Start free with 1,000 credits, no card needed. Rather have it done for you? Our team builds it.

Use template