[azure monitor opentelemetry] Adding Browser SDK Loader functionality#42904
Merged
hectorhdzg merged 26 commits intoAzure:mainfrom Mar 5, 2026
Merged
[azure monitor opentelemetry] Adding Browser SDK Loader functionality#42904hectorhdzg merged 26 commits intoAzure:mainfrom
hectorhdzg merged 26 commits intoAzure:mainfrom
Conversation
API Change CheckAPIView identified API level changes in this PR and created the following API reviews |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request adds Browser SDK Loader functionality to the Azure Monitor OpenTelemetry Python package. The feature enables automatic injection of Application Insights JavaScript SDK snippets into HTML responses for supported web frameworks, starting with Django middleware support.
Key changes include:
- Implementation of web snippet injection logic with compression support
- Django middleware for automatic snippet injection
- Configuration system for browser SDK settings
- Integration with the main configure_azure_monitor function
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
tests/browserSdkLoader/test_snippet_injector.py |
Comprehensive test suite for WebSnippetInjector class covering injection logic, compression handling, and content detection |
tests/browserSdkLoader/test_integration.py |
Integration tests for browser SDK loader with configure_azure_monitor function |
tests/browserSdkLoader/test_django_middleware.py |
Test suite for Django middleware functionality including configuration and response processing |
tests/browserSdkLoader/test_config.py |
Tests for BrowserSDKConfig configuration class |
tests/browserSdkLoader/__init__.py |
Empty test package initialization file |
dev_requirements.txt |
Added brotli dependency for compression support |
_utils/configurations.py |
Updated configuration utilities to support browser SDK loader settings |
_constants.py |
Added browser SDK loader configuration constant |
_configure.py |
Integration of browser SDK loader setup into main configuration function |
snippet_injector.py |
Core implementation of web snippet injection with compression support |
django_middleware.py |
Django middleware implementation for automatic snippet injection |
_config.py |
Configuration class for browser SDK settings |
__init__.py |
Browser SDK loader module initialization and framework setup |
sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_utils/configurations.py
Show resolved
Hide resolved
...re-monitor-opentelemetry/azure/monitor/opentelemetry/_browser_sdk_loader/snippet_injector.py
Show resolved
Hide resolved
...itor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_browser_sdk_loader/__init__.py
Outdated
Show resolved
Hide resolved
rads-1996
reviewed
Sep 30, 2025
...nitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_browser_sdk_loader/_config.py
Outdated
Show resolved
Hide resolved
rads-1996
reviewed
Sep 30, 2025
...nitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_browser_sdk_loader/_config.py
Outdated
Show resolved
Hide resolved
rads-1996
reviewed
Sep 30, 2025
...e-monitor-opentelemetry/azure/monitor/opentelemetry/_browser_sdk_loader/django_middleware.py
Outdated
Show resolved
Hide resolved
rads-1996
reviewed
Sep 30, 2025
...e-monitor-opentelemetry/azure/monitor/opentelemetry/_browser_sdk_loader/django_middleware.py
Outdated
Show resolved
Hide resolved
ce675ea to
fae0613
Compare
rads-1996
reviewed
Jan 22, 2026
JacksonWeber
approved these changes
Mar 4, 2026
singankit
pushed a commit
that referenced
this pull request
Mar 16, 2026
…#42904) * Adding Browser SDK Loader * Update * Addressing comments * Lint * Add SDKStats feature for browser sdk loader * Format * Format * Update changelog * Update --------- Co-authored-by: Jackson Weber <47067795+JacksonWeber@users.noreply.github.com>
Merged
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.
Description
Please add an informative description that covers that changes made by the pull request and link all relevant issues.
If an SDK is being regenerated based on a new API spec, a link to the pull request containing these API spec changes should be included above.
All SDK Contribution checklist:
General Guidelines and Best Practices
Testing Guidelines