Added telemetry to capture encrypt and decrypt operations in device PoP scenarios, Fixes AB#3468126#2844
Merged
Merged
Conversation
|
❌ Work item link check failed. Description does not contain AB#{ID}. Click here to Learn more. |
|
✅ Work item link check complete. Description contains link AB#3468126 to an Azure Boards work item. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds telemetry instrumentation to the encrypt and decrypt operations in AbstractDevicePopManager to track usage of methods marked as deprecated. The telemetry will help determine whether these cryptographic operations are still being invoked before complete removal.
Key changes:
- Added new
DevicePopCryptoOperationspan name to the telemetry enum - Instrumented encrypt and decrypt methods with OpenTelemetry spans that track operation type and status
- Refactored exception handling by consolidating error code mapping into a shared helper method
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
common4j/src/main/com/microsoft/identity/common/java/opentelemetry/SpanName.java |
Added DevicePopCryptoOperation enum value for tracking device PoP crypto operations |
common4j/src/main/com/microsoft/identity/common/java/platform/AbstractDevicePopManager.java |
Added telemetry spans to encrypt/decrypt methods using existing crypto_operation attribute; refactored exception handling into mapCryptoExceptionToErrorCode helper method; also fixed a bug where NoSuchPaddingException was incorrectly mapped to NO_SUCH_ALGORITHM instead of NO_SUCH_PADDING in the decrypt method |
melissaahn
approved these changes
Dec 23, 2025
cacosta33
approved these changes
Dec 23, 2025
798d56a to
804f98a
Compare
…AbstractDevicePopManager.java Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
804f98a to
7d2e957
Compare
melissaahn
approved these changes
Dec 26, 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.
What : Adding telemetry to capture Encrypt and Decrypt crypto operations in device PoP cases
Why : We think these operations are not invoked at all and we marked it as deprecated in previous PRs. But to remove them completely, we need the telemetry to check if they are for sure not being invoked.
Testing : Verified that the spans are getting created correctly.
Fixes AB#3468126