* Drain and flush all buffered traces.
()
| 129 | * Drain and flush all buffered traces. |
| 130 | */ |
| 131 | public drain(): void { |
| 132 | if (!this._traceBuckets.size) { |
| 133 | return; |
| 134 | } |
| 135 | |
| 136 | DEBUG_BUILD && debug.log(`Flushing span tree map with ${this._traceBuckets.size} traces`); |
| 137 | |
| 138 | this._traceBuckets.forEach((_, traceId) => { |
| 139 | this.flush(traceId); |
| 140 | }); |
| 141 | } |
| 142 | |
| 143 | /** |
| 144 | * Flush spans of a specific trace. |
no test coverage detected