diff options
Diffstat (limited to 'traceable/traceable.go')
| -rw-r--r-- | traceable/traceable.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/traceable/traceable.go b/traceable/traceable.go index e3f81d5..6efc7f7 100644 --- a/traceable/traceable.go +++ b/traceable/traceable.go @@ -17,6 +17,8 @@ type Traceable interface { SetGotConnTimeInfo(time.Time, httptrace.GotConnInfo) SetTLSHandshakeStartTime(time.Time) SetTLSHandshakeDoneTimeState(time.Time, tls.ConnectionState) + SetHttpWroteRequestTimeInfo(time.Time, httptrace.WroteRequestInfo) + SetHttpResponseReadyTime(time.Time) } func GenerateHttpTimingTracer( @@ -51,6 +53,12 @@ func GenerateHttpTimingTracer( TLSHandshakeDone: func(tlsConnState tls.ConnectionState, err error) { traceable.SetTLSHandshakeDoneTimeState(time.Now(), tlsConnState) }, + WroteRequest: func(wroteRequest httptrace.WroteRequestInfo) { + traceable.SetHttpWroteRequestTimeInfo(time.Now(), wroteRequest) + }, + GotFirstResponseByte: func() { + traceable.SetHttpResponseReadyTime(time.Now()) + }, } return &tracer } |
