system-tests icon indicating copy to clipboard operation
system-tests copied to clipboard

Extend test coverage for dynamic sampling rules

Open ida613 opened this issue 9 months ago • 0 comments

Extend system test coverage for dynamic config sampling rules

Case V - Remote Sampling Rules are Reported through Telemetry as configuration change

Note: tags support is not needed in public beta product (Q2’2024 OKR) Setup: Remote sampling rules (set through remote sampling rules): [{"service": "svc*", "resource": "abc", "name":"op-??", "tags":[{"key":"tag-a","value_glob":"ta-v"}, {"key":"tag-b","value_glob":"tb-v?"}, {"key":"tag-c","value_glob":"tc-v"}], "sample_rate": 0.5,"provenance":"dynamic"}] Test Result: Telemetry reported for key “trace_sample_rules” with value (string) [{"service":"svc*", "name:":"op-??", "resource":"abc","sample_rate":0.5, "tags":{"tag-a":"tv-a","tag-b":"tb-v?"},"provenance":"dynamic"}] For languages that have not implemented tags support: [{"service":"svc*", "name:":"op-??", "resource":"*abc","sample_rate":0.5, provenance":"dynamic"}]

Setup: Empty remote config sampling rules Test Result: Telemetry reported for key “trace_sample_rules” with value (string) []

Case VI - Remote Sampling Rules retention

Purpose: For N consecutive Remote Sampling Rules received, only the latest should be applied. This test will ensure there are no residual rules from older rules. Setup: Two sets of rules that do not overlap is needed. Test:

  1. Send a batch of Remote sampling rules (A).
  2. Verify they are received.
  3. Send another batch of remote sampling rules (B) that does not overlap with the old one.
  4. Verify rules from A are not considered anyone and rules B are received.

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes (if something not related to your task is failing, you can ignore it)
  3. Mark it as ready for review
    • Test logic is modified? -> Get a review from RFC owner. We're working on refining the codeowners file quickly.
    • Framework is modified, or non obvious usage of it -> get a review from R&P team

:rocket: Once your PR is reviewed, you can merge it!

🛟 #apm-shared-testing 🛟

Reviewer checklist

  • [ ] Relevant label (run-parametric-scenario, run-profiling-scenario...) are presents
  • [ ] If PR title starts with [<language>], double-check that only <language> is impacted by the change
  • [ ] No system-tests internal is modified. Otherwise, I have the approval from R&P team
  • [ ] CI is green, or failing jobs are not related to this change (and you are 100% sure about this statement)
  • [ ] A docker base image is modified?
    • [ ] the relevant build-XXX-image label is present
  • [ ] A scenario is added (or removed)?

ida613 avatar May 23 '24 01:05 ida613