APM Cypress Testing + Prometheus#2629
Merged
TackAdam merged 39 commits intoopensearch-project:mainfrom Apr 7, 2026
Merged
Conversation
added 4 commits
March 26, 2026 12:00
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
Signed-off-by: Adam Tackett <tackadam@amazon.com>
ps48
reviewed
Apr 6, 2026
Comment on lines
+8
to
+9
| OPENSEARCH_VERSION: '3.6.0' | ||
| OPENSEARCH_PLUGIN_VERSION: '3.6.0.0-SNAPSHOT' |
Member
There was a problem hiding this comment.
can we pull the env version from package.json
Collaborator
Author
There was a problem hiding this comment.
Great suggestion
- name: Checkout OpenSearch Dashboards
uses: actions/checkout@v4
with:
repository: opensearch-project/Opensearch-Dashboards
ref: ${{ env.OPENSEARCH_DASHBOARDS_VERSION }}
path: OpenSearch-Dashboards
- name: Get OpenSearch and plugin versions from package.json
id: versions
run: |
VERSION=$(node -p "require('./OpenSearch-Dashboards/package.json').version")
echo "OPENSEARCH_VERSION=$VERSION" >> $GITHUB_ENV
echo "OPENSEARCH_PLUGIN_VERSION=${VERSION}.0-SNAPSHOT" >> $GITHUB_ENV
echo "OpenSearch version: $VERSION"
echo "Plugin version: ${VERSION}.0-SNAPSHOT"
- name: Checkout dashboards observability
uses: actions/checkout@v4
with:
path: OpenSearch-Dashboards/plugins/dashboards-observability
joshuali925
approved these changes
Apr 6, 2026
ps48
approved these changes
Apr 6, 2026
Signed-off-by: Adam Tackett <tackadam@amazon.com>
lezzago
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds comprehensive Cypress integration tests for the APM (Application Performance Monitoring) Services page, including full Prometheus metrics integration for testing RED metrics (Rate, Error, Duration) widgets.
OpenSearch Version Upgrade
Both CI workflows updated to use OpenSearch 3.6.0 (from 3.5.0):
integration-tests-workflow.ymlftr-e2e-dashboards-observability-test.ymlWhy: OpenSearch 3.6.0 includes a fix for the PromQL proxy that's required for the APM metrics queries to work correctly. opensearch-project/sql@054792c
Test Coverage
Infrastructure
How It Works
Data Flow
Timestamp Alignment
All data sources use the same reference point (current system time):
OpenSearch Data (traces/logs/services):
originalTime + (now - baseTime)Prometheus Metrics:
Query Window:
now - 1 daytonow + 1 dayNo coordination files or shared timestamps needed - everything naturally aligns to the system's current time.
Key Files
Local Testing
Prerequisites
Running Tests Locally
Option 1: Automated Script (Recommended)
What this does:
http://localhost:8080http://localhost:9090(scrapes metrics server every 5s)In a separate terminal, run the tests:
Cleanup:
Option 2: Manual Setup
Terminal 1 - Metrics Server:
cd OpenSearch-Dashboards/plugins/dashboards-observability node .cypress/utils/metrics_server.jsTerminal 2 - Prometheus:
cd OpenSearch-Dashboards/plugins/dashboards-observability prometheus \ --config.file=./.cypress/fixtures/prometheus/prometheus.yml \ --storage.tsdb.path=/tmp/prometheus-apm-local \ --web.listen-address=:9090Terminal 3 - Tests:
Verifying Setup
Check metrics server is serving data:
curl http://localhost:8080/metrics | head -20Expected output:
Check Prometheus is scraping:
Check Prometheus UI:
Open http://localhost:9090 in your browser and run queries like:
fault{remoteService=""}request{service="cart"}sum by (service) (fault) / sum by (service) (request) * 100CI Behavior
GitHub Actions Workflow
The
integration-tests-workflow.ymlhas been enhanced to automatically set up Prometheus when runningapm_testgroup:Setup Steps (when
matrix.testgroups == 'apm_test'):PROMETHEUS_CONNECTION_URLenvironment variableTime Investment:
Test Data
Services in Sample Data
The test data includes a realistic microservices application with:
frontend-proxy(C++ ingress)frontend(Node.js)cart(.NET)checkout(Go)product-reviews(Python)All services have fully correlated:
Data Size
Testing Checklist
.cypress/utils/start_local_prometheus.shAdditional Context
This testing infrastructure follows the standard Prometheus scraping pattern (similar to the parent OpenSearch Dashboards repository's approach) rather than using complex Remote Write or backfill mechanisms. This makes it:
curl http://localhost:8080/metrics)Issues Resolved
[List any issues this PR will resolve]
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.