Skip to content

Conversation

@siddhijain
Copy link
Contributor

@siddhijain siddhijain commented Aug 22, 2025

Emitting eSTS telemetry is an expensive operation that impacts the performance of calls. Therefore, we are placing it behind a feature flag to avoid executing telemetry-related operations. AB#3352490

Copilot AI review requested due to automatic review settings August 22, 2025 21:36
@siddhijain siddhijain requested review from a team as code owners August 22, 2025 21:36
@github-actions
Copy link

❌ Work item link check failed. Description does not contain AB#{ID}.

Click here to Learn more.

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 introduces a feature flag mechanism to control eSTS telemetry operations for performance optimization. The changes wrap existing telemetry code behind a feature flag check to avoid executing expensive telemetry operations when disabled.

  • Added SKIP_ESTS_TELEMETRY feature flag to control telemetry execution
  • Created TelemetryUtils.executeIfEstsTelemetryEnabled() method to conditionally execute telemetry code
  • Wrapped all eSTS telemetry calls throughout the codebase with the new utility method

Reviewed Changes

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

Show a summary per file
File Description
TelemetryUtils.java Implements the core feature flag checking logic and execution wrapper
CommonFlight.java Adds the new SKIP_ESTS_TELEMETRY feature flag definition
AttributeName.java Adds telemetry attribute to track when eSTS telemetry is skipped
CacheEndEvent.java Wraps EstsTelemetry.emit() call with feature flag check
OAuth2Strategy.java Wraps EstsTelemetry header retrieval calls with feature flag check
NativeAuthRequestProvider.kt Wraps EstsTelemetry header retrieval with feature flag check
CommandDispatcher.java Wraps multiple EstsTelemetry method calls with feature flag check

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

@siddhijain siddhijain changed the title Move ests telemetry related code behind a feature flag Move ests telemetry related code behind a feature flag AB#3352490 Aug 25, 2025
@github-actions
Copy link

✅ Work item link check complete. Description contains link AB#3352490 to an Azure Boards work item.

@github-actions github-actions bot changed the title Move ests telemetry related code behind a feature flag AB#3352490 Move ests telemetry related code behind a feature flag AB#3352490, Fixes AB#3352490 Aug 25, 2025
@mohitc1
Copy link
Contributor

mohitc1 commented Aug 26, 2025

How about we make EstsTelemetry.getInstance() return NoOpEstsTelemetry when flight is enabled? Only change needed would be EstsTelemetry class, instead of updating every call.

Copy link
Contributor

@mohitc1 mohitc1 left a comment

Choose a reason for hiding this comment

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

:shipit:

@siddhijain siddhijain merged commit 6bd258b into dev Aug 27, 2025
24 of 25 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.

4 participants