Skip to content

Conversation

@JoshLove-msft
Copy link
Member

Fix to #53111

@JoshLove-msft JoshLove-msft requested a review from a team as a code owner October 9, 2025 21:21
Copilot AI review requested due to automatic review settings October 9, 2025 21:21
Copy link
Contributor

Copilot AI left a 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 fixes an issue where internal types with Pipeline properties were being auto-instrumented when they shouldn't be. The change modifies the instrumentation logic to only instrument public types that have a Pipeline property, excluding internal types from automatic instrumentation.

Key Changes

  • Added a visibility check to exclude internal types from instrumentation
  • Added test coverage for the non-public type exclusion behavior
  • Added test infrastructure with both public and internal type examples

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
sdk/core/Azure.Core.TestFramework/src/Instrumentation/InstrumentResultInterceptor.cs Modified instrumentation logic to check type.IsPublic before instrumenting types with Pipeline properties
sdk/core/Azure.Core.TestFramework/tests/ClientTestBaseTests.cs Added test to verify internal types are not auto-instrumented
sdk/core/Azure.Core.TestFramework/src/Shared/TestClient.cs Added test infrastructure with InternalType class and methods to support the new test case

@JoshLove-msft JoshLove-msft merged commit fb8562f into Azure:main Oct 9, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants