Skip to content

Default A365 exporter endpoint to agent365.svc.cloud.microsoft#206

Merged
nikhilNava merged 6 commits intomainfrom
copilot/default-observability-exporter-domain
Mar 2, 2026
Merged

Default A365 exporter endpoint to agent365.svc.cloud.microsoft#206
nikhilNava merged 6 commits intomainfrom
copilot/default-observability-exporter-domain

Conversation

Copy link
Contributor

Copilot AI commented Feb 27, 2026

Testing

image

Aligns the .NET exporter with Agent365-python#184. The exporter was using PowerPlatformApiDiscovery (IL tenant URL) as the default endpoint; it should default to agent365.svc.cloud.microsoft.

Endpoint resolution

Default DomainResolver now returns agent365.svc.cloud.microsoft instead of calling PowerPlatformApiDiscovery.GetTenantIslandClusterEndpoint(). Priority:

  1. A365_OBSERVABILITY_DOMAIN_OVERRIDE env var
  2. Custom DomainResolver delegate
  3. agent365.svc.cloud.microsoft (default)

URL path format

Updated BuildEndpointPath to include tenant ID and use the new path scheme. Path segments (tenantId, agentId) are URL-encoded via Uri.EscapeDataString to prevent malformed URIs.

  • Standard: /observability/tenants/{tenantId}/agents/{agentId}/traces
  • S2S: /observabilityService/tenants/{tenantId}/agents/{agentId}/traces

Previously: /maven/agent365/[service/]agents/{agentId}/traces

Scheme handling

BuildRequestUri now handles endpoints that already include https://, with trailing slash normalization. Plaintext http:// endpoints are rejected with ArgumentException to protect ****** in transit.

// Before — always prepended https://
return $"https://{endpoint}{endpointPath}?api-version=1";

// After — respects existing https:// scheme, rejects http://
var normalizedEndpoint = endpoint.TrimEnd('/');
if (normalizedEndpoint.StartsWith("http://", StringComparison.OrdinalIgnoreCase))
    throw new ArgumentException("Plaintext HTTP endpoints are not supported. Use HTTPS to protect credentials in transit.", nameof(endpoint));
if (normalizedEndpoint.StartsWith("https://", StringComparison.OrdinalIgnoreCase))
    return $"{normalizedEndpoint}{endpointPath}?api-version=1";
return $"https://{normalizedEndpoint}{endpointPath}?api-version=1";

Additional improvements

  • Renamed DefaultEndpointUrlDefaultEndpointHost (the value is a host name, not a URL)
  • Updated Agent365ExporterOptions class summary (ClusterCategory is no longer required for core operation)
  • Updated TenantDomainResolver delegate and DomainResolver property docs to reflect host-or-URL contract
  • Renamed internal variables ppapiEndpointOverride/ppapiEndpointendpointOverride/endpoint
  • Added 5 unit tests for BuildRequestUri scheme handling (bare host, https scheme, trailing slash normalization, http rejection)

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 27, 2026 16:32
…date URL paths

Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
Copilot AI changed the title [WIP] Default observability A365 exporter to use custom domain Default A365 exporter endpoint to agent365.svc.cloud.microsoft Feb 27, 2026
@nikhilNava nikhilNava marked this pull request as ready for review February 27, 2026 16:47
@nikhilNava nikhilNava requested a review from a team as a code owner February 27, 2026 16:47
Copilot AI review requested due to automatic review settings February 27, 2026 16:47
@github-actions
Copy link

github-actions bot commented Feb 27, 2026

⚠️ Deprecation Warning: The deny-licenses option is deprecated for possible removal in the next major release. For more information, see issue 997.

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

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

Updates the Agent365 .NET observability exporter to align with the Python exporter by switching the default export endpoint to agent365.svc.cloud.microsoft, updating the request path format to include tenant IDs, and improving endpoint scheme handling.

Changes:

  • Default endpoint resolution now falls back to agent365.svc.cloud.microsoft (after env var + custom resolver).
  • Export request paths now include /observability/tenants/{tenantId}/agents/{agentId}/traces (and the S2S variant).
  • Request URI construction now respects endpoints that already include http:// or https://.

Reviewed changes

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

File Description
src/Observability/Runtime/Tracing/Exporters/Agent365ExporterOptions.cs Introduces a default endpoint constant and updates default DomainResolver behavior/docs.
src/Observability/Runtime/Tracing/Exporters/Agent365ExporterCore.cs Updates endpoint path format, adds scheme-aware request URI building, and wires tenantId into the path.
src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/Tracing/Exporters/Agent365ExporterTests.cs Updates request-URI assertions to match the new endpoint path and default endpoint behavior.

…n, tests

Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Feb 27, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • agent365.svc.cloud.microsoft
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.deps.json /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/testhost.dll --port 39481 --endpoint 127.0.0.1:039481 --role client --parentprocessid 4202 --telemetryoptedin false (dns block)
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.deps.json /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/testhost.dll --port 36459 --endpoint 127.0.0.1:036459 --role client --parentprocessid 4337 --telemetryoptedin false (dns block)
  • override.example.com
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.deps.json /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/testhost.dll --port 39481 --endpoint 127.0.0.1:039481 --role client --parentprocessid 4202 --telemetryoptedin false (dns block)
    • Triggering command: /usr/share/dotnet/dotnet /usr/share/dotnet/dotnet exec --runtimeconfig /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.runtimeconfig.json --depsfile /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/Microsoft.Agents.A365.Observability.Runtime.Tests.deps.json /home/REDACTED/work/Agent365-dotnet/Agent365-dotnet/src/Tests/Microsoft.Agents.A365.Observability.Runtime.Tests/bin/Debug/net8.0/testhost.dll --port 36459 --endpoint 127.0.0.1:036459 --role client --parentprocessid 4337 --telemetryoptedin false (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

@nikhilNava nikhilNava merged commit de21fd9 into main Mar 2, 2026
7 checks passed
@nikhilNava nikhilNava deleted the copilot/default-observability-exporter-domain branch March 2, 2026 16:18
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