Default A365 exporter endpoint to agent365.svc.cloud.microsoft#206
Default A365 exporter endpoint to agent365.svc.cloud.microsoft#206nikhilNava merged 6 commits intomainfrom
Conversation
…date URL paths Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
There was a problem hiding this comment.
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://orhttps://.
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. |
src/Observability/Runtime/Tracing/Exporters/Agent365ExporterOptions.cs
Outdated
Show resolved
Hide resolved
src/Observability/Runtime/Tracing/Exporters/Agent365ExporterCore.cs
Outdated
Show resolved
Hide resolved
src/Observability/Runtime/Tracing/Exporters/Agent365ExporterCore.cs
Outdated
Show resolved
Hide resolved
…n, tests Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
|
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:
If you need me to access, download, or install something from one of these locations, you can either:
|
Testing
Aligns the .NET exporter with Agent365-python#184. The exporter was using
PowerPlatformApiDiscovery(IL tenant URL) as the default endpoint; it should default toagent365.svc.cloud.microsoft.Endpoint resolution
Default
DomainResolvernow returnsagent365.svc.cloud.microsoftinstead of callingPowerPlatformApiDiscovery.GetTenantIslandClusterEndpoint(). Priority:A365_OBSERVABILITY_DOMAIN_OVERRIDEenv varDomainResolverdelegateagent365.svc.cloud.microsoft(default)URL path format
Updated
BuildEndpointPathto include tenant ID and use the new path scheme. Path segments (tenantId,agentId) are URL-encoded viaUri.EscapeDataStringto prevent malformed URIs./observability/tenants/{tenantId}/agents/{agentId}/traces/observabilityService/tenants/{tenantId}/agents/{agentId}/tracesPreviously:
/maven/agent365/[service/]agents/{agentId}/tracesScheme handling
BuildRequestUrinow handles endpoints that already includehttps://, with trailing slash normalization. Plaintexthttp://endpoints are rejected withArgumentExceptionto protect ****** in transit.Additional improvements
DefaultEndpointUrl→DefaultEndpointHost(the value is a host name, not a URL)Agent365ExporterOptionsclass summary (ClusterCategoryis no longer required for core operation)TenantDomainResolverdelegate andDomainResolverproperty docs to reflect host-or-URL contractppapiEndpointOverride/ppapiEndpoint→endpointOverride/endpointBuildRequestUrischeme 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.