addTraceEvent is a helper method to add a trace event on the channel. If the channel is a nested one, the same event is also added on the parent channel.
(msg string)
| 362 | // addTraceEvent is a helper method to add a trace event on the channel. If the |
| 363 | // channel is a nested one, the same event is also added on the parent channel. |
| 364 | func (cc *ClientConn) addTraceEvent(msg string) { |
| 365 | ted := &channelz.TraceEvent{ |
| 366 | Desc: fmt.Sprintf("Channel %s", msg), |
| 367 | Severity: channelz.CtInfo, |
| 368 | } |
| 369 | if cc.dopts.channelzParent != nil { |
| 370 | ted.Parent = &channelz.TraceEvent{ |
| 371 | Desc: fmt.Sprintf("Nested channel(id:%d) %s", cc.channelz.ID, msg), |
| 372 | Severity: channelz.CtInfo, |
| 373 | } |
| 374 | } |
| 375 | channelz.AddTraceEvent(logger, cc.channelz, 1, ted) |
| 376 | } |
| 377 | |
| 378 | type idler ClientConn |
| 379 |
no test coverage detected