-
Notifications
You must be signed in to change notification settings - Fork 38
Use tdbr claim to route telemetry traffic to EU region, Fixes AB#3200872 #2679
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
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,
There was a problem hiding this 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 adds support for persisting and tracking the telemetry region (TDBR claim) by tenant across the Android platform layers.
- Defines a new
storeTelemetryRegionByTenant
API inIPlatformUtil
and implements it inAndroidPlatformUtil
- Extends
ClientInfo
to parse and expose the TDBR claim - Hooks into broker flows in
BrokerMsalController
to 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
trackTelemetryRegionFromResultBundle
method 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
...n/src/main/java/com/microsoft/identity/common/internal/controllers/BrokerMsalController.java
Outdated
Show resolved
Hide resolved
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 <[email protected]>
...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,
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