MCPcopy
hub / github.com/grpc/grpc-go / addTraceEvent

Method addTraceEvent

clientconn.go:364–376  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
364func (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
378type idler ClientConn
379

Callers 4

exitIdleModeMethod · 0.95
enterIdleModeMethod · 0.95
channelzRegistrationMethod · 0.95
CloseMethod · 0.95

Calls 1

AddTraceEventFunction · 0.92

Tested by

no test coverage detected