Skip to content

Commit c08b24f

Browse files
CopilotnikhilNava
andcommitted
Replace type(e).__name__ with str(e) in exporter error logging per PR review
Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>
1 parent 84be10f commit c08b24f

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

  • libraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/exporters

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,7 @@ def export(self, spans: Sequence[ReadableSpan]) -> SpanExportResult:
122122
except Exception as e:
123123
# If token resolution fails, treat as failure for this group
124124
logger.error(
125-
f"Token resolution failed for agent {agent_id}, "
126-
f"tenant {tenant_id}: {type(e).__name__}"
125+
f"Token resolution failed for agent {agent_id}, tenant {tenant_id}: {e}"
127126
)
128127
any_failure = True
129128
continue
@@ -225,9 +224,7 @@ def _post_with_retries(self, url: str, body: str, headers: dict[str, str]) -> bo
225224
time.sleep(0.5 * (2**attempt))
226225
continue
227226
# Final attempt failed
228-
logger.error(
229-
f"Request failed after {DEFAULT_MAX_RETRIES + 1} attempts: {type(e).__name__}"
230-
)
227+
logger.error(f"Request failed after {DEFAULT_MAX_RETRIES + 1} attempts: {e}")
231228
return False
232229
return False
233230

0 commit comments

Comments
 (0)