Skip to content

Conversation

@eavanvalkenburg
Copy link
Member

@eavanvalkenburg eavanvalkenburg commented Dec 11, 2025

Motivation and Context

Made the setup a lot simpler, and more compatible:

  • simplified the env variables in ObservabilitySettings
  • adjusted the logic for enabled and sensitive data
  • uses the OTEL standard env variables to create exporters fully dynamically
  • removed gRPC exporter dependency, instead you should install the ones you need (gRPC, http or others like azure monitor), tries to import with a proper message
  • adjusted sample and readme to reflect changes, the idea is now, that if you need complex setup (like with configure_azure_monitor) that you run that, and then only call setup_observability when you want to programmatically ensure that the code paths that emit traces, metrics, etc. are enabled. if you set the right env variables, then that is not needed.

Description

Closes:

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

Copilot AI review requested due to automatic review settings December 11, 2025 11:34
@markwallace-microsoft markwallace-microsoft added documentation Improvements or additions to documentation python lab Agent Framework Lab labels Dec 11, 2025
@markwallace-microsoft
Copy link
Member

markwallace-microsoft commented Dec 11, 2025

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
packages/a2a/agent_framework_a2a
   _agent.py139794%354–355, 392–393, 422–424
packages/ag-ui/agent_framework_ag_ui
   _client.py1361092%78–81, 84, 217, 247, 398–400
packages/anthropic/agent_framework_anthropic
   _chat_client.py26110161%234, 255, 293, 297–298, 304–305, 309, 339–340, 349, 351–352, 354, 371–372, 403, 418, 422–423, 469–471, 473, 483–484, 490–492, 496–498, 502–505, 516, 518, 546–548, 558–560, 568, 573–574, 582–584, 587, 595–597, 605–608, 617–628, 631–638, 644–651, 654–664, 667–670
packages/azure-ai/agent_framework_azure_ai
   _chat_client.py4348181%298, 566–567, 569, 572, 575, 578–583, 586, 588, 596, 608–610, 614, 617–618, 626–629, 639, 647–650, 652–653, 655–656, 663, 671–672, 680–681, 686–687, 691–698, 703–704, 712, 718, 726–728, 731, 753–754, 816, 831, 843–847, 874–876, 879–880, 938–943, 964, 1005, 1014, 1040
   _client.py1713778%220–223, 228, 231–234, 239, 242–243, 246, 253, 292, 294–297, 299, 436–439, 443, 445–446, 448–456, 458
packages/core/agent_framework
   _agents.py2915282%329, 390–392, 438, 492, 510, 672, 853, 856–858, 994–997, 999, 1002–1004, 1100, 1141, 1143, 1152–1157, 1163, 1165, 1175–1176, 1183, 1185–1186, 1194–1198, 1206–1207, 1209, 1214, 1216, 1250, 1295–1296, 1298, 1300, 1311
   _clients.py100991%267, 383, 431–434, 478, 799, 801
   _memory.py691578%119, 140, 158, 168, 185, 255, 259, 287–288, 291–292, 294, 310–312
   _serialization.py1051090%335, 347–348, 357, 516, 532, 542, 554, 610, 613
   _types.py95210189%130–131, 149–150, 287, 289, 296, 315, 355, 401–402, 438, 588, 702–703, 705, 730, 737, 754–756, 829, 834–835, 837, 844–845, 847, 869, 876, 879–881, 886–887, 893–895, 1019, 1106–1109, 1117–1118, 1209, 1390, 1396, 1640–1642, 1648–1649, 1951, 1956, 1960, 1964, 2142–2144, 2156, 2207–2211, 2221, 2226, 2685, 2771–2773, 2846, 2857–2858, 3032, 3036, 3048–3050, 3151–3153, 3155–3157, 3160, 3164, 3167, 3172, 3217–3218, 3225–3226, 3260–3262, 3277, 3293, 3321, 3328
   observability.py64515675%244, 312–317, 319, 321–322, 324, 326–328, 331–333, 338–339, 345–346, 352–353, 360, 362–364, 367–369, 374–375, 381–382, 388–389, 396, 433, 436, 439–441, 444, 447–448, 451–453, 455–457, 460, 547, 549, 631, 649–650, 652, 655, 663–664, 667–670, 672, 675–677, 680–681, 694–700, 702–711, 714–718, 721–724, 726–729, 732–733, 741, 842, 844, 869–871, 993, 995, 999–1004, 1006, 1009–1013, 1015, 1285, 1365–1367, 1439–1441, 1614, 1622, 1626, 1630, 1636, 1638, 1640, 1648, 1658, 1686–1687, 1700–1703, 1717, 1719, 1726, 1742, 1745, 1805, 1821, 1825, 1959, 1961
packages/core/agent_framework/azure
   _chat_client.py58493%166, 168, 181–182
   _responses_client.py28292%100, 123
packages/core/agent_framework/openai
   _assistants_client.py2092986%179, 192, 195, 201–202, 205, 208, 211–212, 223, 248, 250, 252, 254, 256, 259, 262, 265, 269, 280, 365, 402, 438, 467–470, 521, 538
   _chat_client.py2344381%110–111, 115, 133, 143–144, 146, 157, 171, 173–176, 185, 197, 233, 264, 269–283, 290–292, 367, 374, 376, 378, 396–397, 403, 419
   _responses_client.py4849480%98, 144, 151–152, 155–156, 161–162, 165, 172, 191, 198, 201–208, 210, 215, 221, 225, 240, 243–244, 246, 273, 303, 331–332, 359, 363, 380, 385, 399, 435, 497, 573, 578, 582–584, 604, 619–620, 624–626, 674, 694–695, 708–709, 725–726, 764, 766, 804, 806, 815–816, 834, 836, 909–917, 934–939, 958, 976, 986, 988, 1006–1007, 1009–1011, 1022–1023, 1026, 1028, 1047
TOTAL16634262884% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
2416 144 💤 0 ❌ 0 🔥 1m 1s ⏱️

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

@TaoChenOSU TaoChenOSU left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I really like where we are going. After the PR is merged and before the next release, we need to update our documentation.

@eavanvalkenburg eavanvalkenburg added this pull request to the merge queue Dec 16, 2025
Merged via the queue into microsoft:main with commit 3139347 Dec 16, 2025
35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation lab Agent Framework Lab python

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants