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

Create OpenTelemetry Baggage API <> Baggage Propagation tests

Open zacharycmontoya opened this issue 1 week ago • 1 comments
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_otel and /otel_drop_in_baggage_api_datadog, which have the following behavior:
    • Accepts query params url, baggage_set, and baggage_remove
    • The endpoints use the corresponding API to do the following:
      • Call Baggage.Remove for each item in the baggage_remove param, then
      • Call Baggage.Add for each item in the baggage_set param, then
      • Duplicate the /make_distant_call endpoint logic to send a downstream HTTP request and return request/response information

Workflow

  1. ⚠️ Create your PR as draft ⚠️
  2. Work on you PR until the CI passes
  3. 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!

🛟 #apm-shared-testing 🛟

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-image label is present
  • [ ] A scenario is added (or removed)?

zacharycmontoya avatar Nov 07 '25 23:11 zacharycmontoya