Skip to content

Commit 261d336

Browse files
CopilotnikhilNava
andcommitted
Address code review feedback: rename test and improve docstring
Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
1 parent 5e773ae commit 261d336

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

libraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/exporters/agent365_exporter.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,13 @@ def _build_url(self, endpoint: str, agent_id: str) -> str:
173173
174174
If the endpoint has a scheme (http:// or https://), use it as-is.
175175
Otherwise, prepend https://.
176+
177+
Args:
178+
endpoint: Base endpoint URL or domain.
179+
agent_id: The agent identifier to include in the URL path.
180+
181+
Returns:
182+
The fully constructed export URL with path and query parameters.
176183
"""
177184
endpoint_path = (
178185
f"/maven/agent365/service/agents/{agent_id}/traces"

tests/observability/core/test_agent365_exporter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ def test_export_success(self):
136136
len(request_data["resourceSpans"][0]["scopeSpans"][0]["spans"]), 2
137137
) # Two spans
138138

139-
def test_export_failure_with_retries(self):
140-
"""Test 2: Test export failure with fallback to IL tenant endpoint."""
139+
def test_export_fails_after_default_and_fallback_attempts(self):
140+
"""Test export failure when both default and IL tenant fallback endpoints fail."""
141141
# Arrange
142142
spans = [self._create_mock_span("failed_span")]
143143

0 commit comments

Comments
 (0)