Skip to content

Conversation

@mmoustai
Copy link

@mmoustai mmoustai commented Jan 9, 2019

I needed to add specific tag from contextKey set in the context on an other middleware before this one.

I wasn't able to access it without adding the context in the decorator.

@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

@mmoustai
Copy link
Author

mmoustai commented Jan 9, 2019

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

@fho
Copy link

fho commented Sep 23, 2019

@rnburn could this be merged?

}
if otgrpcOpts.decorator != nil {
otgrpcOpts.decorator(clientSpan, method, nil, nil, err)
otgrpcOpts.decorator(context.Background(), clientSpan, method, nil, nil, err)
Copy link

@fho fho Sep 23, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pass ctx also to the streaming interceptors:

Suggested change
otgrpcOpts.decorator(context.Background(), clientSpan, method, nil, nil, err)
otgrpcOpts.decorator(cs.Context(), clientSpan, method, nil, nil, err)

}
if otgrpcOpts.decorator != nil {
otgrpcOpts.decorator(serverSpan, info.FullMethod, nil, nil, err)
otgrpcOpts.decorator(context.Background(), serverSpan, info.FullMethod, nil, nil, err)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
otgrpcOpts.decorator(context.Background(), serverSpan, info.FullMethod, nil, nil, err)
otgrpcOpts.decorator(ss.Context(), serverSpan, info.FullMethod, nil, nil, err)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants