Skip to content

Better bit assertions in integration tests for 02,03 traceflags#767

Merged
tammy-baylis-swi merged 3 commits into
mainfrom
update-traceflags-integration-tests
May 5, 2026
Merged

Better bit assertions in integration tests for 02,03 traceflags#767
tammy-baylis-swi merged 3 commits into
mainfrom
update-traceflags-integration-tests

Conversation

@tammy-baylis-swi
Copy link
Copy Markdown
Contributor

@tammy-baylis-swi tammy-baylis-swi commented May 4, 2026

Updates integration tests to also assert bits for sampled/not-sampled whether trace flags are 00,01,02,03. Provides evidence that those flags are already valid for existing APM Python custom sampling and propagation logic.

See ticket for more background information.

Copilot AI review requested due to automatic review settings May 4, 2026 19:44
@tammy-baylis-swi tammy-baylis-swi requested review from a team as code owners May 4, 2026 19:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates integration tests around traceparent trace-flags handling in the SolarWinds APM propagation test suite, aiming to validate sampled/not-sampled semantics via bit checks instead of hard-coded 00/01 values.

Changes:

  • Added shared helper assertions in the integration test base class for validating trace-flags format and sampled-bit semantics.
  • Replaced several exact trace_flags == "00"/"01" assertions with sampled/not-sampled helper checks.
  • Relaxed some continuation-path tests in scenarios 4 and 8 from exact trace-flags equality to sampled-bit-only comparisons.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
tests/integration/test_base_sw_headers_attrs.py Added reusable trace-flags assertion helpers for integration tests.
tests/integration/test_xtraceoptions_validation.py Switched trace-flags assertion to shared sampled helper.
tests/integration/test_unsigned_tt.py Replaced hard-coded sampled/not-sampled checks with helper-based assertions.
tests/integration/test_signed_tt.py Replaced hard-coded sampled/not-sampled checks with helper-based assertions.
tests/integration/test_scenario_8.py Relaxed continued-trace assertions to validate sampled bit instead of exact flags; also removed duplicate import.
tests/integration/test_scenario_4.py Relaxed continued-trace assertions to validate sampled bit instead of exact flags.
tests/integration/test_scenario_1.py Replaced exact sampled-flag assertion with shared helper.

Comment thread tests/integration/test_scenario_4.py
Comment thread tests/integration/test_scenario_4.py
Comment thread tests/integration/test_scenario_8.py
Comment thread tests/integration/test_scenario_8.py
Comment thread tests/integration/test_scenario_8.py
Comment thread tests/integration/test_scenario_8.py
Comment thread tests/integration/test_base_sw_headers_attrs.py Outdated
tammy-baylis-swi and others added 2 commits May 4, 2026 12:56
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

@cheempz cheempz left a comment

Choose a reason for hiding this comment

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

LGTM

@tammy-baylis-swi tammy-baylis-swi merged commit ff82b36 into main May 5, 2026
64 of 106 checks passed
@tammy-baylis-swi tammy-baylis-swi deleted the update-traceflags-integration-tests branch May 5, 2026 23:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants