Skip to content

Conversation

@xiaomi7732
Copy link
Member

Addresses #369

Copy link

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.

PR Overview

This PR addresses issue #369 by introducing an option to control whether the internal SDK version in telemetry is overwritten. The changes update the telemetry initializer, its corresponding tests, and accompanying options configuration to support this new behavior.

  • Updated tests to pass an IOptions parameter.
  • Added the OverwriteSDKVersion flag in the options class with default behavior.
  • Modified the telemetry initializer to conditionally overwrite the SDK version based on the provided option.

Reviewed Changes

File Description
tests/UnitTests/KubernetesTelemetryInitializerTests.cs Updated constructor calls in tests to include options and added new tests for SDK version behavior.
src/ApplicationInsights.Kubernetes/Extensions/AppInsightsForKubernetesOptions.cs Added a new boolean flag and summary comments to control SDK version overwriting.
tests/UnitTests/AppInsightsKubernetesOptionsTests.cs Added a test ensuring the OverwriteSDKVersion flag defaults to false.
src/ApplicationInsights.Kubernetes/TelemetryInitializers/KubernetesTelemetryInitializer.cs Updated constructor to inject options and modified Initialize to conditionally update the SDK version.

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

@xiaomi7732 xiaomi7732 merged commit 8d67bf6 into microsoft:develop Mar 10, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants