Commit e88a6dd
Address review comments: fix logic callback type, gate on is_agentic_request
- Fix `logic` type annotation from `Callable[[TurnContext], Awaitable]` to
`Callable[[], Awaitable]` in both BaggageMiddleware and
OutputLoggingMiddleware. At runtime, MiddlewareSet passes a zero-arg
`call_next_middleware` closure, so the annotation now matches the callsite.
- Gate `_derive_agent_details` on `activity.is_agentic_request()` to avoid
emitting spans with empty agent_id for non-agentic requests.
- Remove unused `logging`/`logger` from baggage_middleware.py.
- Update test recipient role from "assistant" to "agenticAppInstance" to
exercise the intended agentic code path.
Co-authored-by: nikhilNava <211831449+nikhilNava@users.noreply.github.com>1 parent 87c1c12 commit e88a6dd
3 files changed
Lines changed: 11 additions & 7 deletions
File tree
- libraries/microsoft-agents-a365-observability-hosting/microsoft_agents_a365/observability/hosting/middleware
- tests/observability/hosting/middleware
Lines changed: 1 addition & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | 8 | | |
10 | 9 | | |
11 | 10 | | |
| |||
14 | 13 | | |
15 | 14 | | |
16 | 15 | | |
17 | | - | |
18 | | - | |
19 | 16 | | |
20 | 17 | | |
21 | 18 | | |
| |||
26 | 23 | | |
27 | 24 | | |
28 | 25 | | |
29 | | - | |
| 26 | + | |
30 | 27 | | |
31 | 28 | | |
32 | 29 | | |
| |||
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
46 | 51 | | |
| 52 | + | |
| 53 | + | |
47 | 54 | | |
48 | 55 | | |
49 | 56 | | |
| |||
119 | 126 | | |
120 | 127 | | |
121 | 128 | | |
122 | | - | |
| 129 | + | |
123 | 130 | | |
124 | 131 | | |
125 | 132 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments