Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR marks the CloudContext class and the TelemetryContext.Cloud property as internal, representing a breaking change in the public API. The change removes public access to Cloud.RoleName and Cloud.RoleInstance properties, aligning with the 3.x architectural shift towards OpenTelemetry where these values should be set via resource attributes.
Changes:
- Changed
CloudContextclass visibility frompublictointernal - Changed
TelemetryContext.Cloudproperty visibility frompublictointernaland relocated it after public properties - Removed CloudContext and related APIs from the public API surface in PublicAPI.Unshipped.txt
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| CloudContext.cs | Changed class visibility modifier from public sealed to internal sealed |
| TelemetryContext.cs | Changed Cloud property from public to internal and moved it after public properties to maintain organizational consistency |
| PublicAPI.Unshipped.txt | Removed CloudContext class and TelemetryContext.Cloud property from the public API surface |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/CloudContext.cs
Show resolved
Hide resolved
BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/CloudContext.cs
Show resolved
Hide resolved
BASE/src/Microsoft.ApplicationInsights/DataContracts/TelemetryContext.cs
Show resolved
Hide resolved
BASE/src/Microsoft.ApplicationInsights/DataContracts/TelemetryContext.cs
Show resolved
Hide resolved
BASE/src/Microsoft.ApplicationInsights/Extensibility/Implementation/CloudContext.cs
Show resolved
Hide resolved
harsimar
approved these changes
Jan 27, 2026
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.
Fix Issue # .
Changes
(Please provide a brief description of the changes here.)
Checklist
For significant contributions please make sure you have completed the following items:
The PR will trigger build, unit tests, and functional tests automatically. Please follow these instructions to build and test locally.
Notes for authors: