Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ io.grpc.benchmarks.proto.Messages.SimpleResponse> getUnaryCallMethod() {
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"grpc.testing.BenchmarkService", "UnaryCall"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.grpc.benchmarks.proto.Messages.SimpleRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Expand Down Expand Up @@ -79,7 +79,7 @@ io.grpc.benchmarks.proto.Messages.SimpleResponse> getStreamingCallMethod() {
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.BenchmarkService", "StreamingCall"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.grpc.benchmarks.proto.Messages.SimpleRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Expand Down Expand Up @@ -111,7 +111,7 @@ io.grpc.benchmarks.proto.Messages.SimpleResponse> getStreamingFromClientMethod()
.setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.BenchmarkService", "StreamingFromClient"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.grpc.benchmarks.proto.Messages.SimpleRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Expand Down Expand Up @@ -143,7 +143,7 @@ io.grpc.benchmarks.proto.Messages.SimpleResponse> getStreamingFromServerMethod()
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.BenchmarkService", "StreamingFromServer"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.grpc.benchmarks.proto.Messages.SimpleRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Expand Down Expand Up @@ -175,7 +175,7 @@ io.grpc.benchmarks.proto.Messages.SimpleResponse> getStreamingBothWaysMethod() {
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.BenchmarkService", "StreamingBothWays"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.grpc.benchmarks.proto.Messages.SimpleRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ io.grpc.benchmarks.proto.Control.Void> getReportScenarioMethod() {
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"grpc.testing.ReportQpsScenarioService", "ReportScenario"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.grpc.benchmarks.proto.Control.ScenarioResult.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ io.grpc.benchmarks.proto.Control.ServerStatus> getRunServerMethod() {
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.WorkerService", "RunServer"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.grpc.benchmarks.proto.Control.ServerArgs.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Expand Down Expand Up @@ -79,7 +79,7 @@ io.grpc.benchmarks.proto.Control.ClientStatus> getRunClientMethod() {
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.WorkerService", "RunClient"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.grpc.benchmarks.proto.Control.ClientArgs.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Expand Down Expand Up @@ -111,7 +111,7 @@ io.grpc.benchmarks.proto.Control.CoreResponse> getCoreCountMethod() {
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"grpc.testing.WorkerService", "CoreCount"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.grpc.benchmarks.proto.Control.CoreRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Expand Down Expand Up @@ -143,7 +143,7 @@ io.grpc.benchmarks.proto.Control.Void> getQuitWorkerMethod() {
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"grpc.testing.WorkerService", "QuitWorker"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.grpc.benchmarks.proto.Control.Void.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ subprojects {
google_auth_credentials: 'com.google.auth:google-auth-library-credentials:0.4.0',
okhttp: 'com.squareup.okhttp:okhttp:2.5.0',
okio: 'com.squareup.okio:okio:1.6.0',
opencensus_api: 'io.opencensus:opencensus-api:0.7.0',
opencensus_impl: 'io.opencensus:opencensus-impl:0.7.0',
opencensus_api: 'io.opencensus:opencensus-api:0.8.0',
opencensus_impl: 'io.opencensus:opencensus-impl:0.8.0',
instrumentation_api: 'com.google.instrumentation:instrumentation-api:0.4.3',
protobuf: "com.google.protobuf:protobuf-java:${protobufVersion}",
protobuf_lite: "com.google.protobuf:protobuf-lite:3.0.1",
Expand Down
4 changes: 2 additions & 2 deletions compiler/src/java_plugin/cpp/java_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ static void PrintMethodFields(
" .setType($MethodType$.$method_type$)\n"
" .setFullMethodName(generateFullMethodName(\n"
" \"$Package$$service_name$\", \"$method_name$\"))\n"
" .setRegisterForTracing(true)\n"
" .setSampledToLocalTracing(true)\n"
" .setRequestMarshaller($NanoUtils$.<$input_type$>marshaller(\n"
" new NanoFactory<$input_type$>(ARG_IN_$method_field_name$)))\n"
" .setResponseMarshaller($NanoUtils$.<$output_type$>marshaller(\n"
Expand Down Expand Up @@ -402,7 +402,7 @@ static void PrintMethodFields(
" .setType($MethodType$.$method_type$)\n"
" .setFullMethodName(generateFullMethodName(\n"
" \"$Package$$service_name$\", \"$method_name$\"))\n"
" .setRegisterForTracing(true)\n"
" .setSampledToLocalTracing(true)\n"
" .setRequestMarshaller($ProtoUtils$.marshaller(\n"
" $input_type$.getDefaultInstance()))\n"
" .setResponseMarshaller($ProtoUtils$.marshaller(\n"
Expand Down
10 changes: 5 additions & 5 deletions compiler/src/test/golden/TestService.java.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public final class TestServiceGrpc {
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"grpc.testing.TestService", "UnaryCall"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.grpc.testing.integration.Test.SimpleRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Expand Down Expand Up @@ -82,7 +82,7 @@ public final class TestServiceGrpc {
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.TestService", "StreamingOutputCall"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.grpc.testing.integration.Test.StreamingOutputCallRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Expand Down Expand Up @@ -114,7 +114,7 @@ public final class TestServiceGrpc {
.setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.TestService", "StreamingInputCall"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.grpc.testing.integration.Test.StreamingInputCallRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Expand Down Expand Up @@ -146,7 +146,7 @@ public final class TestServiceGrpc {
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.TestService", "FullBidiCall"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.grpc.testing.integration.Test.StreamingOutputCallRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Expand Down Expand Up @@ -178,7 +178,7 @@ public final class TestServiceGrpc {
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.TestService", "HalfBidiCall"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
io.grpc.testing.integration.Test.StreamingOutputCallRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
Expand Down
10 changes: 5 additions & 5 deletions compiler/src/testLite/golden/TestService.java.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public final class TestServiceGrpc {
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"grpc.testing.TestService", "UnaryCall"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
io.grpc.testing.integration.Test.SimpleRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
Expand Down Expand Up @@ -81,7 +81,7 @@ public final class TestServiceGrpc {
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.TestService", "StreamingOutputCall"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
io.grpc.testing.integration.Test.StreamingOutputCallRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
Expand Down Expand Up @@ -112,7 +112,7 @@ public final class TestServiceGrpc {
.setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.TestService", "StreamingInputCall"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
io.grpc.testing.integration.Test.StreamingInputCallRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
Expand Down Expand Up @@ -143,7 +143,7 @@ public final class TestServiceGrpc {
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.TestService", "FullBidiCall"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
io.grpc.testing.integration.Test.StreamingOutputCallRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
Expand Down Expand Up @@ -174,7 +174,7 @@ public final class TestServiceGrpc {
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.TestService", "HalfBidiCall"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
io.grpc.testing.integration.Test.StreamingOutputCallRequest.getDefaultInstance()))
.setResponseMarshaller(io.grpc.protobuf.lite.ProtoLiteUtils.marshaller(
Expand Down
10 changes: 5 additions & 5 deletions compiler/src/testNano/golden/TestService.java.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public final class TestServiceGrpc {
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
.setFullMethodName(generateFullMethodName(
"grpc.testing.TestService", "UnaryCall"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.SimpleRequest>marshaller(
new NanoFactory<io.grpc.testing.integration.nano.Test.SimpleRequest>(ARG_IN_METHOD_UNARY_CALL)))
.setResponseMarshaller(io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.SimpleResponse>marshaller(
Expand Down Expand Up @@ -87,7 +87,7 @@ public final class TestServiceGrpc {
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.TestService", "StreamingOutputCall"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>marshaller(
new NanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>(ARG_IN_METHOD_STREAMING_OUTPUT_CALL)))
.setResponseMarshaller(io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>marshaller(
Expand Down Expand Up @@ -120,7 +120,7 @@ public final class TestServiceGrpc {
.setType(io.grpc.MethodDescriptor.MethodType.CLIENT_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.TestService", "StreamingInputCall"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest>marshaller(
new NanoFactory<io.grpc.testing.integration.nano.Test.StreamingInputCallRequest>(ARG_IN_METHOD_STREAMING_INPUT_CALL)))
.setResponseMarshaller(io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingInputCallResponse>marshaller(
Expand Down Expand Up @@ -153,7 +153,7 @@ public final class TestServiceGrpc {
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.TestService", "FullBidiCall"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>marshaller(
new NanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>(ARG_IN_METHOD_FULL_BIDI_CALL)))
.setResponseMarshaller(io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>marshaller(
Expand Down Expand Up @@ -186,7 +186,7 @@ public final class TestServiceGrpc {
.setType(io.grpc.MethodDescriptor.MethodType.BIDI_STREAMING)
.setFullMethodName(generateFullMethodName(
"grpc.testing.TestService", "HalfBidiCall"))
.setRegisterForTracing(true)
.setSampledToLocalTracing(true)
.setRequestMarshaller(io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>marshaller(
new NanoFactory<io.grpc.testing.integration.nano.Test.StreamingOutputCallRequest>(ARG_IN_METHOD_HALF_BIDI_CALL)))
.setResponseMarshaller(io.grpc.protobuf.nano.NanoUtils.<io.grpc.testing.integration.nano.Test.StreamingOutputCallResponse>marshaller(
Expand Down
7 changes: 0 additions & 7 deletions core/src/main/java/io/grpc/InternalMethodDescriptor.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,4 @@ public Object geRawMethodName(MethodDescriptor<?, ?> md) {
public void setRawMethodName(MethodDescriptor<?, ?> md, Object o) {
md.setRawMethodName(transport.ordinal(), o);
}

public interface RegisterForTracingCallback extends
MethodDescriptor.Registrations.RegisterForTracingCallback {}

public static void setRegisterCallback(RegisterForTracingCallback registerCallback) {
MethodDescriptor.Registrations.setRegisterForTracingCallback(registerCallback);
}
}
Loading