Summary
Increase unit-test coverage for the Tracer package from the current ~10% to at least 90% line coverage.
Scope
Target package:
Related tests:
Goals
- Raise line coverage for
src/Tracer/** to >=90%.
- Cover core behavior and error paths, not just superficial execution.
- Keep tests stable across local and CI environments.
Required coverage areas
- tracer initialization/configuration flows
- span/trace lifecycle behavior
- context propagation and mutation paths
- exporter/adapter integration boundaries (mocked where appropriate)
- failure/exception paths and guard clauses
Test quality requirements
- Assert observable behavior and outputs.
- Avoid coverage-only tests with no contract validation.
- Include both success and failure scenarios.
- Minimize brittle internals-based assertions.
Acceptance criteria
- Coverage report shows >=90% line coverage for
src/Tracer/**.
- Tests pass locally and in CI.
- Validation passes:
vendor/bin/phpunit --coverage-clover coverage.xml
composer phpstan
composer cs:check
Notes
- If any file cannot reasonably hit 90%, document justification and proposed threshold in PR.
Summary
Increase unit-test coverage for the
Tracerpackage from the current ~10% to at least 90% line coverage.Scope
Target package:
src/Tracer/**Related tests:
tests/Unit/Tracer/**Goals
src/Tracer/**to >=90%.Required coverage areas
Test quality requirements
Acceptance criteria
src/Tracer/**.vendor/bin/phpunit --coverage-clover coverage.xmlcomposer phpstancomposer cs:checkNotes