grpc-ecosystem / grpc-opentracing

OpenTracing is a set of consistent, expressive, vendor-neutral APIs for distributed tracing and context propagation
BSD 3-Clause "New" or "Revised" License
472 stars 98 forks source link

Copy the gRPC metadata before modifying it. #13

Closed tomwilkie closed 7 years ago

tomwilkie commented 7 years ago

Fixes #12

Malayks commented 7 years ago

I did not face this problem yet but any reason it can be only from client code? Server modifies the metadata as well.

tomwilkie commented 7 years ago

This happens when a gRPC instrumented server triggers two gRPC calls as the result of a single incoming RPC. So I don't think it will happen in the server.

googlebot commented 7 years ago

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

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

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


tomwilkie commented 7 years ago

I signed it!

googlebot commented 7 years ago

CLAs look good, thanks!

Malayks commented 7 years ago

I guess the two gRPC calls should be goroutines that share the same context?

tomwilkie commented 7 years ago

They are - see here: https://github.com/weaveworks/cortex/blob/master/distributor/distributor.go#L321

bhs commented 7 years ago

@tomwilkie thank you for the fix. LGTM.