Inter-region latency statistics plugin for az-scout
Project description
az-scout-plugin-latency-stats
az-scout plugin for inter-region and inter-zone (Availability Zone) latency statistics.
Features
- Latency dataset — static latency matrix based on Microsoft published statistics
- Cloud63 dataset support — optional inter-region crowd-sourced measurements via
mode="cloud63" - Inter-zone dataset support — benchmark-based AZ latency matrix from Cloud63 benchmark API
- API endpoints — inter-region and inter-zone endpoints for matrix and available regions
- MCP tools —
inter_region_latency(...)for inter-region RTT andinter_zone_latency(...)for inter-zone P50 RTT latency in µs - UI tab — interactive D3.js views with inter-region/inter-zone scope switch, map/table synchronization, and bidirectional hover highlighting
- URL hash routing —
#latency-statsselects the plugin tab
Setup
uv pip install az-scout-plugin-latency-stats
az-scout # plugin is auto-discovered
For development:
git clone https://github.com/az-scout/az-scout-plugin-latency-stats
cd az-scout-plugin-latency-stats
uv sync --group dev
uv pip install -e .
az-scout # plugin is auto-discovered
Structure
az-scout-plugin-latency-stats/
├── .github/
│ ├── copilot-instructions.md # Copilot context for this plugin
│ └── workflows/
│ ├── ci.yml # CI pipeline (lint + test, Python 3.11–3.13)
│ └── publish.yml # Publish to PyPI on version tags
├── pyproject.toml
├── README.md
└── src/
└── az_scout_latency_stats/
├── __init__.py # Plugin class + module-level `plugin` instance
├── cloud63.py # Cloud63 data fetch/cache + inter-region matrix API
├── inter_zone.py # Inter-zone benchmark fetch/cache + AZ matrix API
├── latency.py # Static latency dataset + public API
├── metadata.py # Shared source/disclaimer/methodology constants
├── routes.py # FastAPI APIRouter (optional)
├── tools.py # MCP tool functions (optional)
└── static/
├── css/
│ └── latency.css # Plugin styles (auto-loaded via css_entry)
├── data/
│ └── region-coordinates.json
├── html/
│ └── latency-tab.html # HTML fragment (fetched by JS at runtime)
└── js/
├── latency-tab.js # Main tab bootstrap + inter-region UI logic
└── latency-tab-interzone.js # Inter-zone graph/table rendering + sync
How it works
- The plugin loads the HTML fragment into
#plugin-tab-latency-stats. - The user selects a scope:
- Inter-region: select regions and choose source mode (
azuredocsorcloud63). - Inter-zone (AZ): uses the main app region selector (
#region-select).
- Inter-region: select regions and choose source mode (
- Inter-region calls
POST /plugins/latency-stats/inter-region/matrixand renders world map + matrix table. - Inter-zone calls
POST /plugins/latency-stats/inter-zone/matrixand renders AZ graph + pair table. - Hover interactions are synchronized between graph links and table values in both directions.
API
# Pairwise matrix
curl -X POST http://localhost:8080/plugins/latency-stats/inter-region/matrix \
-H "Content-Type: application/json" \
-d '{"regions": ["francecentral", "westeurope", "eastus"], "mode": "azuredocs"}'
# All known pairs
curl http://localhost:8080/plugins/latency-stats/inter-region/pairs
# Cloud63 available regions
curl http://localhost:8080/plugins/latency-stats/inter-region/cloud63-regions
# Inter-zone available regions
curl http://localhost:8080/plugins/latency-stats/inter-zone/regions
# Inter-zone AZ matrix
curl -X POST http://localhost:8080/plugins/latency-stats/inter-zone/matrix \
-H "Content-Type: application/json" \
-d '{"region": "westeurope"}'
MCP tool
inter_region_latency(source_region="francecentral", target_region="westeurope")
inter_region_latency(source_region="francecentral", target_region="westeurope", mode="cloud63")
inter_zone_latency(region="westeurope", source_zone="az1", target_zone="az2")
Quality checks
uv run ruff check src/ tests/
uv run ruff format --check src/ tests/
uv run mypy src/
uv run pytest
Copilot support
The .github/copilot-instructions.md file provides context to GitHub Copilot about
the plugin structure, conventions, and az-scout plugin API.
Data sources
- Azure Docs (inter-region): Azure Network Latency
- Cloud63 (inter-region optional mode): Azure Latency Test
- Cloud63 benchmark API (inter-zone AZ):
https://fa-azure-network-benchmark.azurewebsites.net/api/data
Inter-zone outputs are exposed in microseconds (latencyUsP50). Always validate with in-tenant measurements.
License
Disclaimer
This tool is not affiliated with Microsoft. All capacity, pricing, and availability information is indicative and not a guarantee of deployment success. Values are dynamic and may change between planning and actual deployment. Always validate in official Microsoft sources and in your target tenant/subscription.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file az_scout_plugin_latency_stats-2026.3.7.tar.gz.
File metadata
- Download URL: az_scout_plugin_latency_stats-2026.3.7.tar.gz
- Upload date:
- Size: 150.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a53acf0951daf2c7bb31da9a2d4efb3d28f55fcd17a0340d1824bf106d8a934
|
|
| MD5 |
be70ee30f46c76793bcdc6093506dc4a
|
|
| BLAKE2b-256 |
2e666f42a71265c33d8a8fe4eb7d6a7a1ca713c6c5cad32f76c79c29b6dedb3b
|
Provenance
The following attestation bundles were made for az_scout_plugin_latency_stats-2026.3.7.tar.gz:
Publisher:
publish.yml on az-scout/az-scout-plugin-latency-stats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
az_scout_plugin_latency_stats-2026.3.7.tar.gz -
Subject digest:
4a53acf0951daf2c7bb31da9a2d4efb3d28f55fcd17a0340d1824bf106d8a934 - Sigstore transparency entry: 1191100968
- Sigstore integration time:
-
Permalink:
az-scout/az-scout-plugin-latency-stats@beef6ad9da4e546c104abd343292d60ac578abfd -
Branch / Tag:
refs/tags/v2026.3.7 - Owner: https://github.com/az-scout
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@beef6ad9da4e546c104abd343292d60ac578abfd -
Trigger Event:
push
-
Statement type:
File details
Details for the file az_scout_plugin_latency_stats-2026.3.7-py3-none-any.whl.
File metadata
- Download URL: az_scout_plugin_latency_stats-2026.3.7-py3-none-any.whl
- Upload date:
- Size: 45.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b82eec4a6793389489b54692eaf04e7402d31d9297cc9b64caa006b6a7e4e42f
|
|
| MD5 |
6543cbbe694da993a21698d518532698
|
|
| BLAKE2b-256 |
87e2d1376d265edf185403b2ca73a2a8c724c6fc210929fb445308fe52ac99d1
|
Provenance
The following attestation bundles were made for az_scout_plugin_latency_stats-2026.3.7-py3-none-any.whl:
Publisher:
publish.yml on az-scout/az-scout-plugin-latency-stats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
az_scout_plugin_latency_stats-2026.3.7-py3-none-any.whl -
Subject digest:
b82eec4a6793389489b54692eaf04e7402d31d9297cc9b64caa006b6a7e4e42f - Sigstore transparency entry: 1191100969
- Sigstore integration time:
-
Permalink:
az-scout/az-scout-plugin-latency-stats@beef6ad9da4e546c104abd343292d60ac578abfd -
Branch / Tag:
refs/tags/v2026.3.7 - Owner: https://github.com/az-scout
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@beef6ad9da4e546c104abd343292d60ac578abfd -
Trigger Event:
push
-
Statement type: