Skip to content

revenium/revenium-isotope-sandbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Revenium Isotope API Traffic Monitoring Sandbox

Introduction

Welcome to the Revenium Isotope API Traffic Monitoring Sandbox. This repository contains a Docker Compose stack designed to demonstrate the capabilities of the Isotope metering agent, an eBPF-based tool for transparent monitoring of HTTP API traffic. The stack comprises two main components:

  1. Flask REST API: This service hosts a simple REST API and launches the isotope agent, which monitors the API's traffic.
  2. Locust Load Generator: A tool for generating traffic to the REST API, simulating real-world API usage scenarios.

By using this sandbox, developers can generate traffic to the REST API, observe real-time analytics, and understand the efficiency of the Isotope agent in a controlled environment.

Prerequisites

Before you start, ensure you have the following installed:

Setup

  1. Clone this Repository:
    git clone https://github.com/hypercurrentio/revenium-isotope-sandbox

  2. Environment Variables:
    Create a file named .env in your working directory and set the REVENIUM_API_KEY environment variable using your Revenium platform API key. This key is essential for the Isotope agent to communicate with the Revenium platform.

    The contents of the .env file should appear as follows:

REVENIUM_API_KEY=enterKeyNameHere
  1. Build and Run the Stack:
    Navigate to the cloned repository directory and run:
    docker compose up

    This command builds and starts the Flask REST API and Locust Load Generator services.

Usage

  1. Generating Traffic:
    Once the stack is running, open a web browser and navigate to http://localhost:8089 to access the Locust interface.

    • Enter the desired number of users and spawn rate.
    • Click 'Start swarming' to begin generating traffic to the Flask REST API.
  2. Monitoring API Traffic:
    Log in to your Revenium platform dashboard and click on "API Analytics" in the left navigation menu to observe the analytics and insights generated by the Isotope agent from the traffic created by Locust.

  3. Monitoring Container Logs: Dozzle is running on port 7999 for you to observe the container logs.

Additional Notes

  • Customizing the Flask REST API:
    If you wish to modify the Flask REST API, you can do so by editing the Dockerfile or the application files and rebuilding the Docker image.

  • Isotope Agent:
    For detailed information on how the Isotope agent is integrated and configured, refer to the Dockerfile and entrypoint script of the rest_api service. Documentation for the Isotope agent is available at: https://docs.revenium.io/integrations/isotope-metering

  • Support:
    For any issues or queries, please raise an issue in this repository or contact Revenium support.

Thank you for using the Revenium Isotope API Traffic Monitoring Sandbox. API$ > APIs!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published