Skip to content

Conversation

linglingye001
Copy link
Contributor

No description provided.

@juniwang juniwang requested a review from Copilot August 22, 2025 06:18
Copy link

@Copilot 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 adds telemetry metadata population functionality to feature flags in Azure App Configuration. It ensures that when feature flags have telemetry enabled, they are populated with reference URLs and ETags for tracking purposes.

  • Adds new functions generateFeatureFlagReference and populateTelemetryMetadata to populate telemetry metadata
  • Integrates telemetry metadata population into the loadFeatureFlags workflow
  • Adds comprehensive test coverage for various telemetry scenarios including flags with/without telemetry, existing metadata preservation, and URL generation edge cases

Reviewed Changes

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

File Description
azureappconfiguration.go Adds telemetry metadata population logic and URL generation functions
azureappconfiguration_test.go Adds comprehensive test coverage for telemetry metadata functionality

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

// Set the new metadata
if setting.ETag != nil {
metadata[eTagKey] = *setting.ETag
}
Copy link
Preview

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The eTagKey constant is not defined in the visible code. This should be defined as a constant alongside other metadata keys to maintain consistency and avoid magic strings.

Copilot uses AI. Check for mistakes.

if setting.ETag != nil {
metadata[eTagKey] = *setting.ETag
}
metadata[featureFlagReferenceKey] = generateFeatureFlagReference(setting, endpoint)
Copy link
Preview

Copilot AI Aug 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The featureFlagReferenceKey constant is not defined in the visible code. This should be defined as a constant alongside other metadata keys to maintain consistency and avoid magic strings.

Copilot uses AI. Check for mistakes.

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.

1 participant