diff --git a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/grpc/GrpcServiceStubClassComposer.java b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/grpc/GrpcServiceStubClassComposer.java index 338ffbf9e7..455c507e0b 100644 --- a/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/grpc/GrpcServiceStubClassComposer.java +++ b/gapic-generator-java/src/main/java/com/google/api/generator/gapic/composer/grpc/GrpcServiceStubClassComposer.java @@ -22,6 +22,7 @@ import com.google.api.generator.engine.ast.Expr; import com.google.api.generator.engine.ast.ExprStatement; import com.google.api.generator.engine.ast.MethodInvocationExpr; +import com.google.api.generator.engine.ast.PrimitiveValue; import com.google.api.generator.engine.ast.ScopeNode; import com.google.api.generator.engine.ast.Statement; import com.google.api.generator.engine.ast.StringObjectValue; @@ -140,6 +141,16 @@ protected Statement createMethodDescriptorVariableDecl( .apply("setResponseMarshaller", protoUtilsMarshallerFn.apply(methodInvocationArg)) .apply(methodDescriptorMaker); + // The sampledToLocalTracing flag is set to true for all gRPC MethodDescriptors in GAPICs + // This flag enables captures for specific method names to help provide more detailed metrics + methodDescriptorMaker = + methodMakerFn + .apply( + "setSampledToLocalTracing", + ValueExpr.withValue( + PrimitiveValue.builder().setType(TypeNode.BOOLEAN).setValue("true").build())) + .apply(methodDescriptorMaker); + methodDescriptorMaker = MethodInvocationExpr.builder() .setMethodName("build") diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcAutoPopulateFieldStub.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcAutoPopulateFieldStub.golden index cfef350643..f3614d7226 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcAutoPopulateFieldStub.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcAutoPopulateFieldStub.golden @@ -42,6 +42,7 @@ public class GrpcAutoPopulateFieldTestingStub extends AutoPopulateFieldTestingSt ProtoUtils.marshaller(AutoPopulateFieldTestingEchoRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(AutoPopulateFieldTestingEchoResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor< @@ -57,6 +58,7 @@ public class GrpcAutoPopulateFieldTestingStub extends AutoPopulateFieldTestingSt ProtoUtils.marshaller(AutoPopulateFieldTestingExpandRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(AutoPopulateFieldTestingEchoResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor< @@ -72,6 +74,7 @@ public class GrpcAutoPopulateFieldTestingStub extends AutoPopulateFieldTestingSt ProtoUtils.marshaller(AutoPopulateFieldTestingEchoRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(AutoPopulateFieldTestingEchoResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor< @@ -87,6 +90,7 @@ public class GrpcAutoPopulateFieldTestingStub extends AutoPopulateFieldTestingSt ProtoUtils.marshaller(AutoPopulateFieldTestingEchoRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(AutoPopulateFieldTestingEchoResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable< diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcBigQueryJobServiceStub.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcBigQueryJobServiceStub.golden index c1c51ff44b..a6a08d1acb 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcBigQueryJobServiceStub.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcBigQueryJobServiceStub.golden @@ -35,6 +35,7 @@ public class GrpcJobServiceStub extends JobServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(JobProto.DeleteJobRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -45,6 +46,7 @@ public class GrpcJobServiceStub extends JobServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(JobProto.ListJobsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(JobProto.JobList.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable deleteJobCallable; diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcCallableNameTypeStub.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcCallableNameTypeStub.golden index b8f7271032..b3c396190a 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcCallableNameTypeStub.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcCallableNameTypeStub.golden @@ -33,6 +33,7 @@ public class GrpcCallableNameTypeServiceStub extends CallableNameTypeServiceStub .setRequestMarshaller( ProtoUtils.marshaller(GetApiOperationRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ApiOperation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -43,6 +44,7 @@ public class GrpcCallableNameTypeServiceStub extends CallableNameTypeServiceStub .setRequestMarshaller( ProtoUtils.marshaller(GetApiOperationRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ApiOperation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable getApiOperationCallable; diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcDeprecatedServiceStub.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcDeprecatedServiceStub.golden index b472790622..c225eb1a32 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcDeprecatedServiceStub.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcDeprecatedServiceStub.golden @@ -32,6 +32,7 @@ public class GrpcDeprecatedServiceStub extends DeprecatedServiceStub { .setFullMethodName("google.testdata.v1.DeprecatedService/FastFibonacci") .setRequestMarshaller(ProtoUtils.marshaller(FibonacciRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor slowFibonacciMethodDescriptor = @@ -40,6 +41,7 @@ public class GrpcDeprecatedServiceStub extends DeprecatedServiceStub { .setFullMethodName("google.testdata.v1.DeprecatedService/SlowFibonacci") .setRequestMarshaller(ProtoUtils.marshaller(FibonacciRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable fastFibonacciCallable; diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcEchoStub.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcEchoStub.golden index 7972dc929b..5068494115 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcEchoStub.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcEchoStub.golden @@ -49,6 +49,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.v1beta1.Echo/Echo") .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor expandMethodDescriptor = @@ -57,6 +58,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.v1beta1.Echo/Expand") .setRequestMarshaller(ProtoUtils.marshaller(ExpandRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor collectMethodDescriptor = @@ -65,6 +67,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.v1beta1.Echo/Collect") .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor chatMethodDescriptor = @@ -73,6 +76,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.v1beta1.Echo/Chat") .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor chatAgainMethodDescriptor = @@ -81,6 +85,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.v1beta1.Echo/ChatAgain") .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -91,6 +96,7 @@ public class GrpcEchoStub extends EchoStub { .setRequestMarshaller(ProtoUtils.marshaller(PagedExpandRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(PagedExpandResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -101,6 +107,7 @@ public class GrpcEchoStub extends EchoStub { .setRequestMarshaller(ProtoUtils.marshaller(PagedExpandRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(PagedExpandResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor waitMethodDescriptor = @@ -109,6 +116,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.v1beta1.Echo/Wait") .setRequestMarshaller(ProtoUtils.marshaller(WaitRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor blockMethodDescriptor = @@ -117,6 +125,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.v1beta1.Echo/Block") .setRequestMarshaller(ProtoUtils.marshaller(BlockRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(BlockResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor collideNameMethodDescriptor = @@ -125,6 +134,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.v1beta1.Echo/CollideName") .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Object.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -136,6 +146,7 @@ public class GrpcEchoStub extends EchoStub { ProtoUtils.marshaller(PagedExpandLegacyRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(PagedExpandResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable echoCallable; diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcLoggingStub.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcLoggingStub.golden index 00931520dc..d05cd0ad46 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcLoggingStub.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcLoggingStub.golden @@ -46,6 +46,7 @@ public class GrpcLoggingServiceV2Stub extends LoggingServiceV2Stub { .setFullMethodName("google.logging.v2.LoggingServiceV2/DeleteLog") .setRequestMarshaller(ProtoUtils.marshaller(DeleteLogRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -57,6 +58,7 @@ public class GrpcLoggingServiceV2Stub extends LoggingServiceV2Stub { ProtoUtils.marshaller(WriteLogEntriesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(WriteLogEntriesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -68,6 +70,7 @@ public class GrpcLoggingServiceV2Stub extends LoggingServiceV2Stub { ProtoUtils.marshaller(ListLogEntriesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListLogEntriesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor< @@ -85,6 +88,7 @@ public class GrpcLoggingServiceV2Stub extends LoggingServiceV2Stub { .setResponseMarshaller( ProtoUtils.marshaller( ListMonitoredResourceDescriptorsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -94,6 +98,7 @@ public class GrpcLoggingServiceV2Stub extends LoggingServiceV2Stub { .setFullMethodName("google.logging.v2.LoggingServiceV2/ListLogs") .setRequestMarshaller(ProtoUtils.marshaller(ListLogsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListLogsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -105,6 +110,7 @@ public class GrpcLoggingServiceV2Stub extends LoggingServiceV2Stub { ProtoUtils.marshaller(TailLogEntriesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TailLogEntriesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable deleteLogCallable; diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcPublisherStub.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcPublisherStub.golden index ceef5178af..863dda39e1 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcPublisherStub.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcPublisherStub.golden @@ -48,6 +48,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.pubsub.v1.Publisher/CreateTopic") .setRequestMarshaller(ProtoUtils.marshaller(Topic.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Topic.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor updateTopicMethodDescriptor = @@ -56,6 +57,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.pubsub.v1.Publisher/UpdateTopic") .setRequestMarshaller(ProtoUtils.marshaller(UpdateTopicRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Topic.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor publishMethodDescriptor = @@ -64,6 +66,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.pubsub.v1.Publisher/Publish") .setRequestMarshaller(ProtoUtils.marshaller(PublishRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(PublishResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getTopicMethodDescriptor = @@ -72,6 +75,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.pubsub.v1.Publisher/GetTopic") .setRequestMarshaller(ProtoUtils.marshaller(GetTopicRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Topic.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -81,6 +85,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.pubsub.v1.Publisher/ListTopics") .setRequestMarshaller(ProtoUtils.marshaller(ListTopicsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListTopicsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor< @@ -94,6 +99,7 @@ public class GrpcPublisherStub extends PublisherStub { ProtoUtils.marshaller(ListTopicSubscriptionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListTopicSubscriptionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -105,6 +111,7 @@ public class GrpcPublisherStub extends PublisherStub { ProtoUtils.marshaller(ListTopicSnapshotsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListTopicSnapshotsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteTopicMethodDescriptor = @@ -113,6 +120,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.pubsub.v1.Publisher/DeleteTopic") .setRequestMarshaller(ProtoUtils.marshaller(DeleteTopicRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -124,6 +132,7 @@ public class GrpcPublisherStub extends PublisherStub { ProtoUtils.marshaller(DetachSubscriptionRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(DetachSubscriptionResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable createTopicCallable; diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcRoutingHeadersStub.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcRoutingHeadersStub.golden index 2979cd27f3..26b66097b5 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcRoutingHeadersStub.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcRoutingHeadersStub.golden @@ -37,6 +37,7 @@ public class GrpcExplicitDynamicRoutingHeaderTestingStub "google.explicit.dynamic.routing.header.ExplicitDynamicRoutingHeaderTesting/Example1Test") .setRequestMarshaller(ProtoUtils.marshaller(Request.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor example2TestMethodDescriptor = @@ -46,6 +47,7 @@ public class GrpcExplicitDynamicRoutingHeaderTestingStub "google.explicit.dynamic.routing.header.ExplicitDynamicRoutingHeaderTesting/Example2Test") .setRequestMarshaller(ProtoUtils.marshaller(Request.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor example3TestMethodDescriptor = @@ -55,6 +57,7 @@ public class GrpcExplicitDynamicRoutingHeaderTestingStub "google.explicit.dynamic.routing.header.ExplicitDynamicRoutingHeaderTesting/Example3Test") .setRequestMarshaller(ProtoUtils.marshaller(Request.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor example3CTestMethodDescriptor = @@ -64,6 +67,7 @@ public class GrpcExplicitDynamicRoutingHeaderTestingStub "google.explicit.dynamic.routing.header.ExplicitDynamicRoutingHeaderTesting/Example3CTest") .setRequestMarshaller(ProtoUtils.marshaller(Request.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor example4TestMethodDescriptor = @@ -73,6 +77,7 @@ public class GrpcExplicitDynamicRoutingHeaderTestingStub "google.explicit.dynamic.routing.header.ExplicitDynamicRoutingHeaderTesting/Example4Test") .setRequestMarshaller(ProtoUtils.marshaller(Request.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor example5TestMethodDescriptor = @@ -82,6 +87,7 @@ public class GrpcExplicitDynamicRoutingHeaderTestingStub "google.explicit.dynamic.routing.header.ExplicitDynamicRoutingHeaderTesting/Example5Test") .setRequestMarshaller(ProtoUtils.marshaller(Request.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor example6TestMethodDescriptor = @@ -91,6 +97,7 @@ public class GrpcExplicitDynamicRoutingHeaderTestingStub "google.explicit.dynamic.routing.header.ExplicitDynamicRoutingHeaderTesting/Example6Test") .setRequestMarshaller(ProtoUtils.marshaller(Request.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor example7TestMethodDescriptor = @@ -100,6 +107,7 @@ public class GrpcExplicitDynamicRoutingHeaderTestingStub "google.explicit.dynamic.routing.header.ExplicitDynamicRoutingHeaderTesting/Example7Test") .setRequestMarshaller(ProtoUtils.marshaller(Request.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor example8TestMethodDescriptor = @@ -109,6 +117,7 @@ public class GrpcExplicitDynamicRoutingHeaderTestingStub "google.explicit.dynamic.routing.header.ExplicitDynamicRoutingHeaderTesting/Example8Test") .setRequestMarshaller(ProtoUtils.marshaller(Request.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor example9TestMethodDescriptor = @@ -118,6 +127,7 @@ public class GrpcExplicitDynamicRoutingHeaderTestingStub "google.explicit.dynamic.routing.header.ExplicitDynamicRoutingHeaderTesting/Example9Test") .setRequestMarshaller(ProtoUtils.marshaller(Request.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor backwardsCompatible1TestMethodDescriptor = @@ -127,6 +137,7 @@ public class GrpcExplicitDynamicRoutingHeaderTestingStub "google.explicit.dynamic.routing.header.ExplicitDynamicRoutingHeaderTesting/BackwardsCompatible1Test") .setRequestMarshaller(ProtoUtils.marshaller(Request.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor backwardsCompatible2TestMethodDescriptor = @@ -136,6 +147,7 @@ public class GrpcExplicitDynamicRoutingHeaderTestingStub "google.explicit.dynamic.routing.header.ExplicitDynamicRoutingHeaderTesting/BackwardsCompatible2Test") .setRequestMarshaller(ProtoUtils.marshaller(Request.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor backwardsCompatible3TestMethodDescriptor = @@ -145,6 +157,7 @@ public class GrpcExplicitDynamicRoutingHeaderTestingStub "google.explicit.dynamic.routing.header.ExplicitDynamicRoutingHeaderTesting/BackwardsCompatible3Test") .setRequestMarshaller(ProtoUtils.marshaller(Request.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -156,6 +169,7 @@ public class GrpcExplicitDynamicRoutingHeaderTestingStub .setRequestMarshaller( ProtoUtils.marshaller(RequestWithNestedField.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -166,6 +180,7 @@ public class GrpcExplicitDynamicRoutingHeaderTestingStub "google.explicit.dynamic.routing.header.ExplicitDynamicRoutingHeaderTesting/ImplicitRoutingHeaderWithEnumTest") .setRequestMarshaller(ProtoUtils.marshaller(EnumRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EnumResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable example1TestCallable; diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcTestingStub.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcTestingStub.golden index b3c92a772e..fefc927080 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcTestingStub.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpc/goldens/GrpcTestingStub.golden @@ -53,6 +53,7 @@ public class GrpcTestingStub extends TestingStub { .setRequestMarshaller( ProtoUtils.marshaller(CreateSessionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Session.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getSessionMethodDescriptor = @@ -61,6 +62,7 @@ public class GrpcTestingStub extends TestingStub { .setFullMethodName("google.showcase.v1beta1.Testing/GetSession") .setRequestMarshaller(ProtoUtils.marshaller(GetSessionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Session.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -71,6 +73,7 @@ public class GrpcTestingStub extends TestingStub { .setRequestMarshaller(ProtoUtils.marshaller(ListSessionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListSessionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteSessionMethodDescriptor = @@ -79,6 +82,7 @@ public class GrpcTestingStub extends TestingStub { .setFullMethodName("google.showcase.v1beta1.Testing/DeleteSession") .setRequestMarshaller(ProtoUtils.marshaller(DeleteSessionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -90,6 +94,7 @@ public class GrpcTestingStub extends TestingStub { ProtoUtils.marshaller(ReportSessionRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ReportSessionResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getTestMethodDescriptor = @@ -98,6 +103,7 @@ public class GrpcTestingStub extends TestingStub { .setFullMethodName("google.showcase.v1beta1.Testing/GetTest") .setRequestMarshaller(ProtoUtils.marshaller(GetTestRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Test.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -107,6 +113,7 @@ public class GrpcTestingStub extends TestingStub { .setFullMethodName("google.showcase.v1beta1.Testing/ListTests") .setRequestMarshaller(ProtoUtils.marshaller(ListTestsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListTestsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteTestMethodDescriptor = @@ -115,6 +122,7 @@ public class GrpcTestingStub extends TestingStub { .setFullMethodName("google.showcase.v1beta1.Testing/DeleteTest") .setRequestMarshaller(ProtoUtils.marshaller(DeleteTestRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -124,6 +132,7 @@ public class GrpcTestingStub extends TestingStub { .setFullMethodName("google.showcase.v1beta1.Testing/VerifyTest") .setRequestMarshaller(ProtoUtils.marshaller(VerifyTestRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(VerifyTestResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable createSessionCallable; diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/GrpcEchoStub.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/GrpcEchoStub.golden index c52c8d3f07..180b0456dc 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/GrpcEchoStub.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/GrpcEchoStub.golden @@ -51,6 +51,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.grpcrest.v1beta1.Echo/Echo") .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor expandMethodDescriptor = @@ -59,6 +60,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.grpcrest.v1beta1.Echo/Expand") .setRequestMarshaller(ProtoUtils.marshaller(ExpandRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -69,6 +71,7 @@ public class GrpcEchoStub extends EchoStub { .setRequestMarshaller(ProtoUtils.marshaller(PagedExpandRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(PagedExpandResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -79,6 +82,7 @@ public class GrpcEchoStub extends EchoStub { .setRequestMarshaller(ProtoUtils.marshaller(PagedExpandRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(PagedExpandResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor waitMethodDescriptor = @@ -87,6 +91,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.grpcrest.v1beta1.Echo/Wait") .setRequestMarshaller(ProtoUtils.marshaller(WaitRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor blockMethodDescriptor = @@ -95,6 +100,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.grpcrest.v1beta1.Echo/Block") .setRequestMarshaller(ProtoUtils.marshaller(BlockRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(BlockResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor collideNameMethodDescriptor = @@ -103,6 +109,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.grpcrest.v1beta1.Echo/CollideName") .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Object.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor nestedBindingMethodDescriptor = @@ -111,6 +118,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.grpcrest.v1beta1.Echo/NestedBinding") .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Object.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor chatMethodDescriptor = @@ -119,6 +127,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.grpcrest.v1beta1.Echo/Chat") .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor noBindingMethodDescriptor = @@ -127,6 +136,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.grpcrest.v1beta1.Echo/NoBinding") .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor updateCaseMethodDescriptor = @@ -135,6 +145,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.grpcrest.v1beta1.Echo/UpdateCase") .setRequestMarshaller(ProtoUtils.marshaller(UpdateCaseRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Case.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable echoCallable; diff --git a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/GrpcWickedStub.golden b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/GrpcWickedStub.golden index a4accaa5ae..c421c2a8a6 100644 --- a/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/GrpcWickedStub.golden +++ b/gapic-generator-java/src/test/java/com/google/api/generator/gapic/composer/grpcrest/goldens/GrpcWickedStub.golden @@ -33,6 +33,7 @@ public class GrpcWickedStub extends WickedStub { .setFullMethodName("google.showcase.v1beta1.Wicked/CraftEvilPlan") .setRequestMarshaller(ProtoUtils.marshaller(EvilRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EvilResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -42,6 +43,7 @@ public class GrpcWickedStub extends WickedStub { .setFullMethodName("google.showcase.v1beta1.Wicked/BrainstormEvilPlans") .setRequestMarshaller(ProtoUtils.marshaller(EvilRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EvilResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -51,6 +53,7 @@ public class GrpcWickedStub extends WickedStub { .setFullMethodName("google.showcase.v1beta1.Wicked/PersuadeEvilPlan") .setRequestMarshaller(ProtoUtils.marshaller(EvilRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EvilResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable craftEvilPlanCallable; diff --git a/java-showcase/gapic-showcase/pom.xml b/java-showcase/gapic-showcase/pom.xml index 0d33fbfe34..0f2dcc6b4a 100644 --- a/java-showcase/gapic-showcase/pom.xml +++ b/java-showcase/gapic-showcase/pom.xml @@ -96,6 +96,11 @@ com.google.protobuf protobuf-java + + + io.grpc + grpc-opentelemetry + com.google.api.grpc proto-google-common-protos diff --git a/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcComplianceStub.java b/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcComplianceStub.java index 82b27f82f4..1b4ff86061 100644 --- a/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcComplianceStub.java +++ b/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcComplianceStub.java @@ -62,6 +62,7 @@ public class GrpcComplianceStub extends ComplianceStub { .setFullMethodName("google.showcase.v1beta1.Compliance/RepeatDataBody") .setRequestMarshaller(ProtoUtils.marshaller(RepeatRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(RepeatResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -71,6 +72,7 @@ public class GrpcComplianceStub extends ComplianceStub { .setFullMethodName("google.showcase.v1beta1.Compliance/RepeatDataBodyInfo") .setRequestMarshaller(ProtoUtils.marshaller(RepeatRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(RepeatResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -80,6 +82,7 @@ public class GrpcComplianceStub extends ComplianceStub { .setFullMethodName("google.showcase.v1beta1.Compliance/RepeatDataQuery") .setRequestMarshaller(ProtoUtils.marshaller(RepeatRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(RepeatResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -89,6 +92,7 @@ public class GrpcComplianceStub extends ComplianceStub { .setFullMethodName("google.showcase.v1beta1.Compliance/RepeatDataSimplePath") .setRequestMarshaller(ProtoUtils.marshaller(RepeatRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(RepeatResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -98,6 +102,7 @@ public class GrpcComplianceStub extends ComplianceStub { .setFullMethodName("google.showcase.v1beta1.Compliance/RepeatDataPathResource") .setRequestMarshaller(ProtoUtils.marshaller(RepeatRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(RepeatResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -108,6 +113,7 @@ public class GrpcComplianceStub extends ComplianceStub { "google.showcase.v1beta1.Compliance/RepeatDataPathTrailingResource") .setRequestMarshaller(ProtoUtils.marshaller(RepeatRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(RepeatResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -117,6 +123,7 @@ public class GrpcComplianceStub extends ComplianceStub { .setFullMethodName("google.showcase.v1beta1.Compliance/RepeatDataBodyPut") .setRequestMarshaller(ProtoUtils.marshaller(RepeatRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(RepeatResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -126,6 +133,7 @@ public class GrpcComplianceStub extends ComplianceStub { .setFullMethodName("google.showcase.v1beta1.Compliance/RepeatDataBodyPatch") .setRequestMarshaller(ProtoUtils.marshaller(RepeatRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(RepeatResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getEnumMethodDescriptor = @@ -134,6 +142,7 @@ public class GrpcComplianceStub extends ComplianceStub { .setFullMethodName("google.showcase.v1beta1.Compliance/GetEnum") .setRequestMarshaller(ProtoUtils.marshaller(EnumRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EnumResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor verifyEnumMethodDescriptor = @@ -142,6 +151,7 @@ public class GrpcComplianceStub extends ComplianceStub { .setFullMethodName("google.showcase.v1beta1.Compliance/VerifyEnum") .setRequestMarshaller(ProtoUtils.marshaller(EnumResponse.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EnumResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -153,6 +163,7 @@ public class GrpcComplianceStub extends ComplianceStub { ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getLocationMethodDescriptor = @@ -161,6 +172,7 @@ public class GrpcComplianceStub extends ComplianceStub { .setFullMethodName("google.cloud.location.Locations/GetLocation") .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor setIamPolicyMethodDescriptor = @@ -169,6 +181,7 @@ public class GrpcComplianceStub extends ComplianceStub { .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getIamPolicyMethodDescriptor = @@ -177,6 +190,7 @@ public class GrpcComplianceStub extends ComplianceStub { .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -188,6 +202,7 @@ public class GrpcComplianceStub extends ComplianceStub { ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable repeatDataBodyCallable; diff --git a/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcEchoStub.java b/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcEchoStub.java index 1bbe21e29f..4a2d9820af 100644 --- a/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcEchoStub.java +++ b/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcEchoStub.java @@ -83,6 +83,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.v1beta1.Echo/Echo") .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -94,6 +95,7 @@ public class GrpcEchoStub extends EchoStub { ProtoUtils.marshaller(EchoErrorDetailsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(EchoErrorDetailsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -105,6 +107,7 @@ public class GrpcEchoStub extends EchoStub { ProtoUtils.marshaller(FailEchoWithDetailsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(FailEchoWithDetailsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor expandMethodDescriptor = @@ -113,6 +116,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.v1beta1.Echo/Expand") .setRequestMarshaller(ProtoUtils.marshaller(ExpandRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor collectMethodDescriptor = @@ -121,6 +125,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.v1beta1.Echo/Collect") .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor chatMethodDescriptor = @@ -129,6 +134,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.v1beta1.Echo/Chat") .setRequestMarshaller(ProtoUtils.marshaller(EchoRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EchoResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -139,6 +145,7 @@ public class GrpcEchoStub extends EchoStub { .setRequestMarshaller(ProtoUtils.marshaller(PagedExpandRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(PagedExpandResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -150,6 +157,7 @@ public class GrpcEchoStub extends EchoStub { ProtoUtils.marshaller(PagedExpandLegacyRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(PagedExpandResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -160,6 +168,7 @@ public class GrpcEchoStub extends EchoStub { .setRequestMarshaller(ProtoUtils.marshaller(PagedExpandRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(PagedExpandLegacyMappedResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor waitMethodDescriptor = @@ -168,6 +177,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.v1beta1.Echo/Wait") .setRequestMarshaller(ProtoUtils.marshaller(WaitRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor blockMethodDescriptor = @@ -176,6 +186,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.showcase.v1beta1.Echo/Block") .setRequestMarshaller(ProtoUtils.marshaller(BlockRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(BlockResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -187,6 +198,7 @@ public class GrpcEchoStub extends EchoStub { ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getLocationMethodDescriptor = @@ -195,6 +207,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.cloud.location.Locations/GetLocation") .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor setIamPolicyMethodDescriptor = @@ -203,6 +216,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getIamPolicyMethodDescriptor = @@ -211,6 +225,7 @@ public class GrpcEchoStub extends EchoStub { .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -222,6 +237,7 @@ public class GrpcEchoStub extends EchoStub { ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable echoCallable; diff --git a/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcIdentityStub.java b/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcIdentityStub.java index 5e59ebe371..5260967a52 100644 --- a/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcIdentityStub.java +++ b/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcIdentityStub.java @@ -66,6 +66,7 @@ public class GrpcIdentityStub extends IdentityStub { .setFullMethodName("google.showcase.v1beta1.Identity/CreateUser") .setRequestMarshaller(ProtoUtils.marshaller(CreateUserRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(User.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getUserMethodDescriptor = @@ -74,6 +75,7 @@ public class GrpcIdentityStub extends IdentityStub { .setFullMethodName("google.showcase.v1beta1.Identity/GetUser") .setRequestMarshaller(ProtoUtils.marshaller(GetUserRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(User.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor updateUserMethodDescriptor = @@ -82,6 +84,7 @@ public class GrpcIdentityStub extends IdentityStub { .setFullMethodName("google.showcase.v1beta1.Identity/UpdateUser") .setRequestMarshaller(ProtoUtils.marshaller(UpdateUserRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(User.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteUserMethodDescriptor = @@ -90,6 +93,7 @@ public class GrpcIdentityStub extends IdentityStub { .setFullMethodName("google.showcase.v1beta1.Identity/DeleteUser") .setRequestMarshaller(ProtoUtils.marshaller(DeleteUserRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -99,6 +103,7 @@ public class GrpcIdentityStub extends IdentityStub { .setFullMethodName("google.showcase.v1beta1.Identity/ListUsers") .setRequestMarshaller(ProtoUtils.marshaller(ListUsersRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListUsersResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -110,6 +115,7 @@ public class GrpcIdentityStub extends IdentityStub { ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getLocationMethodDescriptor = @@ -118,6 +124,7 @@ public class GrpcIdentityStub extends IdentityStub { .setFullMethodName("google.cloud.location.Locations/GetLocation") .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor setIamPolicyMethodDescriptor = @@ -126,6 +133,7 @@ public class GrpcIdentityStub extends IdentityStub { .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getIamPolicyMethodDescriptor = @@ -134,6 +142,7 @@ public class GrpcIdentityStub extends IdentityStub { .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -145,6 +154,7 @@ public class GrpcIdentityStub extends IdentityStub { ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable createUserCallable; diff --git a/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcMessagingStub.java b/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcMessagingStub.java index ad600b7bbf..2eb932b344 100644 --- a/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcMessagingStub.java +++ b/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcMessagingStub.java @@ -86,6 +86,7 @@ public class GrpcMessagingStub extends MessagingStub { .setFullMethodName("google.showcase.v1beta1.Messaging/CreateRoom") .setRequestMarshaller(ProtoUtils.marshaller(CreateRoomRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Room.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getRoomMethodDescriptor = @@ -94,6 +95,7 @@ public class GrpcMessagingStub extends MessagingStub { .setFullMethodName("google.showcase.v1beta1.Messaging/GetRoom") .setRequestMarshaller(ProtoUtils.marshaller(GetRoomRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Room.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor updateRoomMethodDescriptor = @@ -102,6 +104,7 @@ public class GrpcMessagingStub extends MessagingStub { .setFullMethodName("google.showcase.v1beta1.Messaging/UpdateRoom") .setRequestMarshaller(ProtoUtils.marshaller(UpdateRoomRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Room.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteRoomMethodDescriptor = @@ -110,6 +113,7 @@ public class GrpcMessagingStub extends MessagingStub { .setFullMethodName("google.showcase.v1beta1.Messaging/DeleteRoom") .setRequestMarshaller(ProtoUtils.marshaller(DeleteRoomRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -119,6 +123,7 @@ public class GrpcMessagingStub extends MessagingStub { .setFullMethodName("google.showcase.v1beta1.Messaging/ListRooms") .setRequestMarshaller(ProtoUtils.marshaller(ListRoomsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListRoomsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor createBlurbMethodDescriptor = @@ -127,6 +132,7 @@ public class GrpcMessagingStub extends MessagingStub { .setFullMethodName("google.showcase.v1beta1.Messaging/CreateBlurb") .setRequestMarshaller(ProtoUtils.marshaller(CreateBlurbRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Blurb.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getBlurbMethodDescriptor = @@ -135,6 +141,7 @@ public class GrpcMessagingStub extends MessagingStub { .setFullMethodName("google.showcase.v1beta1.Messaging/GetBlurb") .setRequestMarshaller(ProtoUtils.marshaller(GetBlurbRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Blurb.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor updateBlurbMethodDescriptor = @@ -143,6 +150,7 @@ public class GrpcMessagingStub extends MessagingStub { .setFullMethodName("google.showcase.v1beta1.Messaging/UpdateBlurb") .setRequestMarshaller(ProtoUtils.marshaller(UpdateBlurbRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Blurb.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteBlurbMethodDescriptor = @@ -151,6 +159,7 @@ public class GrpcMessagingStub extends MessagingStub { .setFullMethodName("google.showcase.v1beta1.Messaging/DeleteBlurb") .setRequestMarshaller(ProtoUtils.marshaller(DeleteBlurbRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -160,6 +169,7 @@ public class GrpcMessagingStub extends MessagingStub { .setFullMethodName("google.showcase.v1beta1.Messaging/ListBlurbs") .setRequestMarshaller(ProtoUtils.marshaller(ListBlurbsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListBlurbsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -169,6 +179,7 @@ public class GrpcMessagingStub extends MessagingStub { .setFullMethodName("google.showcase.v1beta1.Messaging/SearchBlurbs") .setRequestMarshaller(ProtoUtils.marshaller(SearchBlurbsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -179,6 +190,7 @@ public class GrpcMessagingStub extends MessagingStub { .setRequestMarshaller(ProtoUtils.marshaller(StreamBlurbsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(StreamBlurbsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -188,6 +200,7 @@ public class GrpcMessagingStub extends MessagingStub { .setFullMethodName("google.showcase.v1beta1.Messaging/SendBlurbs") .setRequestMarshaller(ProtoUtils.marshaller(CreateBlurbRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(SendBlurbsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -198,6 +211,7 @@ public class GrpcMessagingStub extends MessagingStub { .setRequestMarshaller(ProtoUtils.marshaller(ConnectRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(StreamBlurbsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -209,6 +223,7 @@ public class GrpcMessagingStub extends MessagingStub { ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getLocationMethodDescriptor = @@ -217,6 +232,7 @@ public class GrpcMessagingStub extends MessagingStub { .setFullMethodName("google.cloud.location.Locations/GetLocation") .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor setIamPolicyMethodDescriptor = @@ -225,6 +241,7 @@ public class GrpcMessagingStub extends MessagingStub { .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getIamPolicyMethodDescriptor = @@ -233,6 +250,7 @@ public class GrpcMessagingStub extends MessagingStub { .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -244,6 +262,7 @@ public class GrpcMessagingStub extends MessagingStub { ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable createRoomCallable; diff --git a/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcSequenceServiceStub.java b/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcSequenceServiceStub.java index c9c16d1bfe..90a06a2ea1 100644 --- a/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcSequenceServiceStub.java +++ b/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcSequenceServiceStub.java @@ -72,6 +72,7 @@ public class GrpcSequenceServiceStub extends SequenceServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(CreateSequenceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Sequence.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -82,6 +83,7 @@ public class GrpcSequenceServiceStub extends SequenceServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(CreateStreamingSequenceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(StreamingSequence.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -92,6 +94,7 @@ public class GrpcSequenceServiceStub extends SequenceServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(GetSequenceReportRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(SequenceReport.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -104,6 +107,7 @@ public class GrpcSequenceServiceStub extends SequenceServiceStub { ProtoUtils.marshaller(GetStreamingSequenceReportRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(StreamingSequenceReport.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -114,6 +118,7 @@ public class GrpcSequenceServiceStub extends SequenceServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(AttemptSequenceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor< @@ -127,6 +132,7 @@ public class GrpcSequenceServiceStub extends SequenceServiceStub { ProtoUtils.marshaller(AttemptStreamingSequenceRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(AttemptStreamingSequenceResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -138,6 +144,7 @@ public class GrpcSequenceServiceStub extends SequenceServiceStub { ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getLocationMethodDescriptor = @@ -146,6 +153,7 @@ public class GrpcSequenceServiceStub extends SequenceServiceStub { .setFullMethodName("google.cloud.location.Locations/GetLocation") .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor setIamPolicyMethodDescriptor = @@ -154,6 +162,7 @@ public class GrpcSequenceServiceStub extends SequenceServiceStub { .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getIamPolicyMethodDescriptor = @@ -162,6 +171,7 @@ public class GrpcSequenceServiceStub extends SequenceServiceStub { .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -173,6 +183,7 @@ public class GrpcSequenceServiceStub extends SequenceServiceStub { ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable createSequenceCallable; diff --git a/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcTestingStub.java b/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcTestingStub.java index da7dd3d281..b485b9f36d 100644 --- a/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcTestingStub.java +++ b/java-showcase/gapic-showcase/src/main/java/com/google/showcase/v1beta1/stub/GrpcTestingStub.java @@ -75,6 +75,7 @@ public class GrpcTestingStub extends TestingStub { .setRequestMarshaller( ProtoUtils.marshaller(CreateSessionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Session.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getSessionMethodDescriptor = @@ -83,6 +84,7 @@ public class GrpcTestingStub extends TestingStub { .setFullMethodName("google.showcase.v1beta1.Testing/GetSession") .setRequestMarshaller(ProtoUtils.marshaller(GetSessionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Session.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -93,6 +95,7 @@ public class GrpcTestingStub extends TestingStub { .setRequestMarshaller(ProtoUtils.marshaller(ListSessionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListSessionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteSessionMethodDescriptor = @@ -101,6 +104,7 @@ public class GrpcTestingStub extends TestingStub { .setFullMethodName("google.showcase.v1beta1.Testing/DeleteSession") .setRequestMarshaller(ProtoUtils.marshaller(DeleteSessionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -112,6 +116,7 @@ public class GrpcTestingStub extends TestingStub { ProtoUtils.marshaller(ReportSessionRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ReportSessionResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -121,6 +126,7 @@ public class GrpcTestingStub extends TestingStub { .setFullMethodName("google.showcase.v1beta1.Testing/ListTests") .setRequestMarshaller(ProtoUtils.marshaller(ListTestsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListTestsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteTestMethodDescriptor = @@ -129,6 +135,7 @@ public class GrpcTestingStub extends TestingStub { .setFullMethodName("google.showcase.v1beta1.Testing/DeleteTest") .setRequestMarshaller(ProtoUtils.marshaller(DeleteTestRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -138,6 +145,7 @@ public class GrpcTestingStub extends TestingStub { .setFullMethodName("google.showcase.v1beta1.Testing/VerifyTest") .setRequestMarshaller(ProtoUtils.marshaller(VerifyTestRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(VerifyTestResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -149,6 +157,7 @@ public class GrpcTestingStub extends TestingStub { ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getLocationMethodDescriptor = @@ -157,6 +166,7 @@ public class GrpcTestingStub extends TestingStub { .setFullMethodName("google.cloud.location.Locations/GetLocation") .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor setIamPolicyMethodDescriptor = @@ -165,6 +175,7 @@ public class GrpcTestingStub extends TestingStub { .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getIamPolicyMethodDescriptor = @@ -173,6 +184,7 @@ public class GrpcTestingStub extends TestingStub { .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -184,6 +196,7 @@ public class GrpcTestingStub extends TestingStub { ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable createSessionCallable; diff --git a/java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITOtelMetrics.java b/java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITOtelMetrics.java index e0577b105e..06f46deee8 100644 --- a/java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITOtelMetrics.java +++ b/java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/ITOtelMetrics.java @@ -30,9 +30,10 @@ package com.google.showcase.v1beta1.it; -import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.Assert.assertThrows; import com.google.api.client.http.javanet.NetHttpTransport; +import com.google.api.core.ApiFunction; import com.google.api.core.ApiFuture; import com.google.api.gax.core.NoCredentialsProvider; import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; @@ -59,6 +60,7 @@ import com.google.showcase.v1beta1.stub.EchoStub; import com.google.showcase.v1beta1.stub.EchoStubSettings; import io.grpc.ManagedChannelBuilder; +import io.grpc.opentelemetry.GrpcOpenTelemetry; import io.opentelemetry.api.OpenTelemetry; import io.opentelemetry.api.common.AttributeKey; import io.opentelemetry.api.common.Attributes; @@ -76,9 +78,11 @@ import java.util.List; import java.util.Map; import java.util.Optional; +import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.function.Predicate; +import java.util.stream.Collectors; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.BeforeEach; @@ -102,8 +106,13 @@ class ITOtelMetrics { private static final String OPERATION_COUNT = SERVICE_NAME + "/operation_count"; private static final String ATTEMPT_LATENCY = SERVICE_NAME + "/attempt_latency"; private static final String OPERATION_LATENCY = SERVICE_NAME + "/operation_latency"; - private static final int NUM_DEFAULT_METRICS = 4; - private static final int NUM_COLLECTION_FLUSH_ATTEMPTS = 10; + private static final Set GAX_METRICS = + ImmutableSet.of(ATTEMPT_COUNT, OPERATION_COUNT, ATTEMPT_LATENCY, OPERATION_LATENCY); + + // Gax provides four metrics by default. This number may change as new metrics are added. + private static final int NUM_GAX_OTEL_METRICS = 4; + private static final int NUM_DEFAULT_FLUSH_ATTEMPTS = 10; + private InMemoryMetricReader inMemoryMetricReader; private EchoClient grpcClient; private EchoClient httpClient; @@ -157,7 +166,8 @@ void setup() throws Exception { } @AfterEach - void cleanup() throws InterruptedException { + void cleanup() throws InterruptedException, IOException { + inMemoryMetricReader.close(); inMemoryMetricReader.shutdown(); grpcClient.close(); @@ -286,17 +296,25 @@ private List getMetricDataList() throws InterruptedException { */ private List getMetricDataList(InMemoryMetricReader metricReader) throws InterruptedException { - for (int i = 0; i < NUM_COLLECTION_FLUSH_ATTEMPTS; i++) { + for (int i = 0; i < NUM_DEFAULT_FLUSH_ATTEMPTS; i++) { Thread.sleep(1000L); List metricData = new ArrayList<>(metricReader.collectAllMetrics()); - if (metricData.size() == NUM_DEFAULT_METRICS) { + // Depending on the OpenTelemetry instance (i.e. OpenTelemetry, GrpcOpenTelemetry, etc.) + // there may be additional metrics recorded. Only check to ensure the Gax Metrics + // are recorded properly. Any additional metrics are fine to be passed. + if (metricData.size() >= NUM_GAX_OTEL_METRICS && areAllGaxMetricsRecorded(metricData)) { return metricData; } } - Assertions.fail("Unable to collect all the metrics required for the test"); + Assertions.fail("Unable to collect all the GAX metrics required for the test"); return new ArrayList<>(); } + private boolean areAllGaxMetricsRecorded(List metricData) { + return metricData.stream().filter(data -> GAX_METRICS.contains(data.getName())).count() + == NUM_GAX_OTEL_METRICS; + } + @Test void testGrpc_operationSucceeded_recordsMetrics() throws InterruptedException { int attemptCount = 1; @@ -830,7 +848,75 @@ void recordsCustomAttributes() throws InterruptedException, IOException { randomAttributeKey2, randomAttributeValue2); verifyDefaultMetricsAttributes(actualMetricDataList, expectedAttributes); + } - inMemoryMetricReader.close(); + // This test case uses GrpcOpenTelemetry from grpc-java and includes additional grpc-java specific + // metrics. This test case ensures that the `setSampledToLocalTracing` set to true will ensure + // that + // the gRPC full method name in the stub is recorded (not recorded as `other`). + @Test + void grpcOpenTelemetryImplementation_setSampledToLocalTracing_methodFullNameIsRecorded() + throws Exception { + SdkMeterProvider sdkMeterProvider = + SdkMeterProvider.builder().registerMetricReader(inMemoryMetricReader).build(); + + OpenTelemetry openTelemetry = + OpenTelemetrySdk.builder().setMeterProvider(sdkMeterProvider).build(); + + GrpcOpenTelemetry grpcOpenTelemetry = GrpcOpenTelemetry.newBuilder().sdk(openTelemetry).build(); + + // Java-Spanner configures the InstantiatingGrpcChannelProvider with gRPCOpenTelemetry + // This setup below is copied from their implementation + InstantiatingGrpcChannelProvider.Builder builder = + EchoSettings.defaultGrpcTransportProviderBuilder(); + ApiFunction channelConfigurator = + builder.getChannelConfigurator(); + builder.setChannelConfigurator( + b -> { + b.usePlaintext(); + grpcOpenTelemetry.configureChannelBuilder(b); + if (channelConfigurator != null) { + return channelConfigurator.apply(b); + } + return b; + }); + + OpenTelemetryMetricsRecorder otelMetricsRecorder = + new OpenTelemetryMetricsRecorder(openTelemetry, SERVICE_NAME); + + // Create a custom EchoClient that is different from what is created by default in setup() + EchoClient echoClient = + TestClientInitializer.createGrpcEchoClientOpentelemetry( + new MetricsTracerFactory(otelMetricsRecorder), builder.build()); + + EchoRequest echoRequest = + EchoRequest.newBuilder().setContent("test_grpc_request_succeeded").build(); + echoClient.echo(echoRequest); + + List metricDataList = getMetricDataList(); + + String gRPCMetricNamePrefix = "grpc."; + String gRPCMethodNameAttributeKey = "grpc.method"; + + List grpcMetricDataList = + metricDataList.stream() + .filter(x -> x.getName().startsWith(gRPCMetricNamePrefix)) + .collect(Collectors.toList()); + Truth.assertThat(grpcMetricDataList).isNotEmpty(); + for (MetricData grpcMetricData : grpcMetricDataList) { + List pointDataList = new ArrayList<>(grpcMetricData.getData().getPoints()); + + for (PointData pointData : pointDataList) { + String methodName = + pointData.getAttributes().get(AttributeKey.stringKey(gRPCMethodNameAttributeKey)); + + // All the attributes in the gRPC metrics should have the full method name + Truth.assertThat(methodName).doesNotMatch("other"); + Truth.assertThat(methodName).matches("^google.showcase.v1beta1.Echo/.*$"); + } + } + + echoClient.close(); + echoClient.awaitTermination(TestClientInitializer.AWAIT_TERMINATION_SECONDS, TimeUnit.SECONDS); } } diff --git a/java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/util/TestClientInitializer.java b/java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/util/TestClientInitializer.java index 24f56eef61..a3db1a00e3 100644 --- a/java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/util/TestClientInitializer.java +++ b/java-showcase/gapic-showcase/src/test/java/com/google/showcase/v1beta1/it/util/TestClientInitializer.java @@ -23,6 +23,7 @@ import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; import com.google.api.gax.retrying.RetrySettings; import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.TransportChannelProvider; import com.google.api.gax.rpc.UnaryCallSettings; import com.google.api.gax.tracing.ApiTracerFactory; import com.google.common.collect.ImmutableList; @@ -289,14 +290,20 @@ public static ComplianceClient createHttpJsonComplianceClient( public static EchoClient createGrpcEchoClientOpentelemetry(ApiTracerFactory metricsTracerFactory) throws Exception { + return createGrpcEchoClientOpentelemetry( + metricsTracerFactory, + EchoSettings.defaultGrpcTransportProviderBuilder() + .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) + .build()); + } + public static EchoClient createGrpcEchoClientOpentelemetry( + ApiTracerFactory metricsTracerFactory, TransportChannelProvider transportChannelProvider) + throws Exception { EchoSettings grpcEchoSettings = EchoSettings.newBuilder() .setCredentialsProvider(NoCredentialsProvider.create()) - .setTransportChannelProvider( - EchoSettings.defaultGrpcTransportProviderBuilder() - .setChannelConfigurator(ManagedChannelBuilder::usePlaintext) - .build()) + .setTransportChannelProvider(transportChannelProvider) .setEndpoint(DEFAULT_GRPC_ENDPOINT) .build(); diff --git a/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/stub/GrpcConnectionServiceStub.java b/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/stub/GrpcConnectionServiceStub.java index 5cd424c554..9aa014da38 100644 --- a/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/stub/GrpcConnectionServiceStub.java +++ b/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/stub/GrpcConnectionServiceStub.java @@ -52,6 +52,7 @@ public class GrpcConnectionServiceStub extends ConnectionServiceStub { ProtoUtils.marshaller(ListConnectionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListConnectionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable diff --git a/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/stub/GrpcTetherStub.java b/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/stub/GrpcTetherStub.java index fad59f5a91..bdf24d80b8 100644 --- a/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/stub/GrpcTetherStub.java +++ b/test/integration/goldens/apigeeconnect/src/com/google/cloud/apigeeconnect/v1/stub/GrpcTetherStub.java @@ -45,6 +45,7 @@ public class GrpcTetherStub extends TetherStub { .setFullMethodName("google.cloud.apigeeconnect.v1.Tether/Egress") .setRequestMarshaller(ProtoUtils.marshaller(EgressResponse.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EgressRequest.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final BidiStreamingCallable egressCallable; diff --git a/test/integration/goldens/asset/src/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java b/test/integration/goldens/asset/src/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java index 39ca6167fb..c468e79b15 100644 --- a/test/integration/goldens/asset/src/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java +++ b/test/integration/goldens/asset/src/com/google/cloud/asset/v1/stub/GrpcAssetServiceStub.java @@ -89,6 +89,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { .setFullMethodName("google.cloud.asset.v1.AssetService/ExportAssets") .setRequestMarshaller(ProtoUtils.marshaller(ExportAssetsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -98,6 +99,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { .setFullMethodName("google.cloud.asset.v1.AssetService/ListAssets") .setRequestMarshaller(ProtoUtils.marshaller(ListAssetsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListAssetsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -109,6 +111,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { ProtoUtils.marshaller(BatchGetAssetsHistoryRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(BatchGetAssetsHistoryResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor createFeedMethodDescriptor = @@ -117,6 +120,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { .setFullMethodName("google.cloud.asset.v1.AssetService/CreateFeed") .setRequestMarshaller(ProtoUtils.marshaller(CreateFeedRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Feed.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getFeedMethodDescriptor = @@ -125,6 +129,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { .setFullMethodName("google.cloud.asset.v1.AssetService/GetFeed") .setRequestMarshaller(ProtoUtils.marshaller(GetFeedRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Feed.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -134,6 +139,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { .setFullMethodName("google.cloud.asset.v1.AssetService/ListFeeds") .setRequestMarshaller(ProtoUtils.marshaller(ListFeedsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListFeedsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor updateFeedMethodDescriptor = @@ -142,6 +148,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { .setFullMethodName("google.cloud.asset.v1.AssetService/UpdateFeed") .setRequestMarshaller(ProtoUtils.marshaller(UpdateFeedRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Feed.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteFeedMethodDescriptor = @@ -150,6 +157,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { .setFullMethodName("google.cloud.asset.v1.AssetService/DeleteFeed") .setRequestMarshaller(ProtoUtils.marshaller(DeleteFeedRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -161,6 +169,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { ProtoUtils.marshaller(SearchAllResourcesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(SearchAllResourcesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -172,6 +181,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { ProtoUtils.marshaller(SearchAllIamPoliciesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(SearchAllIamPoliciesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -183,6 +193,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { ProtoUtils.marshaller(AnalyzeIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(AnalyzeIamPolicyResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -193,6 +204,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(AnalyzeIamPolicyLongrunningRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -203,6 +215,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(AnalyzeMoveRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(AnalyzeMoveResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -213,6 +226,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(QueryAssetsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(QueryAssetsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -223,6 +237,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(CreateSavedQueryRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(SavedQuery.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -233,6 +248,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(GetSavedQueryRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(SavedQuery.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -244,6 +260,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { ProtoUtils.marshaller(ListSavedQueriesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListSavedQueriesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -254,6 +271,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(UpdateSavedQueryRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(SavedQuery.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -264,6 +282,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(DeleteSavedQueryRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor< @@ -278,6 +297,7 @@ public class GrpcAssetServiceStub extends AssetServiceStub { ProtoUtils.marshaller(BatchGetEffectiveIamPoliciesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(BatchGetEffectiveIamPoliciesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable exportAssetsCallable; diff --git a/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java b/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java index 307a7e2da0..f3c10b3489 100644 --- a/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java +++ b/test/integration/goldens/bigtable/src/com/google/cloud/bigtable/data/v2/stub/GrpcBigtableStub.java @@ -62,6 +62,7 @@ public class GrpcBigtableStub extends BigtableStub { .setFullMethodName("google.bigtable.v2.Bigtable/ReadRows") .setRequestMarshaller(ProtoUtils.marshaller(ReadRowsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ReadRowsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -73,6 +74,7 @@ public class GrpcBigtableStub extends BigtableStub { ProtoUtils.marshaller(SampleRowKeysRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(SampleRowKeysResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -82,6 +84,7 @@ public class GrpcBigtableStub extends BigtableStub { .setFullMethodName("google.bigtable.v2.Bigtable/MutateRow") .setRequestMarshaller(ProtoUtils.marshaller(MutateRowRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(MutateRowResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -91,6 +94,7 @@ public class GrpcBigtableStub extends BigtableStub { .setFullMethodName("google.bigtable.v2.Bigtable/MutateRows") .setRequestMarshaller(ProtoUtils.marshaller(MutateRowsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(MutateRowsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -102,6 +106,7 @@ public class GrpcBigtableStub extends BigtableStub { ProtoUtils.marshaller(CheckAndMutateRowRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(CheckAndMutateRowResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -112,6 +117,7 @@ public class GrpcBigtableStub extends BigtableStub { .setRequestMarshaller(ProtoUtils.marshaller(PingAndWarmRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(PingAndWarmResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -123,6 +129,7 @@ public class GrpcBigtableStub extends BigtableStub { ProtoUtils.marshaller(ReadModifyWriteRowRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ReadModifyWriteRowResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final ServerStreamingCallable readRowsCallable; diff --git a/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/stub/GrpcIamCredentialsStub.java b/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/stub/GrpcIamCredentialsStub.java index 237e5a6d03..f3597caf8c 100644 --- a/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/stub/GrpcIamCredentialsStub.java +++ b/test/integration/goldens/credentials/src/com/google/cloud/iam/credentials/v1/stub/GrpcIamCredentialsStub.java @@ -56,6 +56,7 @@ public class GrpcIamCredentialsStub extends IamCredentialsStub { ProtoUtils.marshaller(GenerateAccessTokenRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(GenerateAccessTokenResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -67,6 +68,7 @@ public class GrpcIamCredentialsStub extends IamCredentialsStub { ProtoUtils.marshaller(GenerateIdTokenRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(GenerateIdTokenResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -76,6 +78,7 @@ public class GrpcIamCredentialsStub extends IamCredentialsStub { .setFullMethodName("google.iam.credentials.v1.IAMCredentials/SignBlob") .setRequestMarshaller(ProtoUtils.marshaller(SignBlobRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(SignBlobResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor signJwtMethodDescriptor = @@ -84,6 +87,7 @@ public class GrpcIamCredentialsStub extends IamCredentialsStub { .setFullMethodName("google.iam.credentials.v1.IAMCredentials/SignJwt") .setRequestMarshaller(ProtoUtils.marshaller(SignJwtRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(SignJwtResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable diff --git a/test/integration/goldens/iam/src/com/google/iam/v1/stub/GrpcIAMPolicyStub.java b/test/integration/goldens/iam/src/com/google/iam/v1/stub/GrpcIAMPolicyStub.java index 7ad79d35f4..f7412f0e1c 100644 --- a/test/integration/goldens/iam/src/com/google/iam/v1/stub/GrpcIAMPolicyStub.java +++ b/test/integration/goldens/iam/src/com/google/iam/v1/stub/GrpcIAMPolicyStub.java @@ -50,6 +50,7 @@ public class GrpcIAMPolicyStub extends IAMPolicyStub { .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getIamPolicyMethodDescriptor = @@ -58,6 +59,7 @@ public class GrpcIAMPolicyStub extends IAMPolicyStub { .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -69,6 +71,7 @@ public class GrpcIAMPolicyStub extends IAMPolicyStub { ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable setIamPolicyCallable; diff --git a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/stub/GrpcKeyManagementServiceStub.java b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/stub/GrpcKeyManagementServiceStub.java index 0f13ece39c..070b5f924d 100644 --- a/test/integration/goldens/kms/src/com/google/cloud/kms/v1/stub/GrpcKeyManagementServiceStub.java +++ b/test/integration/goldens/kms/src/com/google/cloud/kms/v1/stub/GrpcKeyManagementServiceStub.java @@ -97,6 +97,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(ListKeyRingsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListKeyRingsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -108,6 +109,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { ProtoUtils.marshaller(ListCryptoKeysRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListCryptoKeysResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -119,6 +121,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { ProtoUtils.marshaller(ListCryptoKeyVersionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListCryptoKeyVersionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -130,6 +133,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { ProtoUtils.marshaller(ListImportJobsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListImportJobsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getKeyRingMethodDescriptor = @@ -138,6 +142,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setFullMethodName("google.cloud.kms.v1.KeyManagementService/GetKeyRing") .setRequestMarshaller(ProtoUtils.marshaller(GetKeyRingRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(KeyRing.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -147,6 +152,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setFullMethodName("google.cloud.kms.v1.KeyManagementService/GetCryptoKey") .setRequestMarshaller(ProtoUtils.marshaller(GetCryptoKeyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(CryptoKey.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -157,6 +163,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(GetCryptoKeyVersionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(CryptoKeyVersion.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -166,6 +173,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setFullMethodName("google.cloud.kms.v1.KeyManagementService/GetPublicKey") .setRequestMarshaller(ProtoUtils.marshaller(GetPublicKeyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(PublicKey.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -175,6 +183,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setFullMethodName("google.cloud.kms.v1.KeyManagementService/GetImportJob") .setRequestMarshaller(ProtoUtils.marshaller(GetImportJobRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ImportJob.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -185,6 +194,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(CreateKeyRingRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(KeyRing.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -195,6 +205,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(CreateCryptoKeyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(CryptoKey.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -205,6 +216,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(CreateCryptoKeyVersionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(CryptoKeyVersion.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -215,6 +227,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(ImportCryptoKeyVersionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(CryptoKeyVersion.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -225,6 +238,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(CreateImportJobRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ImportJob.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -235,6 +249,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(UpdateCryptoKeyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(CryptoKey.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -245,6 +260,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(UpdateCryptoKeyVersionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(CryptoKeyVersion.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor encryptMethodDescriptor = @@ -253,6 +269,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setFullMethodName("google.cloud.kms.v1.KeyManagementService/Encrypt") .setRequestMarshaller(ProtoUtils.marshaller(EncryptRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(EncryptResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor decryptMethodDescriptor = @@ -261,6 +278,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setFullMethodName("google.cloud.kms.v1.KeyManagementService/Decrypt") .setRequestMarshaller(ProtoUtils.marshaller(DecryptRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(DecryptResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -272,6 +290,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { ProtoUtils.marshaller(AsymmetricSignRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(AsymmetricSignResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -283,6 +302,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { ProtoUtils.marshaller(AsymmetricDecryptRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(AsymmetricDecryptResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -294,6 +314,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(UpdateCryptoKeyPrimaryVersionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(CryptoKey.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -304,6 +325,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(DestroyCryptoKeyVersionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(CryptoKeyVersion.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -314,6 +336,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(RestoreCryptoKeyVersionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(CryptoKeyVersion.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getIamPolicyMethodDescriptor = @@ -322,6 +345,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setFullMethodName("google.cloud.kms.v1.KeyManagementService/GetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -333,6 +357,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { ProtoUtils.marshaller(ListLocationsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListLocationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getLocationMethodDescriptor = @@ -341,6 +366,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { .setFullMethodName("google.cloud.location.Locations/GetLocation") .setRequestMarshaller(ProtoUtils.marshaller(GetLocationRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Location.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -352,6 +378,7 @@ public class GrpcKeyManagementServiceStub extends KeyManagementServiceStub { ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable listKeyRingsCallable; diff --git a/test/integration/goldens/library/src/com/google/cloud/example/library/v1/stub/GrpcLibraryServiceStub.java b/test/integration/goldens/library/src/com/google/cloud/example/library/v1/stub/GrpcLibraryServiceStub.java index e0bfff934a..6ba61fccd5 100644 --- a/test/integration/goldens/library/src/com/google/cloud/example/library/v1/stub/GrpcLibraryServiceStub.java +++ b/test/integration/goldens/library/src/com/google/cloud/example/library/v1/stub/GrpcLibraryServiceStub.java @@ -64,6 +64,7 @@ public class GrpcLibraryServiceStub extends LibraryServiceStub { .setFullMethodName("google.example.library.v1.LibraryService/CreateShelf") .setRequestMarshaller(ProtoUtils.marshaller(CreateShelfRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Shelf.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getShelfMethodDescriptor = @@ -72,6 +73,7 @@ public class GrpcLibraryServiceStub extends LibraryServiceStub { .setFullMethodName("google.example.library.v1.LibraryService/GetShelf") .setRequestMarshaller(ProtoUtils.marshaller(GetShelfRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Shelf.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -82,6 +84,7 @@ public class GrpcLibraryServiceStub extends LibraryServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(ListShelvesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListShelvesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteShelfMethodDescriptor = @@ -90,6 +93,7 @@ public class GrpcLibraryServiceStub extends LibraryServiceStub { .setFullMethodName("google.example.library.v1.LibraryService/DeleteShelf") .setRequestMarshaller(ProtoUtils.marshaller(DeleteShelfRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor mergeShelvesMethodDescriptor = @@ -98,6 +102,7 @@ public class GrpcLibraryServiceStub extends LibraryServiceStub { .setFullMethodName("google.example.library.v1.LibraryService/MergeShelves") .setRequestMarshaller(ProtoUtils.marshaller(MergeShelvesRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Shelf.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor createBookMethodDescriptor = @@ -106,6 +111,7 @@ public class GrpcLibraryServiceStub extends LibraryServiceStub { .setFullMethodName("google.example.library.v1.LibraryService/CreateBook") .setRequestMarshaller(ProtoUtils.marshaller(CreateBookRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Book.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getBookMethodDescriptor = @@ -114,6 +120,7 @@ public class GrpcLibraryServiceStub extends LibraryServiceStub { .setFullMethodName("google.example.library.v1.LibraryService/GetBook") .setRequestMarshaller(ProtoUtils.marshaller(GetBookRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Book.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -123,6 +130,7 @@ public class GrpcLibraryServiceStub extends LibraryServiceStub { .setFullMethodName("google.example.library.v1.LibraryService/ListBooks") .setRequestMarshaller(ProtoUtils.marshaller(ListBooksRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListBooksResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteBookMethodDescriptor = @@ -131,6 +139,7 @@ public class GrpcLibraryServiceStub extends LibraryServiceStub { .setFullMethodName("google.example.library.v1.LibraryService/DeleteBook") .setRequestMarshaller(ProtoUtils.marshaller(DeleteBookRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor updateBookMethodDescriptor = @@ -139,6 +148,7 @@ public class GrpcLibraryServiceStub extends LibraryServiceStub { .setFullMethodName("google.example.library.v1.LibraryService/UpdateBook") .setRequestMarshaller(ProtoUtils.marshaller(UpdateBookRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Book.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor moveBookMethodDescriptor = @@ -147,6 +157,7 @@ public class GrpcLibraryServiceStub extends LibraryServiceStub { .setFullMethodName("google.example.library.v1.LibraryService/MoveBook") .setRequestMarshaller(ProtoUtils.marshaller(MoveBookRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Book.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable createShelfCallable; diff --git a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/stub/GrpcConfigServiceV2Stub.java b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/stub/GrpcConfigServiceV2Stub.java index a30117ecb2..c27b22218f 100644 --- a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/stub/GrpcConfigServiceV2Stub.java +++ b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/stub/GrpcConfigServiceV2Stub.java @@ -93,6 +93,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setRequestMarshaller(ProtoUtils.marshaller(ListBucketsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListBucketsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getBucketMethodDescriptor = @@ -101,6 +102,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setFullMethodName("google.logging.v2.ConfigServiceV2/GetBucket") .setRequestMarshaller(ProtoUtils.marshaller(GetBucketRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(LogBucket.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -110,6 +112,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setFullMethodName("google.logging.v2.ConfigServiceV2/CreateBucket") .setRequestMarshaller(ProtoUtils.marshaller(CreateBucketRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(LogBucket.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -119,6 +122,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setFullMethodName("google.logging.v2.ConfigServiceV2/UpdateBucket") .setRequestMarshaller(ProtoUtils.marshaller(UpdateBucketRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(LogBucket.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteBucketMethodDescriptor = @@ -127,6 +131,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setFullMethodName("google.logging.v2.ConfigServiceV2/DeleteBucket") .setRequestMarshaller(ProtoUtils.marshaller(DeleteBucketRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -137,6 +142,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setRequestMarshaller( ProtoUtils.marshaller(UndeleteBucketRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -146,6 +152,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setFullMethodName("google.logging.v2.ConfigServiceV2/ListViews") .setRequestMarshaller(ProtoUtils.marshaller(ListViewsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListViewsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getViewMethodDescriptor = @@ -154,6 +161,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setFullMethodName("google.logging.v2.ConfigServiceV2/GetView") .setRequestMarshaller(ProtoUtils.marshaller(GetViewRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(LogView.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor createViewMethodDescriptor = @@ -162,6 +170,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setFullMethodName("google.logging.v2.ConfigServiceV2/CreateView") .setRequestMarshaller(ProtoUtils.marshaller(CreateViewRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(LogView.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor updateViewMethodDescriptor = @@ -170,6 +179,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setFullMethodName("google.logging.v2.ConfigServiceV2/UpdateView") .setRequestMarshaller(ProtoUtils.marshaller(UpdateViewRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(LogView.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteViewMethodDescriptor = @@ -178,6 +188,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setFullMethodName("google.logging.v2.ConfigServiceV2/DeleteView") .setRequestMarshaller(ProtoUtils.marshaller(DeleteViewRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -187,6 +198,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setFullMethodName("google.logging.v2.ConfigServiceV2/ListSinks") .setRequestMarshaller(ProtoUtils.marshaller(ListSinksRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListSinksResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getSinkMethodDescriptor = @@ -195,6 +207,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setFullMethodName("google.logging.v2.ConfigServiceV2/GetSink") .setRequestMarshaller(ProtoUtils.marshaller(GetSinkRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(LogSink.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor createSinkMethodDescriptor = @@ -203,6 +216,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setFullMethodName("google.logging.v2.ConfigServiceV2/CreateSink") .setRequestMarshaller(ProtoUtils.marshaller(CreateSinkRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(LogSink.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor updateSinkMethodDescriptor = @@ -211,6 +225,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setFullMethodName("google.logging.v2.ConfigServiceV2/UpdateSink") .setRequestMarshaller(ProtoUtils.marshaller(UpdateSinkRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(LogSink.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteSinkMethodDescriptor = @@ -219,6 +234,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setFullMethodName("google.logging.v2.ConfigServiceV2/DeleteSink") .setRequestMarshaller(ProtoUtils.marshaller(DeleteSinkRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -230,6 +246,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { ProtoUtils.marshaller(ListExclusionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListExclusionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -239,6 +256,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setFullMethodName("google.logging.v2.ConfigServiceV2/GetExclusion") .setRequestMarshaller(ProtoUtils.marshaller(GetExclusionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(LogExclusion.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -249,6 +267,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setRequestMarshaller( ProtoUtils.marshaller(CreateExclusionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(LogExclusion.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -259,6 +278,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setRequestMarshaller( ProtoUtils.marshaller(UpdateExclusionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(LogExclusion.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -269,6 +289,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setRequestMarshaller( ProtoUtils.marshaller(DeleteExclusionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -279,6 +300,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setRequestMarshaller( ProtoUtils.marshaller(GetCmekSettingsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(CmekSettings.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -289,6 +311,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setRequestMarshaller( ProtoUtils.marshaller(UpdateCmekSettingsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(CmekSettings.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getSettingsMethodDescriptor = @@ -297,6 +320,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setFullMethodName("google.logging.v2.ConfigServiceV2/GetSettings") .setRequestMarshaller(ProtoUtils.marshaller(GetSettingsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Settings.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -307,6 +331,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setRequestMarshaller( ProtoUtils.marshaller(UpdateSettingsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Settings.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -317,6 +342,7 @@ public class GrpcConfigServiceV2Stub extends ConfigServiceV2Stub { .setRequestMarshaller( ProtoUtils.marshaller(CopyLogEntriesRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable listBucketsCallable; diff --git a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/stub/GrpcLoggingServiceV2Stub.java b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/stub/GrpcLoggingServiceV2Stub.java index 91dde7f065..2d0753dede 100644 --- a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/stub/GrpcLoggingServiceV2Stub.java +++ b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/stub/GrpcLoggingServiceV2Stub.java @@ -62,6 +62,7 @@ public class GrpcLoggingServiceV2Stub extends LoggingServiceV2Stub { .setFullMethodName("google.logging.v2.LoggingServiceV2/DeleteLog") .setRequestMarshaller(ProtoUtils.marshaller(DeleteLogRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -73,6 +74,7 @@ public class GrpcLoggingServiceV2Stub extends LoggingServiceV2Stub { ProtoUtils.marshaller(WriteLogEntriesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(WriteLogEntriesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -84,6 +86,7 @@ public class GrpcLoggingServiceV2Stub extends LoggingServiceV2Stub { ProtoUtils.marshaller(ListLogEntriesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListLogEntriesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor< @@ -101,6 +104,7 @@ public class GrpcLoggingServiceV2Stub extends LoggingServiceV2Stub { .setResponseMarshaller( ProtoUtils.marshaller( ListMonitoredResourceDescriptorsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -110,6 +114,7 @@ public class GrpcLoggingServiceV2Stub extends LoggingServiceV2Stub { .setFullMethodName("google.logging.v2.LoggingServiceV2/ListLogs") .setRequestMarshaller(ProtoUtils.marshaller(ListLogsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListLogsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -121,6 +126,7 @@ public class GrpcLoggingServiceV2Stub extends LoggingServiceV2Stub { ProtoUtils.marshaller(TailLogEntriesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TailLogEntriesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable deleteLogCallable; diff --git a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/stub/GrpcMetricsServiceV2Stub.java b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/stub/GrpcMetricsServiceV2Stub.java index ec36cc21c3..cedfd8829a 100644 --- a/test/integration/goldens/logging/src/com/google/cloud/logging/v2/stub/GrpcMetricsServiceV2Stub.java +++ b/test/integration/goldens/logging/src/com/google/cloud/logging/v2/stub/GrpcMetricsServiceV2Stub.java @@ -58,6 +58,7 @@ public class GrpcMetricsServiceV2Stub extends MetricsServiceV2Stub { ProtoUtils.marshaller(ListLogMetricsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListLogMetricsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -67,6 +68,7 @@ public class GrpcMetricsServiceV2Stub extends MetricsServiceV2Stub { .setFullMethodName("google.logging.v2.MetricsServiceV2/GetLogMetric") .setRequestMarshaller(ProtoUtils.marshaller(GetLogMetricRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(LogMetric.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -77,6 +79,7 @@ public class GrpcMetricsServiceV2Stub extends MetricsServiceV2Stub { .setRequestMarshaller( ProtoUtils.marshaller(CreateLogMetricRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(LogMetric.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -87,6 +90,7 @@ public class GrpcMetricsServiceV2Stub extends MetricsServiceV2Stub { .setRequestMarshaller( ProtoUtils.marshaller(UpdateLogMetricRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(LogMetric.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -97,6 +101,7 @@ public class GrpcMetricsServiceV2Stub extends MetricsServiceV2Stub { .setRequestMarshaller( ProtoUtils.marshaller(DeleteLogMetricRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable listLogMetricsCallable; diff --git a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java index d9e6ed4803..541f363803 100644 --- a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java +++ b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/stub/GrpcPublisherStub.java @@ -69,6 +69,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.pubsub.v1.Publisher/CreateTopic") .setRequestMarshaller(ProtoUtils.marshaller(Topic.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Topic.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor updateTopicMethodDescriptor = @@ -77,6 +78,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.pubsub.v1.Publisher/UpdateTopic") .setRequestMarshaller(ProtoUtils.marshaller(UpdateTopicRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Topic.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor publishMethodDescriptor = @@ -85,6 +87,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.pubsub.v1.Publisher/Publish") .setRequestMarshaller(ProtoUtils.marshaller(PublishRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(PublishResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getTopicMethodDescriptor = @@ -93,6 +96,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.pubsub.v1.Publisher/GetTopic") .setRequestMarshaller(ProtoUtils.marshaller(GetTopicRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Topic.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -102,6 +106,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.pubsub.v1.Publisher/ListTopics") .setRequestMarshaller(ProtoUtils.marshaller(ListTopicsRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ListTopicsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor< @@ -115,6 +120,7 @@ public class GrpcPublisherStub extends PublisherStub { ProtoUtils.marshaller(ListTopicSubscriptionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListTopicSubscriptionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -126,6 +132,7 @@ public class GrpcPublisherStub extends PublisherStub { ProtoUtils.marshaller(ListTopicSnapshotsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListTopicSnapshotsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteTopicMethodDescriptor = @@ -134,6 +141,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.pubsub.v1.Publisher/DeleteTopic") .setRequestMarshaller(ProtoUtils.marshaller(DeleteTopicRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -145,6 +153,7 @@ public class GrpcPublisherStub extends PublisherStub { ProtoUtils.marshaller(DetachSubscriptionRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(DetachSubscriptionResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor setIamPolicyMethodDescriptor = @@ -153,6 +162,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getIamPolicyMethodDescriptor = @@ -161,6 +171,7 @@ public class GrpcPublisherStub extends PublisherStub { .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -172,6 +183,7 @@ public class GrpcPublisherStub extends PublisherStub { ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable createTopicCallable; diff --git a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/stub/GrpcSchemaServiceStub.java b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/stub/GrpcSchemaServiceStub.java index 9c8e570aa7..ef439881a6 100644 --- a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/stub/GrpcSchemaServiceStub.java +++ b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/stub/GrpcSchemaServiceStub.java @@ -69,6 +69,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { .setFullMethodName("google.pubsub.v1.SchemaService/CreateSchema") .setRequestMarshaller(ProtoUtils.marshaller(CreateSchemaRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Schema.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getSchemaMethodDescriptor = @@ -77,6 +78,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { .setFullMethodName("google.pubsub.v1.SchemaService/GetSchema") .setRequestMarshaller(ProtoUtils.marshaller(GetSchemaRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Schema.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -87,6 +89,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { .setRequestMarshaller(ProtoUtils.marshaller(ListSchemasRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListSchemasResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -98,6 +101,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { ProtoUtils.marshaller(ListSchemaRevisionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListSchemaRevisionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor commitSchemaMethodDescriptor = @@ -106,6 +110,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { .setFullMethodName("google.pubsub.v1.SchemaService/CommitSchema") .setRequestMarshaller(ProtoUtils.marshaller(CommitSchemaRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Schema.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -116,6 +121,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(RollbackSchemaRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Schema.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -126,6 +132,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { .setRequestMarshaller( ProtoUtils.marshaller(DeleteSchemaRevisionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Schema.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteSchemaMethodDescriptor = @@ -134,6 +141,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { .setFullMethodName("google.pubsub.v1.SchemaService/DeleteSchema") .setRequestMarshaller(ProtoUtils.marshaller(DeleteSchemaRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -145,6 +153,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { ProtoUtils.marshaller(ValidateSchemaRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ValidateSchemaResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -156,6 +165,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { ProtoUtils.marshaller(ValidateMessageRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ValidateMessageResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor setIamPolicyMethodDescriptor = @@ -164,6 +174,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getIamPolicyMethodDescriptor = @@ -172,6 +183,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -183,6 +195,7 @@ public class GrpcSchemaServiceStub extends SchemaServiceStub { ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable createSchemaCallable; diff --git a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/stub/GrpcSubscriberStub.java b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/stub/GrpcSubscriberStub.java index b7456a0647..2c95d75bea 100644 --- a/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/stub/GrpcSubscriberStub.java +++ b/test/integration/goldens/pubsub/src/com/google/cloud/pubsub/v1/stub/GrpcSubscriberStub.java @@ -78,6 +78,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setFullMethodName("google.pubsub.v1.Subscriber/CreateSubscription") .setRequestMarshaller(ProtoUtils.marshaller(Subscription.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Subscription.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -88,6 +89,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setRequestMarshaller( ProtoUtils.marshaller(GetSubscriptionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Subscription.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -98,6 +100,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setRequestMarshaller( ProtoUtils.marshaller(UpdateSubscriptionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Subscription.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -109,6 +112,7 @@ public class GrpcSubscriberStub extends SubscriberStub { ProtoUtils.marshaller(ListSubscriptionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListSubscriptionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -119,6 +123,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setRequestMarshaller( ProtoUtils.marshaller(DeleteSubscriptionRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -129,6 +134,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setRequestMarshaller( ProtoUtils.marshaller(ModifyAckDeadlineRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor acknowledgeMethodDescriptor = @@ -137,6 +143,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setFullMethodName("google.pubsub.v1.Subscriber/Acknowledge") .setRequestMarshaller(ProtoUtils.marshaller(AcknowledgeRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor pullMethodDescriptor = @@ -145,6 +152,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setFullMethodName("google.pubsub.v1.Subscriber/Pull") .setRequestMarshaller(ProtoUtils.marshaller(PullRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(PullResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -156,6 +164,7 @@ public class GrpcSubscriberStub extends SubscriberStub { ProtoUtils.marshaller(StreamingPullRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(StreamingPullResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -166,6 +175,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setRequestMarshaller( ProtoUtils.marshaller(ModifyPushConfigRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getSnapshotMethodDescriptor = @@ -174,6 +184,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setFullMethodName("google.pubsub.v1.Subscriber/GetSnapshot") .setRequestMarshaller(ProtoUtils.marshaller(GetSnapshotRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Snapshot.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -185,6 +196,7 @@ public class GrpcSubscriberStub extends SubscriberStub { ProtoUtils.marshaller(ListSnapshotsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListSnapshotsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -195,6 +207,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setRequestMarshaller( ProtoUtils.marshaller(CreateSnapshotRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Snapshot.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -205,6 +218,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setRequestMarshaller( ProtoUtils.marshaller(UpdateSnapshotRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Snapshot.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -215,6 +229,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setRequestMarshaller( ProtoUtils.marshaller(DeleteSnapshotRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor seekMethodDescriptor = @@ -223,6 +238,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setFullMethodName("google.pubsub.v1.Subscriber/Seek") .setRequestMarshaller(ProtoUtils.marshaller(SeekRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(SeekResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor setIamPolicyMethodDescriptor = @@ -231,6 +247,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setFullMethodName("google.iam.v1.IAMPolicy/SetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getIamPolicyMethodDescriptor = @@ -239,6 +256,7 @@ public class GrpcSubscriberStub extends SubscriberStub { .setFullMethodName("google.iam.v1.IAMPolicy/GetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -250,6 +268,7 @@ public class GrpcSubscriberStub extends SubscriberStub { ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable createSubscriptionCallable; diff --git a/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/stub/GrpcCloudRedisStub.java b/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/stub/GrpcCloudRedisStub.java index 4e919f3a8d..9ba062d76a 100644 --- a/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/stub/GrpcCloudRedisStub.java +++ b/test/integration/goldens/redis/src/com/google/cloud/redis/v1beta1/stub/GrpcCloudRedisStub.java @@ -70,6 +70,7 @@ public class GrpcCloudRedisStub extends CloudRedisStub { ProtoUtils.marshaller(ListInstancesRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListInstancesResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getInstanceMethodDescriptor = @@ -78,6 +79,7 @@ public class GrpcCloudRedisStub extends CloudRedisStub { .setFullMethodName("google.cloud.redis.v1beta1.CloudRedis/GetInstance") .setRequestMarshaller(ProtoUtils.marshaller(GetInstanceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Instance.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -88,6 +90,7 @@ public class GrpcCloudRedisStub extends CloudRedisStub { .setRequestMarshaller( ProtoUtils.marshaller(GetInstanceAuthStringRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(InstanceAuthString.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -98,6 +101,7 @@ public class GrpcCloudRedisStub extends CloudRedisStub { .setRequestMarshaller( ProtoUtils.marshaller(CreateInstanceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -108,6 +112,7 @@ public class GrpcCloudRedisStub extends CloudRedisStub { .setRequestMarshaller( ProtoUtils.marshaller(UpdateInstanceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -118,6 +123,7 @@ public class GrpcCloudRedisStub extends CloudRedisStub { .setRequestMarshaller( ProtoUtils.marshaller(UpgradeInstanceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -128,6 +134,7 @@ public class GrpcCloudRedisStub extends CloudRedisStub { .setRequestMarshaller( ProtoUtils.marshaller(ImportInstanceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -138,6 +145,7 @@ public class GrpcCloudRedisStub extends CloudRedisStub { .setRequestMarshaller( ProtoUtils.marshaller(ExportInstanceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -148,6 +156,7 @@ public class GrpcCloudRedisStub extends CloudRedisStub { .setRequestMarshaller( ProtoUtils.marshaller(FailoverInstanceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -158,6 +167,7 @@ public class GrpcCloudRedisStub extends CloudRedisStub { .setRequestMarshaller( ProtoUtils.marshaller(DeleteInstanceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -168,6 +178,7 @@ public class GrpcCloudRedisStub extends CloudRedisStub { .setRequestMarshaller( ProtoUtils.marshaller(RescheduleMaintenanceRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable listInstancesCallable; diff --git a/test/integration/goldens/storage/src/com/google/storage/v2/stub/GrpcStorageStub.java b/test/integration/goldens/storage/src/com/google/storage/v2/stub/GrpcStorageStub.java index 570725fd5d..024a801375 100644 --- a/test/integration/goldens/storage/src/com/google/storage/v2/stub/GrpcStorageStub.java +++ b/test/integration/goldens/storage/src/com/google/storage/v2/stub/GrpcStorageStub.java @@ -102,6 +102,7 @@ public class GrpcStorageStub extends StorageStub { .setFullMethodName("google.storage.v2.Storage/DeleteBucket") .setRequestMarshaller(ProtoUtils.marshaller(DeleteBucketRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getBucketMethodDescriptor = @@ -110,6 +111,7 @@ public class GrpcStorageStub extends StorageStub { .setFullMethodName("google.storage.v2.Storage/GetBucket") .setRequestMarshaller(ProtoUtils.marshaller(GetBucketRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Bucket.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor createBucketMethodDescriptor = @@ -118,6 +120,7 @@ public class GrpcStorageStub extends StorageStub { .setFullMethodName("google.storage.v2.Storage/CreateBucket") .setRequestMarshaller(ProtoUtils.marshaller(CreateBucketRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Bucket.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -128,6 +131,7 @@ public class GrpcStorageStub extends StorageStub { .setRequestMarshaller(ProtoUtils.marshaller(ListBucketsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListBucketsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -138,6 +142,7 @@ public class GrpcStorageStub extends StorageStub { .setRequestMarshaller( ProtoUtils.marshaller(LockBucketRetentionPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Bucket.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getIamPolicyMethodDescriptor = @@ -146,6 +151,7 @@ public class GrpcStorageStub extends StorageStub { .setFullMethodName("google.storage.v2.Storage/GetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(GetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor setIamPolicyMethodDescriptor = @@ -154,6 +160,7 @@ public class GrpcStorageStub extends StorageStub { .setFullMethodName("google.storage.v2.Storage/SetIamPolicy") .setRequestMarshaller(ProtoUtils.marshaller(SetIamPolicyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Policy.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -165,6 +172,7 @@ public class GrpcStorageStub extends StorageStub { ProtoUtils.marshaller(TestIamPermissionsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(TestIamPermissionsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor updateBucketMethodDescriptor = @@ -173,6 +181,7 @@ public class GrpcStorageStub extends StorageStub { .setFullMethodName("google.storage.v2.Storage/UpdateBucket") .setRequestMarshaller(ProtoUtils.marshaller(UpdateBucketRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Bucket.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -183,6 +192,7 @@ public class GrpcStorageStub extends StorageStub { .setRequestMarshaller( ProtoUtils.marshaller(DeleteNotificationRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -193,6 +203,7 @@ public class GrpcStorageStub extends StorageStub { .setRequestMarshaller( ProtoUtils.marshaller(GetNotificationRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Notification.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -203,6 +214,7 @@ public class GrpcStorageStub extends StorageStub { .setRequestMarshaller( ProtoUtils.marshaller(CreateNotificationRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Notification.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -214,6 +226,7 @@ public class GrpcStorageStub extends StorageStub { ProtoUtils.marshaller(ListNotificationsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListNotificationsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -224,6 +237,7 @@ public class GrpcStorageStub extends StorageStub { .setRequestMarshaller( ProtoUtils.marshaller(ComposeObjectRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Object.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteObjectMethodDescriptor = @@ -232,6 +246,7 @@ public class GrpcStorageStub extends StorageStub { .setFullMethodName("google.storage.v2.Storage/DeleteObject") .setRequestMarshaller(ProtoUtils.marshaller(DeleteObjectRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -243,6 +258,7 @@ public class GrpcStorageStub extends StorageStub { ProtoUtils.marshaller(CancelResumableWriteRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(CancelResumableWriteResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor getObjectMethodDescriptor = @@ -251,6 +267,7 @@ public class GrpcStorageStub extends StorageStub { .setFullMethodName("google.storage.v2.Storage/GetObject") .setRequestMarshaller(ProtoUtils.marshaller(GetObjectRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Object.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -260,6 +277,7 @@ public class GrpcStorageStub extends StorageStub { .setFullMethodName("google.storage.v2.Storage/ReadObject") .setRequestMarshaller(ProtoUtils.marshaller(ReadObjectRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ReadObjectResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor updateObjectMethodDescriptor = @@ -268,6 +286,7 @@ public class GrpcStorageStub extends StorageStub { .setFullMethodName("google.storage.v2.Storage/UpdateObject") .setRequestMarshaller(ProtoUtils.marshaller(UpdateObjectRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Object.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -278,6 +297,7 @@ public class GrpcStorageStub extends StorageStub { .setRequestMarshaller(ProtoUtils.marshaller(WriteObjectRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(WriteObjectResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -288,6 +308,7 @@ public class GrpcStorageStub extends StorageStub { .setRequestMarshaller(ProtoUtils.marshaller(ListObjectsRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListObjectsResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -298,6 +319,7 @@ public class GrpcStorageStub extends StorageStub { .setRequestMarshaller( ProtoUtils.marshaller(RewriteObjectRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(RewriteResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -309,6 +331,7 @@ public class GrpcStorageStub extends StorageStub { ProtoUtils.marshaller(StartResumableWriteRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(StartResumableWriteResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -320,6 +343,7 @@ public class GrpcStorageStub extends StorageStub { ProtoUtils.marshaller(QueryWriteStatusRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(QueryWriteStatusResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -330,6 +354,7 @@ public class GrpcStorageStub extends StorageStub { .setRequestMarshaller( ProtoUtils.marshaller(GetServiceAccountRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(ServiceAccount.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -341,6 +366,7 @@ public class GrpcStorageStub extends StorageStub { ProtoUtils.marshaller(CreateHmacKeyRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(CreateHmacKeyResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor deleteHmacKeyMethodDescriptor = @@ -349,6 +375,7 @@ public class GrpcStorageStub extends StorageStub { .setFullMethodName("google.storage.v2.Storage/DeleteHmacKey") .setRequestMarshaller(ProtoUtils.marshaller(DeleteHmacKeyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -358,6 +385,7 @@ public class GrpcStorageStub extends StorageStub { .setFullMethodName("google.storage.v2.Storage/GetHmacKey") .setRequestMarshaller(ProtoUtils.marshaller(GetHmacKeyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(HmacKeyMetadata.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -368,6 +396,7 @@ public class GrpcStorageStub extends StorageStub { .setRequestMarshaller(ProtoUtils.marshaller(ListHmacKeysRequest.getDefaultInstance())) .setResponseMarshaller( ProtoUtils.marshaller(ListHmacKeysResponse.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private static final MethodDescriptor @@ -378,6 +407,7 @@ public class GrpcStorageStub extends StorageStub { .setRequestMarshaller( ProtoUtils.marshaller(UpdateHmacKeyRequest.getDefaultInstance())) .setResponseMarshaller(ProtoUtils.marshaller(HmacKeyMetadata.getDefaultInstance())) + .setSampledToLocalTracing(true) .build(); private final UnaryCallable deleteBucketCallable;