diff --git a/runtime/client_http_request.go b/runtime/client_http_request.go index b2c5a36c4..12310d953 100644 --- a/runtime/client_http_request.go +++ b/runtime/client_http_request.go @@ -239,7 +239,7 @@ func (req *ClientHTTPRequest) Do() (*ClientHTTPResponse, error) { } if ec := GetEventContainer(ctx); ec != nil { - ec.events = append(ec.events, event) + ec.Events = append(ec.Events, event) } } } diff --git a/runtime/context_test.go b/runtime/context_test.go index 0868d25e6..3f0dc7c5c 100644 --- a/runtime/context_test.go +++ b/runtime/context_test.go @@ -656,5 +656,5 @@ func TestEventContainer(t *testing.T) { ctx = WithEventContainer(ctx, &EventContainer{}) ec := GetEventContainer(ctx) - assert.Equal(t, len(ec.events), 0) + assert.Equal(t, len(ec.Events), 0) } diff --git a/runtime/events.go b/runtime/events.go index 64da717c9..e85def872 100644 --- a/runtime/events.go +++ b/runtime/events.go @@ -42,7 +42,7 @@ type Event interface { // EventContainer holds generated events. type EventContainer struct { - events []Event + Events []Event } // ThriftOutgoingEvent captures request and response data diff --git a/runtime/router.go b/runtime/router.go index 0d8ebf37b..0430de625 100644 --- a/runtime/router.go +++ b/runtime/router.go @@ -182,7 +182,7 @@ func (endpoint *RouterEndpoint) HandleRequest( ec := GetEventContainer(ctx) var events []Event if ec != nil { - events = append(events, ec.events...) + events = append(events, ec.Events...) } event := &HTTPIncomingEvent{ diff --git a/runtime/tchannel_client.go b/runtime/tchannel_client.go index c49e82fc2..7b904c083 100644 --- a/runtime/tchannel_client.go +++ b/runtime/tchannel_client.go @@ -303,7 +303,7 @@ func (c *TChannelClient) call( } if ec := GetEventContainer(ctx); ec != nil { - ec.events = append(ec.events, event) + ec.Events = append(ec.Events, event) } }