gapic-generator-java
gapic-generator-java copied to clipboard
Add "setSampledToLocalTracing" for Method Descriptor
Is your feature request related to a problem? Please describe. Customer is trying to use Spanner client and enabling gRPC OpenTelemetry Metrics. When trying to do so "Method" Attribute is always reported as "Other".
As per proposal A66 to get these methods to show up in metrics, setSampledToLocalTracing](https://github.com/grpc/grpc-java/blob/master/api/src/main/java/io/grpc/MethodDescriptor.java#L591) needs to set on the builder before registering the method.
Since the code for MethodDescriptor is autogenerated, generator should allow setting setSampledToLocalTracing
Describe the solution you'd like
Add setSampledToLocalTracing to the MethodDescriptor autogenerated code.
Do you expect it to be always enabled in java-spanner? Or enabled on-demand?
@blakeli0 I believe it should be enable on-demand, as it will impact all Client using auto-generator, not only Spanne