go-grpc-middleware icon indicating copy to clipboard operation
go-grpc-middleware copied to clipboard

opentracing middleware: Add Option to put proto request in span for certain methods.

Open bwplotka opened this issue 5 years ago • 5 comments
trafficstars

AC:

  • We can enrich tracing in a generic way.

bwplotka avatar Feb 25 '20 13:02 bwplotka

If this issue is not in development, I can take a stab at it, it would come in handy.

jackskj avatar May 20 '20 23:05 jackskj

Yes please help! Make sure you to actually do it on v2 branch which will be released soon. See: https://github.com/grpc-ecosystem/go-grpc-middleware/issues/275

Also I think we might need help in https://github.com/grpc-ecosystem/go-grpc-middleware/issues/277 which might more interesting to solve (:

bwplotka avatar May 21 '20 07:05 bwplotka

Oh I see, #277 seems like a it should be resolved before this issue. If it’s not assigned to anyone, I can migrate over to opentracing-go

jackskj avatar May 21 '20 15:05 jackskj

However, pushing entire request in the spawn may cause unnecessarily large amount of data collection. Do you think using field option is a worthy addition?

syntax = "proto3";
import "google/protobuf/descriptor.proto";
package tracing;
extend google.protobuf.FieldOptions {
    bool trace = 50000;
}

message MyMessage {
    string stuff = 1 [(tracing.trace) = true];
}

jackskj avatar May 21 '20 17:05 jackskj

Well it depends on your method. Depends how big requests you have. (or responses). I would love to have this for certain methods (:

On Thu, 21 May 2020 at 18:10, Jack Juda [email protected] wrote:

However, pushing entire request in the spawn may cause unnecessarily large amount of data collection. Do you think using field option is a worthy addition? ` syntax = "proto3"; import "google/protobuf/descriptor.proto"; package tracing; extend google.protobuf.FieldOptions { bool trace = 50000; }

message MyMessage { string stuff = 1 [(tracing.trace) = true]; } `

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/grpc-ecosystem/go-grpc-middleware/issues/273#issuecomment-632230288, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABVA3O63Z6J6JYDCUTIYO2DRSVOA3ANCNFSM4K3JV6IQ .

bwplotka avatar May 21 '20 17:05 bwplotka