system-tests
system-tests copied to clipboard
Create OpenTelemetry Baggage API <> Baggage Propagation tests
trafficstars
Motivation
One use case we support is using the vendor-neutral OpenTelemetry API's to emit custom telemetry when the Datadog SDK is installed. This asserts the expected behaviors for updating propagated Baggage headers.
See APMAPI-1735
Changes
- Adds the following test classes in
test_baggage.py:- Test_Baggage_Headers_Api_Datadog (asserts the Datadog W3C Baggage APIs, where applicable)
- Test_Baggage_Headers_Api_OTel (asserts the OTel Baggage APIs, where applicable)
- Implements the new required endpoints
/otel_drop_in_baggage_api_oteland/otel_drop_in_baggage_api_datadog, which have the following behavior:- Accepts query params
url,baggage_set, andbaggage_remove - The endpoints use the corresponding API to do the following:
- Call Baggage.Remove for each item in the
baggage_removeparam, then - Call Baggage.Add for each item in the
baggage_setparam, then - Duplicate the
/make_distant_callendpoint logic to send a downstream HTTP request and return request/response information
- Call Baggage.Remove for each item in the
- Accepts query params
Workflow
- ⚠️ Create your PR as draft ⚠️
- Work on you PR until the CI passes
- Mark it as ready for review
- Test logic is modified? -> Get a review from RFC owner.
- Framework is modified, or non obvious usage of it -> get a review from R&P team
:rocket: Once your PR is reviewed and the CI green, you can merge it!
Reviewer checklist
- [ ] 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
- [ ] A docker base image is modified?
- [ ] the relevant
build-XXX-imagelabel is present
- [ ] the relevant
- [ ] A scenario is added (or removed)?
- [ ] Get a review from R&P team