Repository navigation
Add test coverage - #27
Merged
Hector Hernandez (hectorhdzg) merged 2 commits intoApr 10, 2026
Merged
Hector Hernandez (hectorhdzg) merged 2 commits into
Hector Hernandez (hectorhdzg) merged 2 commits into
Conversation
Copilot started reviewing on behalf of
Hector Hernandez (hectorhdzg)
April 9, 2026 23:50
View session
Contributor
There was a problem hiding this comment.
Pull request overview
This PR focuses on increasing automated test coverage for the Microsoft OpenTelemetry distro, and wiring coverage reporting into the test tooling.
Changes:
- Enable pytest coverage collection via
pytest-covandcoverage.pyconfiguration. - Add new unit tests for instrumentation dependency-conflict detection and Azure Monitor browser SDK loader behavior.
- Extend existing tests and adjust Django middleware initialization to support environments without Django.
Reviewed changes
Copilot reviewed 11 out of 12 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
tox.ini |
Adds pytest --cov invocation so tox runs generate coverage output. |
pyproject.toml |
Adds pytest-cov to optional deps and configures coverage source/reporting. |
dev_requirements.txt |
Adds pytest-cov to dev test dependencies used by tox. |
tests/test_instrumentation.py |
New unit tests for core _instrumentation dependency conflict helpers. |
tests/test_distro.py |
Adds tests for _setup_logging() behavior. |
tests/conftest.py |
Removes collection ignore configuration (file becomes effectively empty). |
tests/azure_monitor/utils/test_instrumentation.py |
New unit tests for Azure Monitor instrumentation conflict helpers. |
tests/azure_monitor/test_configure.py |
Updates tests to align with refactors around instrumentation setup and browser SDK loader setup. |
tests/azure_monitor/browserSdkLoader/test_snippet_injector.py |
Adds broader test coverage for snippet injection, compression handling, and statsbeat marking. |
tests/azure_monitor/browserSdkLoader/test_init.py |
New tests for browser SDK loader Django integration setup utilities. |
src/microsoft/opentelemetry/_azure_monitor/_browser_sdk_loader/django_middleware.py |
Guards super().__init__ call when Django isn’t installed (stub mixin). |
.coverage |
Adds a generated coverage DB artifact to the repo. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Radhika Gupta (rads-1996)
approved these changes
Apr 10, 2026
Hector Hernandez (hectorhdzg)
merged commit Apr 10, 2026
f6b57c0
into
microsoft:main
7 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Increased coverage from 77% to %92