Skip to content

Comments

Allow setting PerRequestSpanProcessor without directly exporting the …#195

Merged
fpfp100 merged 10 commits intomainfrom
users/pefan/overridePerRequestSpanProcessor
Feb 17, 2026
Merged

Allow setting PerRequestSpanProcessor without directly exporting the …#195
fpfp100 merged 10 commits intomainfrom
users/pefan/overridePerRequestSpanProcessor

Conversation

@fpfp100
Copy link
Contributor

@fpfp100 fpfp100 commented Feb 10, 2026

Allow setting PerRequestSpanProcessor without directly exporting the configuration methods at index level.

@fpfp100 fpfp100 marked this pull request as ready for review February 10, 2026 03:50
Copilot AI review requested due to automatic review settings February 10, 2026 03:50
@fpfp100 fpfp100 requested a review from a team as a code owner February 10, 2026 03:50
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

Adds an internal override mechanism to enable per-request span exporting and to override PerRequestSpanProcessor guardrail settings without exposing additional configuration APIs at the package index level.

Changes:

  • Introduces PerRequestProcessorOverrides internal module with get/set APIs for per-request export and processor guardrail overrides.
  • Updates isPerRequestExportEnabled() to honor internal overrides before consulting configuration.
  • Updates PerRequestSpanProcessor to apply internal override guardrails and adds tests covering override behavior and builder selection.

Reviewed changes

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

File Description
tests/observability/internal/PerRequestProcessorOverrides.test.ts Adds Jest coverage for override round-tripping, enablement precedence, and guardrail override application.
packages/agents-a365-observability/src/tracing/exporter/utils.ts Checks internal overrides in isPerRequestExportEnabled() before config provider/env-driven configuration.
packages/agents-a365-observability/src/tracing/PerRequestSpanProcessor.ts Applies internal override guardrail values when constructing the processor.
packages/agents-a365-observability/src/internal/PerRequestProcessorOverrides.ts New internal module holding override state and exported override types.

Copilot AI review requested due to automatic review settings February 10, 2026 19:05
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

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

Comments suppressed due to low confidence (1)

packages/agents-a365-observability/src/configuration/PerRequestSpanProcessorConfiguration.ts:33

  • The class-level documentation and the "Inherited" comment still state that PerRequestSpanProcessorConfiguration inherits observability settings (e.g., isObservabilityExporterEnabled, observabilityLogLevel). After changing the base class to RuntimeConfiguration, those properties are no longer part of this configuration, so the comments are now misleading and should be updated accordingly.
 * Configuration for PerRequestSpanProcessor.
 * Inherits all observability and runtime settings, and adds per-request processor guardrails.
 *
 * This is separated from ObservabilityConfiguration because PerRequestSpanProcessor
 * is used only in specific scenarios and these settings should not be exposed
 * in the common ObservabilityConfiguration.
 */
export class PerRequestSpanProcessorConfiguration extends RuntimeConfiguration {
  protected get perRequestOverrides(): PerRequestSpanProcessorConfigurationOptions {
    return getPerRequestProcessorInternalOverrides() ?? this.overrides as PerRequestSpanProcessorConfigurationOptions;
  }

  constructor(overrides?: PerRequestSpanProcessorConfigurationOptions) {
    super(overrides);
  }

  // Inherited: clusterCategory, isDevelopmentEnvironment, isNodeEnvDevelopment,
  // observabilityAuthenticationScopes, isObservabilityExporterEnabled,
  // useCustomDomainForObservability, observabilityDomainOverride, observabilityLogLevel

@fpfp100 fpfp100 requested a review from a team as a code owner February 10, 2026 20:03
Copilot AI review requested due to automatic review settings February 10, 2026 20:10
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

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

Copilot AI review requested due to automatic review settings February 11, 2026 18:52
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

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

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

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

nikhilNava
nikhilNava previously approved these changes Feb 13, 2026
Copilot AI review requested due to automatic review settings February 13, 2026 20:29
@fpfp100
Copy link
Contributor Author

fpfp100 commented Feb 13, 2026

@copilot open a new pull request to apply changes based on the comments in this thread

@fpfp100 fpfp100 closed this Feb 13, 2026
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

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

@fpfp100 fpfp100 reopened this Feb 13, 2026
@fpfp100 fpfp100 merged commit 6b489bd into main Feb 17, 2026
7 checks passed
@fpfp100 fpfp100 deleted the users/pefan/overridePerRequestSpanProcessor branch February 17, 2026 18:26
fpfp100 added a commit that referenced this pull request Feb 19, 2026
#195)

* allow setting PerRequestSpanProcessor without directly exporting the configuration methods at index level.

* comments

* clean up to use existing class

* comment

* remove tasks.json

* comment

* add max age and default grace period

* comment

* update comment

---------

Co-authored-by: jsl517 <pefan@microsoft.com>
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