system-tests
system-tests copied to clipboard
Extend test coverage for dynamic sampling rules
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:
- Send a batch of Remote sampling rules (A).
- Verify they are received.
- Send another batch of remote sampling rules (B) that does not overlap with the old one.
- Verify rules from A are not considered anyone and rules B are received.
Workflow
- ⚠️ Create your PR as draft ⚠️
- Work on you PR until the CI passes (if something not related to your task is failing, you can ignore it)
- 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
- Test logic is modified? -> Get a review from RFC owner. We're working on refining the
:rocket: Once your PR is reviewed, you can merge it!
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
- [ ] the relevant
- [ ] A scenario is added (or removed)?
- [ ] Get a review from R&P team