Skip to content

feat(ci): add metrics snapshot to tailsampling E2E workflow#8190

Open
hharshhsaini wants to merge 1 commit intojaegertracing:mainfrom
hharshhsaini:feat/metrics-snapshot-tailsampling
Open

feat(ci): add metrics snapshot to tailsampling E2E workflow#8190
hharshhsaini wants to merge 1 commit intojaegertracing:mainfrom
hharshhsaini:feat/metrics-snapshot-tailsampling

Conversation

@hharshhsaini
Copy link
Contributor

Which problem is this PR solving?

Description of the changes

  • Add verify-metrics-snapshot action step to ci-e2e-tailsampling.yml
  • Update tailsampling_test.go to pass "tailsampling" as the storage
    label to e2eInitialize() instead of "memory", so the snapshot is
    written to .metrics/metrics_snapshot_tailsampling.txt with a unique
    name that does not conflict with the memory workflow's snapshot
  • The metrics scraping itself is already handled automatically by
    E2EStorageIntegration.scrapeMetrics() in e2e_integration.go the
    test just needed the correct label and the workflow step wiring

How was this change tested?

  • Verified that testTailSamplingProccessor uses e2eInitialize() from
    E2EStorageIntegration, which already calls scrapeMetrics() at cleanup
  • Confirmed the pattern matches existing workflows (badger, memory, grpc, etc.)
    that call verify-metrics-snapshot after the same test framework
  • gofmt passes on all modified Go files

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

Add verify-metrics-snapshot action step to ci-e2e-tailsampling.yml.
The tail sampling test uses E2EStorageIntegration.e2eInitialize(),
which automatically scrapes Jaeger metrics at test cleanup and writes
them to .metrics/metrics_snapshot_<storage>.txt.

Updated the storage label from "memory" to "tailsampling" so the
snapshot gets a unique name (metrics_snapshot_tailsampling.txt)
that does not conflict with the memory workflow's snapshot.

Part of jaegertracing#6278.

Signed-off-by: hharshhsaini <sainiharsh3311@gmail.com>
@hharshhsaini hharshhsaini requested a review from a team as a code owner March 18, 2026 00:45
Copilot AI review requested due to automatic review settings March 18, 2026 00:45
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 updates the tail sampling processor integration tests to capture and verify metrics snapshots. It makes two coordinated changes: updating the test to use "tailsampling" as the identifier for metrics snapshots, and adding the metrics snapshot verification step to the CI workflow.

Changes:

  • Changed the storage parameter in the tail sampling test from "memory" to "tailsampling" to provide a distinct metrics snapshot identifier for tail sampling tests
  • Added metrics snapshot verification step to the tail sampling CI workflow

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
cmd/jaeger/internal/integration/tailsampling_test.go Updated storage parameter to "tailsampling" for metrics snapshot naming
.github/workflows/ci-e2e-tailsampling.yml Added metrics snapshot verification step to match the test's metrics snapshot identifier

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

@codecov
Copy link

codecov bot commented Mar 18, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.66%. Comparing base (6275e86) to head (8886bc1).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8190      +/-   ##
==========================================
- Coverage   95.67%   95.66%   -0.02%     
==========================================
  Files         317      317              
  Lines       16750    16750              
==========================================
- Hits        16026    16024       -2     
- Misses        571      572       +1     
- Partials      153      154       +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.35% <ø> (-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.

@yurishkuro
Copy link
Member

why is this needed? what problem does it solve?

@github-actions github-actions bot added the waiting-for-author PR is waiting for author to respond to maintainer's comments label Mar 18, 2026
@hharshhsaini
Copy link
Contributor Author

why is this needed? what problem does it solve?

@yurishkuro This PR is part of #6278 which aims to collect metrics snapshots from all E2E integration test workflows for backwards compatibility tracking.

The tailsampling integration test already runs the full Jaeger v2 binary with the tail sampling processor active via E2EStorageIntegration.e2eInitialize(), so e2e_integration.go automatically scrapes the Jaeger metrics endpoint and writes them to .metrics/ but the workflow was never wired up to call verify-metrics-snapshot, meaning those artifacts were never uploaded or compared against the baseline.

The tail sampling processor registers its own metrics (e.g. processor_tail_sampling_*) that do not appear in any storage-backend tests (memory, badger, etc.), so a dedicated snapshot is important to catch backwards-incompatible changes to those metrics.

We also updated the storage label from "memory" to "tailsampling" to give the snapshot a distinct file name (metrics_snapshot_tailsampling.txt) instead of shadowing the memory workflow's snapshot.

@github-actions github-actions bot removed the waiting-for-author PR is waiting for author to respond to maintainer's comments label Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants