Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Scrape and verify metrics at the end of e2e tests #6330

Merged
merged 63 commits into from
Jan 16, 2025

Conversation

chahatsagarmain
Copy link
Contributor

@chahatsagarmain chahatsagarmain commented Dec 9, 2024

Which problem is this PR solving?

Description of the changes

  • scrape script and usage in cit workflow
  • diff calculating script
  • cache save and restore from main workflow runs
  • A sample diff (txt)
--- 
+++ 
@@ -303,2 +303,2 @@
-rpc_server_requests_per_rpc{le="+Inf",rpc_grpc_status_code="0",rpc_method="Export",rpc_service="opentelemetry.proto.collector.trace.v1.TestService",rpc_system="grpc",service_name="jaeger",service_version=""}
-rpc_server_requests_per_rpc{le="0",rpc_grpc_status_code="0",rpc_method="Export",rpc_service="opentelemetry.proto.collector.trace.v1.TraceService",rpc_system="grpc",service_name="jaeger",service_version=""}
+rpc_server_requests_per_rpc{le="+Inf",rpc_grpc_status_code="0",rpc_method="Export",rpc_service="opentelemetry.proto.collector.trace.v1.TraceService",rpc_system="grpc",service_name="jaeger",service_version=""}
+rpc_server_requests_per_rpc{le="0",rpc_grpc_status_code="1",rpc_method="Export",rpc_service="opentelemetry.proto.collector.trace.v1.TraceService",rpc_system="grpc",service_name="jaeger",service_version=""}

@@ -321 +321 @@
-rpc_server_response_size{le="+Inf",rpc_method="Export",rpc_service="opentelemetry.proto.collector.trace.v1.TraceService",rpc_system="grpc",service_name="jaeger",service_version=""}
+rpc_server_response_size{le="+Inf",rpc_service="opentelemetry.proto.collector.trace.v1.TraceService",rpc_system="grpc",service_name="jaeger",service_version="",test_change="Export"}

@@ -338 +338 @@
-rpc_server_response_size{rpc_method="Export",rpc_service="opentelemetry.proto.collector.trace.v1.TraceService",rpc_system="grpc",service_name="jaeger",service_version=""}
+rpc_server_response_size{rpc_method="Export",rpc_service="opentelemetry.proto.collector.trace.v1.TraceService",rpc_system="grpc",service_name="test-jaeger",service_version=""}

How was this change tested?

Checklist

Signed-off-by: chahatsagarmain <[email protected]>
@chahatsagarmain chahatsagarmain requested a review from a team as a code owner December 9, 2024 15:46
Copy link

codecov bot commented Dec 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.21%. Comparing base (2ee8e4c) to head (9d232bb).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6330      +/-   ##
==========================================
- Coverage   96.26%   96.21%   -0.06%     
==========================================
  Files         372      372              
  Lines       21371    21371              
==========================================
- Hits        20573    20562      -11     
- Misses        608      616       +8     
- Partials      190      193       +3     
Flag Coverage Δ
badger_v1 10.65% <ø> (ø)
badger_v2 2.78% <ø> (ø)
cassandra-4.x-v1-manual 16.55% <ø> (ø)
cassandra-4.x-v2-auto 2.71% <ø> (ø)
cassandra-4.x-v2-manual 2.71% <ø> (ø)
cassandra-5.x-v1-manual 16.55% <ø> (ø)
cassandra-5.x-v2-auto 2.71% <ø> (ø)
cassandra-5.x-v2-manual 2.71% <ø> (ø)
elasticsearch-6.x-v1 20.33% <ø> (-0.01%) ⬇️
elasticsearch-7.x-v1 20.40% <ø> (ø)
elasticsearch-8.x-v1 20.57% <ø> (+<0.01%) ⬆️
elasticsearch-8.x-v2 2.77% <ø> (ø)
grpc_v1 12.17% <ø> (+<0.01%) ⬆️
grpc_v2 9.04% <ø> (ø)
kafka-3.x-v1 10.33% <ø> (ø)
kafka-3.x-v2 2.78% <ø> (ø)
memory_v2 2.78% <ø> (ø)
opensearch-1.x-v1 20.46% <ø> (ø)
opensearch-2.x-v1 20.45% <ø> (-0.01%) ⬇️
opensearch-2.x-v2 2.77% <ø> (-0.01%) ⬇️
tailsampling-processor 0.51% <ø> (ø)
unittests 95.09% <ø> (-0.06%) ⬇️

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.

Signed-off-by: chahatsagarmain <[email protected]>
Signed-off-by: chahatsagarmain <[email protected]>
@chahatsagarmain chahatsagarmain marked this pull request as draft December 9, 2024 16:25
@chahatsagarmain chahatsagarmain changed the title [CI] Scrape metrics at the end of e2e test [CI][WIP] Scrape metrics at the end of e2e test Dec 9, 2024
Signed-off-by: chahatsagarmain <[email protected]>
Signed-off-by: chahatsagarmain <[email protected]>
Signed-off-by: chahatsagarmain <[email protected]>
@chahatsagarmain chahatsagarmain marked this pull request as ready for review December 14, 2024 00:00
cmd/jaeger/internal/integration/e2e_integration.go Outdated Show resolved Hide resolved
.github/workflows/ci-e2e-all.yml Outdated Show resolved Hide resolved
scripts/es-integration-test.sh Outdated Show resolved Hide resolved
.github/workflows/ci-e2e-cassandra.yml Outdated Show resolved Hide resolved
.github/workflows/ci-e2e-cassandra.yml Show resolved Hide resolved
.github/workflows/ci-e2e-cassandra.yml Outdated Show resolved Hide resolved
.github/workflows/ci-e2e-all.yml Show resolved Hide resolved
Signed-off-by: chahatsagarmain <[email protected]>
Signed-off-by: chahatsagarmain <[email protected]>
.gitignore Outdated Show resolved Hide resolved
chahatsagarmain and others added 4 commits December 29, 2024 01:48
Signed-off-by: chahatsagarmain <[email protected]>
Signed-off-by: chahatsagarmain <[email protected]>
Signed-off-by: chahatsagarmain <[email protected]>
.github/actions/verify-metrics-snapshot/action.yaml Outdated Show resolved Hide resolved
.github/actions/verify-metrics-snapshot/action.yaml Outdated Show resolved Hide resolved
if: github.ref_name == 'main'
shell: bash
run: |
mv ./.metrics/${{ inputs.snapshot }} ./.metrics/release_${{ inputs.snapshot}}
Copy link
Member

Choose a reason for hiding this comment

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

We changed the meaning of this cache items, it's no longer "release" snapshot. We can call it baseline_*

.github/actions/verify-metrics-snapshot/action.yaml Outdated Show resolved Hide resolved
.github/actions/verify-metrics-snapshot/action.yaml Outdated Show resolved Hide resolved
.github/actions/verify-metrics-snapshot/action.yaml Outdated Show resolved Hide resolved
.github/workflows/ci-e2e-badger.yaml Outdated Show resolved Hide resolved
Signed-off-by: chahatsagarmain <[email protected]>
Signed-off-by: chahatsagarmain <[email protected]>
Signed-off-by: chahatsagarmain <[email protected]>
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

any idea why the log mentions the name twice?

Cache not found for input keys: badger-metrics-v2.txt, badger-metrics-v2.txt

@chahatsagarmain
Copy link
Contributor Author

@yurishkuro I guess its the exact key that needs to be matched followed by restore key .

Signed-off-by: chahatsagarmain <[email protected]>
Signed-off-by: chahatsagarmain <[email protected]>
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

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

lgtm, final cleanup

Comment on lines 15 to 17
cache_key:
description: 'Cache key used for uploading and fetching the correct cached metric'
required: true
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
cache_key:
description: 'Cache key used for uploading and fetching the correct cached metric'
required: true

.github/actions/verify-metrics-snapshot/action.yaml Outdated Show resolved Hide resolved
.github/actions/verify-metrics-snapshot/action.yaml Outdated Show resolved Hide resolved
.github/actions/verify-metrics-snapshot/action.yaml Outdated Show resolved Hide resolved
.github/workflows/ci-e2e-badger.yaml Outdated Show resolved Hide resolved
Signed-off-by: chahatsagarmain <[email protected]>
@yurishkuro yurishkuro changed the title [CI][WIP] Scrape metrics at the end of e2e test [ci] Scrape and verify metrics at the end of e2e tests Jan 16, 2025
@yurishkuro yurishkuro enabled auto-merge (squash) January 16, 2025 18:26
@yurishkuro yurishkuro merged commit 75b78cd into jaegertracing:main Jan 16, 2025
55 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:ci Change related to continuous integration / testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants