Skip to content

feat(ci): add metrics snapshot to SPM E2E workflow#8192

Open
hharshhsaini wants to merge 2 commits intojaegertracing:mainfrom
hharshhsaini:feat/metrics-snapshot-spm
Open

feat(ci): add metrics snapshot to SPM E2E workflow#8192
hharshhsaini wants to merge 2 commits intojaegertracing:mainfrom
hharshhsaini:feat/metrics-snapshot-spm

Conversation

@hharshhsaini
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

  • Add a scrape_metrics() function to scripts/e2e/spm.sh that
    curls the Jaeger metrics endpoint (http://localhost:8888/metrics)
    after the SPM test assertions pass and saves the output to
    .metrics/metrics_snapshot_spm_${METRICSTORE}.txt
  • The snapshot name embeds the metricstore name (prometheus,
    elasticsearch, opensearch) so each matrix variant produces
    a distinct, non-conflicting file
  • Add verify-metrics-snapshot action step to ci-e2e-spm.yml
    for each matrix variant using the matching snapshot/artifact key
  • Unlike the storage E2E tests, SPM runs Jaeger via docker-compose
    and does not use e2e_integration.go, so the scraping is done
    explicitly in the shell script

How was this change tested?

  • Verified that the SPM docker-compose setup starts Jaeger on the
    standard metrics port 8888 (same as all other E2E setups)
  • Confirmed the script pattern matches how other standalone tests
    handle metrics (curl to :8888/metrics, save to .metrics/)
  • The scrape_metrics() is called after check_spm() succeeds
    and is non-fatal (warns but does not fail) if the endpoint is
    temporarily unavailable

Checklist

AI Usage in this PR (choose one)

See AI Usage Policy.

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

@hharshhsaini hharshhsaini requested a review from a team as a code owner March 18, 2026 01:25
Copilot AI review requested due to automatic review settings March 18, 2026 01:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR extends the SPM end-to-end CI workflow to capture and verify a Jaeger Prometheus metrics snapshot after SPM assertions succeed, enabling metrics-diff gating similar to other E2E suites.

Changes:

  • Add scrape_metrics() to scripts/e2e/spm.sh to curl http://localhost:8888/metrics and write a per-metricstore snapshot under .metrics/.
  • Invoke scrape_metrics() after check_spm completes successfully.
  • Add a verify-metrics-snapshot step to the SPM GitHub Actions workflow for each metricstore matrix variant.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
scripts/e2e/spm.sh Adds metrics scraping and writes a snapshot file keyed by metricstore.
.github/workflows/ci-e2e-spm.yml Uploads/verifies the new SPM metrics snapshots via the shared composite action.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@dosubot dosubot bot added the enhancement label Mar 18, 2026
@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.61%. Comparing base (c8561a4) to head (3197145).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8192      +/-   ##
==========================================
- Coverage   95.62%   95.61%   -0.02%     
==========================================
  Files         318      318              
  Lines       16771    16771              
==========================================
- Hits        16038    16036       -2     
- Misses        578      579       +1     
- Partials      155      156       +1     
Flag Coverage Δ
badger_v1 9.05% <ø> (ø)
badger_v2 1.04% <ø> (ø)
cassandra-4.x-v1-manual 13.25% <ø> (ø)
cassandra-4.x-v2-auto 1.03% <ø> (ø)
cassandra-4.x-v2-manual 1.03% <ø> (ø)
cassandra-5.x-v1-manual 13.25% <ø> (ø)
cassandra-5.x-v2-auto 1.03% <ø> (ø)
cassandra-5.x-v2-manual 1.03% <ø> (ø)
clickhouse 1.16% <ø> (ø)
elasticsearch-6.x-v1 16.83% <ø> (ø)
elasticsearch-7.x-v1 16.86% <ø> (ø)
elasticsearch-8.x-v1 17.01% <ø> (ø)
elasticsearch-8.x-v2 1.04% <ø> (ø)
elasticsearch-9.x-v2 1.04% <ø> (ø)
grpc_v1 7.79% <ø> (ø)
grpc_v2 1.04% <ø> (ø)
kafka-3.x-v2 1.04% <ø> (ø)
memory_v2 1.04% <ø> (ø)
opensearch-1.x-v1 16.91% <ø> (ø)
opensearch-2.x-v1 16.91% <ø> (ø)
opensearch-2.x-v2 1.04% <ø> (ø)
opensearch-3.x-v2 1.04% <ø> (ø)
query 1.04% <ø> (ø)
tailsampling-processor 0.52% <ø> (ø)
unittests 94.30% <ø> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hharshhsaini hharshhsaini force-pushed the feat/metrics-snapshot-spm branch from ec1120e to a183e62 Compare March 18, 2026 12:35
Copilot AI review requested due to automatic review settings March 18, 2026 17:07
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds metrics snapshot collection to the SPM E2E workflow so CI can upload and diff Jaeger’s /metrics output per metricstore variant, aligning SPM with the other E2E suites’ metrics regression checks.

Changes:

  • Add scrape_metrics() to scripts/e2e/spm.sh to fetch http://localhost:8888/metrics and write a per-metricstore snapshot into ./.metrics/.
  • Invoke metrics scraping after SPM assertions pass.
  • Add the verify-metrics-snapshot composite action step to the SPM GitHub Actions workflow, keyed per matrix variant.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
scripts/e2e/spm.sh Scrapes and stores a metrics snapshot after SPM validations complete.
.github/workflows/ci-e2e-spm.yml Uploads/verifies the snapshot artifact per metricstore matrix entry.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Add metrics scraping to the SPM (Service Performance Monitoring)
integration test. Unlike storage E2E tests, SPM runs Jaeger via
docker-compose and does not use e2e_integration.go, so a
scrape_metrics() function is added to scripts/e2e/spm.sh that
curls the Jaeger metrics endpoint (http://localhost:8888/metrics)
after the test assertions pass and saves the result to
.metrics/metrics_snapshot_spm_${METRICSTORE}.txt.

The snapshot name embeds the metricstore (prometheus, elasticsearch,
opensearch) so each matrix variant produces a distinct file, and
verify-metrics-snapshot is wired up in ci-e2e-spm.yml accordingly.

Part of jaegertracing#6278.

Signed-off-by: hharshhsaini <sainiharsh3311@gmail.com>
@hharshhsaini hharshhsaini force-pushed the feat/metrics-snapshot-spm branch from 836b2dd to 496887a Compare March 18, 2026 17:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants