Skip to content

Contains Full Source Code For The FlyFast Application

License

Notifications You must be signed in to change notification settings

riverbed/FlyFast

Repository files navigation

FlyFast

This cookbook contains the full source code for FlyFast, utilizing both the FlyFast-WebUI and FlyFast-FlightSearch to demonstrates how works OpenTelemetry with Riverbed APM.

diagram

Note

The FlyFast demo app is instrumented with OpenTelemetry configured to send the OpenTelemetry traces to the APM OpenTelemetry Collector, which in turns exports traces to the Riverbed APM backend (whether APM SaaS or APM Analysis Server). In the app, both the WebUI frontend and the FlighSearch API backend are instrumented: the frontend instrumentation uses an experimental OpenTelemetry for Javascript in the browser, and the FlightSearch API uses OpenTelemetry for Python.

Prerequisites

  1. an APM SaaS account, or an APM Analysis Server
  2. optional an account for Aternity UJI
  3. a Docker host, for example Docker Desktop
  4. git (Git)

Step 1. Get a local copy

git clone --recurse-submodules https://github.com/riverbed/FlyFast.git --depth 1

Step 2. Get your information for Riverbed APM

Open the APM web console and navigate to Agents > Install Agents (for example https://apm.myaccount.aternity.com)

  1. Grab the Analysis Server Host, for example agents.apm.myaccount.aternity.com
  2. Find your CustomerID, for example 12341234-12341234-13241234

Those information are required to activate the APM OpenTelemetry Collector with an APM account. The CustomerID is not required when it is not an APM SaaS.

Step 3. optional Get your information for Aternity UJI

*optional* See details for Aternity UJI
  1. Open Aternity UJI and navigate to Settings & Administration > Sites
  2. Find the site configured for FlyFast and get the UJI Tag Prefix, for example my-UJI-Tag-Prefix-FlyFast

Step 4. Start the containers

Start the containers using the compose.yaml, using the snipppet below and replacing the values with the information collected at step 2. and step 3.

For example in Bash:

cd FlyFast

# Configure the APM OpenTelemetry Collector
export RIVERBED_APM_SERVER_HOST="agents.apm.myaccount.aternity.com"
export RIVERBED_APM_CUSTOMER_ID="12341234-12341234-13241234"

# Start the containers
docker compose up

or in PowerShell:

cd FlyFast

# Configure the APM OpenTelemetry Collector
$env:RIVERBED_APM_SERVER_HOST="agents.apm.myaccount.aternity.com"
$env:RIVERBED_APM_CUSTOMER_ID="12341234-12341234-13241234"

# Start the containers
docker compose up
*optional* Add configuration for Aternity UJI

in Bash:

cd FlyFast

# Configure the APM OpenTelemetry Collector
export RIVERBED_APM_SERVER_HOST="agents.apm.myaccount.aternity.com"
export RIVERBED_APM_CUSTOMER_ID="12341234-12341234-13241234"

# Optional - Configure the Aternity UJI tag
# Replace "my-UJI-Tag-Prefix-FlyFast" with your UJI Tag Prefix collected at step 3.
export ALLUVIO_UJI_TAG='<script id=\"ALLUVIO-Aternity-UJI\" src=\"https:\/\/your-UJI-Tag-Prefix-FlyFast\.btttag\.com\/btt\.js\"><\/script>'

# Start the containers
docker compose up

or in PowerShell

cd FlyFast

# Configure the APM OpenTelemetry Collector
# Replace the value with your information collected at step 2.
$env:RIVERBED_APM_SERVER_HOST="agents.apm.myaccount.aternity.com"
$env:RIVERBED_APM_CUSTOMER_ID="12341234-12341234-13241234"

# Optional - Configure the Aternity UJI tag
# Replace "your-UJI-Tag-Prefix-FlyFast" with your UJI Tag Prefix collected at step 3.
$env:ALLUVIO_UJI_TAG='<script id=\"ALLUVIO-Aternity-UJI\" src=\"https:\/\/your-UJI-Tag-Prefix-FlyFast\.btttag\.com\/btt\.js\"><\/script>'

# Start the containers
docker compose up

Step 5. Navigate through The Application And Monitor

The web application should now be available on http://localhost.

Open the url in your browser and navigate through the application a few times to generate page views and transaction that will be monitored by APM.

Step 6. Open Riverbed APM web console

Go to the APM web console to monitor the instance and observe every transaction.

APM OpenTelemetry Traces

View details of a specific transaction as a waterfall chart:

APM OpenTelemetry Transaction-Detail

Notes

See Notes

Add Synthetic Test

In the Riverbed Community Toolkit, the cookbook Synthetic-004-Browse-FlyFast show how to set up a synthetic test for FlyFast on a Windows machine.

Stop The App and All The Containers

Press CTRL + C in the shell where it is running.

Or in a shell, go to the folder where you keep the compose.yaml and run:

docker compose stop

Rebuild

docker compose build --no-cache

Updating Based On Future Changes

Stay up to date with the latest changes.

git submodule update --remote

Clone FlyFast and update submodules

git clone https://github.com/riverbed/FlyFast.git
cd FlyFast
git submodule init
git submodule update

License

Copyright (c) 2022 - 2024 Riverbed Technology, Inc.

The contents provided here are licensed under the terms and conditions of the MIT License accompanying the software ("License"). The scripts are distributed "AS IS" as set forth in the License. The script also include certain third party code. All such third party code is also distributed "AS IS" and is licensed by the respective copyright holders under the applicable terms and conditions (including, without limitation, warranty and liability disclaimers) identified in the license notices accompanying the software.