Commit 1b7b6f2
committed
perf: only force flush tracer provider when ending agent spans
Reduce overhead by limiting force_flush calls to agent span completion
instead of every span end. Add flush parameter to _end_span() with
default False, passing True only from end_agent_span().1 parent c5342cc commit 1b7b6f2
File tree
2 files changed
+25
-5
lines changed- src/strands/telemetry
- tests/strands/telemetry
2 files changed
+25
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| 189 | + | |
189 | 190 | | |
190 | 191 | | |
191 | 192 | | |
| |||
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
| 198 | + | |
197 | 199 | | |
198 | 200 | | |
199 | 201 | | |
| |||
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
220 | | - | |
221 | | - | |
| 222 | + | |
222 | 223 | | |
223 | 224 | | |
224 | 225 | | |
| |||
699 | 700 | | |
700 | 701 | | |
701 | 702 | | |
702 | | - | |
| 703 | + | |
703 | 704 | | |
704 | 705 | | |
705 | 706 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1089 | 1089 | | |
1090 | 1090 | | |
1091 | 1091 | | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
1092 | 1102 | | |
1093 | 1103 | | |
1094 | | - | |
1095 | 1104 | | |
1096 | 1105 | | |
1097 | 1106 | | |
1098 | 1107 | | |
1099 | 1108 | | |
1100 | 1109 | | |
1101 | | - | |
| 1110 | + | |
1102 | 1111 | | |
1103 | 1112 | | |
1104 | 1113 | | |
1105 | 1114 | | |
1106 | 1115 | | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
1107 | 1126 | | |
1108 | 1127 | | |
1109 | 1128 | | |
| |||
0 commit comments