Fix the issue that domain override has dependency on setting A365_OBS… - #140
Merged
Conversation
…ERVABILITY_USE_CUSTOM_DOMAIN
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request fixes an issue where the domain override functionality (A365_OBSERVABILITY_DOMAIN_OVERRIDE) was dependent on the A365_OBSERVABILITY_USE_CUSTOM_DOMAIN environment variable. The fix extracts domain override logic into a separate function and checks it independently before falling back to other endpoint resolution methods.
Key changes:
- Extracted domain override logic into a new
getAgent365ObservabilityDomainOverride()function - Modified endpoint resolution to check domain override first, independent of custom domain flag
- Added test coverage for the scenario where domain override is set but custom domain flag is false
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
packages/agents-a365-observability/src/tracing/util.ts |
Refactored resolveAgent365Endpoint() to remove domain override logic and added new getAgent365ObservabilityDomainOverride() function to handle override independently |
packages/agents-a365-observability/src/tracing/exporter/Agent365Exporter.ts |
Updated endpoint resolution logic to check domain override first before using custom domain or discovery endpoints; renamed variable from endpointPath to endpointRelativePath for clarity |
tests/observability/core/agent365-exporter.test.ts |
Added new test case for domain override with custom domain flag set to false; updated test description and added assertion to verify tenant-id header behavior |
Julio Carlos Menendez (juliomenendez)
previously approved these changes
Jan 8, 2026
Nikhil Navakiran (nikhilNava)
requested changes
Jan 8, 2026
Nikhil Navakiran (nikhilNava)
approved these changes
Jan 8, 2026
Julio Carlos Menendez (juliomenendez)
approved these changes
Jan 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix the issue that domain override has dependency on environment setting A365_OBSERVABILITY_USE_CUSTOM_DOMAIN