Skip to content

Add option to use custom domain for A365 service - #92

Merged
fpfp100 merged 8 commits into
mainfrom
users/pefan/customendpoint
Dec 2, 2025
Merged

Add option to use custom domain for A365 service#92
fpfp100 merged 8 commits into
mainfrom
users/pefan/customendpoint

Conversation

@fpfp100

@fpfp100 fpfp100 commented Dec 2, 2025

Copy link
Copy Markdown
Contributor

Introduce option to use custom A365 service for SDK. Use environment variable A365_OBSERVABILITY_USE_CUSTOM_DOMAIN. When it is false, default to use PPAPI gateway endpoint per-tenant.

@fpfp100 fpfp100 changed the title [NodeJs] Use custom domain for A365 service Add option to use custom domain for A365 service Dec 2, 2025
@fpfp100
fpfp100 marked this pull request as ready for review December 2, 2025 17:32
@fpfp100
fpfp100 requested a review from a team as a code owner December 2, 2025 17:32
Copilot AI review requested due to automatic review settings December 2, 2025 17:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 a configurable option to route Agent365 observability exports to a custom domain, controlled by the environment variable A365_OBSERVABILITY_USE_CUSTOM_DOMAIN. When disabled, the exporter falls back to per-tenant PPAPI gateway discovery.

  • Introduces useCustomDomainForObservability and resolveAgent365Endpoint helpers.
  • Updates Agent365Exporter to conditionally use a custom domain and header behavior based on the flag.
  • Adds tests that validate URL selection, headers, and token usage under both custom-domain and default discovery paths.

Reviewed changes

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

File Description
tests/observability/core/agent365-exporter.test.ts Adds parameterized tests for custom-domain and default discovery export paths, asserting URL and header behavior and authorization.
packages/agents-a365-observability/src/tracing/util.ts Adds helpers to read the custom-domain flag and resolve the Agent365 endpoint per cluster.
packages/agents-a365-observability/src/tracing/exporter/Agent365Exporter.ts Modifies export flow to use custom domain when enabled and adjusts headers; retains default discovery otherwise.
Comments suppressed due to low confidence (1)

packages/agents-a365-observability/src/tracing/exporter/Agent365Exporter.ts:149

  • Unused variable isProd.
    const isProd = String(this.options.clusterCategory || '').toLowerCase() === 'prod';

Comment thread packages/agents-a365-observability/src/tracing/exporter/Agent365Exporter.ts Outdated
Comment thread packages/agents-a365-observability/src/tracing/exporter/Agent365Exporter.ts Outdated
Comment thread packages/agents-a365-observability/src/tracing/exporter/Agent365Exporter.ts Outdated
Comment thread packages/agents-a365-observability/src/tracing/util.ts
Comment thread tests/observability/core/agent365-exporter.test.ts Outdated
Comment thread packages/agents-a365-observability/src/tracing/exporter/Agent365Exporter.ts Outdated
Comment thread packages/agents-a365-observability/src/tracing/util.ts Outdated
Copilot AI review requested due to automatic review settings December 2, 2025 20:07

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 out of 3 changed files in this pull request and generated 7 comments.

Comments suppressed due to low confidence (1)

tests/observability/core/agent365-exporter.test.ts:108

  • This string is not a template literal, but appears to reference the variable agentId.
    { cluster: 'prod', customDomainEnabled: false, expectedCustomDomainUrl: 'https://${endpoint}/maven/agent365/agents/${agentId}/traces?api-version=1', token: 'tok-prod-disabled' }

Comment thread tests/observability/core/agent365-exporter.test.ts Outdated
Comment thread packages/agents-a365-observability/src/tracing/util.ts Outdated
Comment thread packages/agents-a365-observability/src/tracing/util.ts Outdated
Comment thread packages/agents-a365-observability/src/tracing/util.ts Outdated
Comment thread tests/observability/core/agent365-exporter.test.ts Outdated
Comment thread packages/agents-a365-observability/src/tracing/exporter/Agent365Exporter.ts Outdated
Comment thread tests/observability/core/agent365-exporter.test.ts Outdated
Copilot AI review requested due to automatic review settings December 2, 2025 20:23

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 out of 3 changed files in this pull request and generated 7 comments.

Comment thread packages/agents-a365-observability/src/tracing/util.ts
Comment thread packages/agents-a365-observability/src/tracing/util.ts
Comment thread packages/agents-a365-observability/src/tracing/exporter/Agent365Exporter.ts Outdated
Comment thread packages/agents-a365-observability/src/tracing/exporter/Agent365Exporter.ts Outdated
Comment thread tests/observability/core/agent365-exporter.test.ts
Comment thread packages/agents-a365-observability/src/tracing/util.ts Outdated
Comment thread tests/observability/core/agent365-exporter.test.ts Outdated
Comment thread packages/agents-a365-observability/src/tracing/util.ts Outdated
Copilot AI review requested due to automatic review settings December 2, 2025 21:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 3 out of 3 changed files in this pull request and generated 3 comments.

Comment thread packages/agents-a365-observability/src/tracing/util.ts
Comment thread packages/agents-a365-observability/src/tracing/util.ts
Comment thread tests/observability/core/agent365-exporter.test.ts
@fpfp100
fpfp100 merged commit 3e82554 into main Dec 2, 2025
13 checks passed
@pontemonti
pontemonti deleted the users/pefan/customendpoint branch December 5, 2025 17:09
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.

5 participants