mrproliu commented on code in PR #136: URL: https://github.com/apache/skywalking-go/pull/136#discussion_r1371323003
########## plugins/trace-activation/create_entryspan_intercepter.go: ########## @@ -27,13 +27,20 @@ type CreateEntrySpanInterceptor struct { } func (h *CreateEntrySpanInterceptor) BeforeInvoke(invocation operator.Invocation) error { - operationName := invocation.Args()[0].(string) - var extractor func(headerKey string) (string, error) = invocation.Args()[1].(trace.ExtractorRef) - s, err := tracing.CreateEntrySpan(operationName, extractor) - invocation.DefineReturnValues(s, err) return nil } func (h *CreateEntrySpanInterceptor) AfterInvoke(invocation operator.Invocation, result ...interface{}) error { + operationName := invocation.Args()[0].(string) + var extractor func(headerKey string) (string, error) = invocation.Args()[1].(trace.ExtractorRef) + s, err := tracing.CreateEntrySpan(operationName, extractor) + if err != nil { + invocation.DefineReturnValues(nil, err) Review Comment: Forget `return`? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@skywalking.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org