Skip to content

Commit

Permalink
Merge pull request #929 from uber/grpcOutgoingEvent
Browse files Browse the repository at this point in the history
grpc outgoing event
  • Loading branch information
shivam-srivastava28 authored Feb 28, 2024
2 parents e16bccc + 4c5f45a commit cf60ec8
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions runtime/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const (

const (
EventThriftOutgoing = "event-thrift-outgoing"
EventGRPCOutgoing = "event-grpc-outgoing"
EventHTTPIncoming = "event-http-incoming"
EventHTTPOutgoing = "event-http-outgoing"
)
Expand Down Expand Up @@ -62,6 +63,24 @@ func (tce *ThriftOutgoingEvent) Name() string {
return EventThriftOutgoing
}

// GRPCOutgoingEvent captures request and response data
type GRPCOutgoingEvent struct {
MethodName string
ServiceName string

ReqHeaders map[string]string
Req []byte

RspHeaders map[string]string
Rsp []byte

Success bool
}

func (gce *GRPCOutgoingEvent) Name() string {
return EventGRPCOutgoing
}

// HTTPIncomingEvent captures incoming request and response data received
type HTTPIncomingEvent struct {
EndpointName string // optional
Expand Down

0 comments on commit cf60ec8

Please sign in to comment.