Use tdbr claim to route telemetry traffic to EU region, Fixes AB#3200872#2679
Open
Use tdbr claim to route telemetry traffic to EU region, Fixes AB#3200872#2679
Conversation
|
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
branch 'dev' of https://github.com/AzureAD/microsoft-authentication-library-common-for-android into fadi/EUClaim o Please enter a commit message to explain why this merge is necessary,
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for persisting and tracking the telemetry region (TDBR claim) by tenant across the Android platform layers.
- Defines a new
storeTelemetryRegionByTenantAPI inIPlatformUtiland implements it inAndroidPlatformUtil - Extends
ClientInfoto parse and expose the TDBR claim - Hooks into broker flows in
BrokerMsalControllerto extract, persist, and attach region telemetry
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| common4j/src/main/com/microsoft/identity/common/java/util/IPlatformUtil.java | Added storeTelemetryRegionByTenant method signature |
| common4j/src/main/com/microsoft/identity/common/java/providers/microsoft/azureactivedirectory/ClientInfo.java | Introduced TDBR_CLAIM constant, field, constructor parsing, and getter |
| common4j/src/main/com/microsoft/identity/common/java/opentelemetry/AttributeName.java | Added tenant_id enum entry |
| common/src/main/java/com/microsoft/identity/common/internal/platform/AndroidPlatformUtil.java | Implemented storeTelemetryRegionByTenant logic and span tagging |
| common/src/main/java/com/microsoft/identity/common/internal/controllers/BrokerMsalController.java | Integrated trackTelemetryRegionFromResultBundle into broker flows and initial save |
Comments suppressed due to low confidence (2)
common/src/main/java/com/microsoft/identity/common/internal/controllers/BrokerMsalController.java:1430
- The new
trackTelemetryRegionFromResultBundlemethod contains multiple branches (success, missing clientInfo, exception path) but lacks dedicated unit tests. Consider adding tests to cover each branch.
private void trackTelemetryRegionFromResultBundle(@NonNull final Bundle resultBundle) throws BaseException {
common/src/main/java/com/microsoft/identity/common/internal/controllers/BrokerMsalController.java:620
- Calling
trackTelemetryRegionFromResultBundle, which declaresthrows BaseException, insideextractResultBundle(which likely doesn't declare this exception) can lead to a compile error or unintended exception propagation. Wrap this call in a try-catch or adjust the method signature to handle the exception explicitly.
trackTelemetryRegionFromResultBundle(resultBundle);
common/src/main/java/com/microsoft/identity/common/internal/platform/AndroidPlatformUtil.java
Outdated
Show resolved
Hide resolved
...n/src/main/java/com/microsoft/identity/common/internal/controllers/BrokerMsalController.java
Outdated
Show resolved
Hide resolved
common/src/main/java/com/microsoft/identity/common/internal/platform/AndroidPlatformUtil.java
Outdated
Show resolved
Hide resolved
shahzaibj
reviewed
Jun 27, 2025
...n/src/main/java/com/microsoft/identity/common/internal/controllers/BrokerMsalController.java
Outdated
Show resolved
Hide resolved
shahzaibj
reviewed
Jun 27, 2025
common4j/src/main/com/microsoft/identity/common/java/util/IPlatformUtil.java
Outdated
Show resolved
Hide resolved
|
✅ Work item link check complete. Description contains link AB#3200872 to an Azure Boards work item. |
…atform/AndroidPlatformUtil.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
melissaahn
approved these changes
Jun 27, 2025
shahzaibj
reviewed
Jun 27, 2025
...n/src/main/java/com/microsoft/identity/common/internal/controllers/BrokerMsalController.java
Outdated
Show resolved
Hide resolved
…tion-library-common-for-android into fadi/EUClaim t add# Please enter a commit message to explain why this merge is necessary,
shahzaibj
reviewed
Jun 28, 2025
...n/src/main/java/com/microsoft/identity/common/internal/controllers/BrokerMsalController.java
Show resolved
Hide resolved
shahzaibj
reviewed
Jul 1, 2025
common4j/src/main/com/microsoft/identity/common/java/flighting/CommonFlight.java
Show resolved
Hide resolved
shahzaibj
reviewed
Jul 1, 2025
common4j/src/main/com/microsoft/identity/common/java/opentelemetry/AttributeName.java
Outdated
Show resolved
Hide resolved
shahzaibj
approved these changes
Jul 3, 2025
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.
Introduce Tracking for a new TDBR Claim that ESTS will send as part of ClientInfo to denote EU Home tenants, then fetch the claim to route telemetry to EU when applicable. This will be used to better comply with European Data laws
AB#3200872