mirror of https://github.com/grpc/grpc-java.git
services: remove monitoring file
This commit is contained in:
parent
acfb3b9851
commit
f4f4302b85
|
@ -1,234 +0,0 @@
|
|||
# gRPC Monitoring Service Tutorial
|
||||
|
||||
***Note:*** *The monitoring service requires the `instrumentation-java` library
|
||||
implementations, which are still being developed. The steps in this tutorial
|
||||
will not work until the `instrumentation-java` implementation is released.*
|
||||
|
||||
The gRPC monitoring service provides access to metrics such as RPC latencies,
|
||||
bytes sent and received, and error counts. By default, the monitoring service
|
||||
will expose metrics recorded by all gRPC clients and servers in the same
|
||||
application.
|
||||
|
||||
# Requirement: instrumentation-java
|
||||
|
||||
For the monitoring service to start, gRPC must have access to the
|
||||
`instrumentation-java` library. By default, gRPC depends only on the
|
||||
`instrumentation` APIs. The actual implementations have not yet been released.
|
||||
|
||||
**TODO(ericgribkoff):** Add instructions for including instrumentation in
|
||||
`build.gradle` once `instrumentation-java` is released.
|
||||
|
||||
# Adding the service to a server
|
||||
|
||||
The gRPC monitoring service is implemented by
|
||||
`io.grpc.services.MonitoringService` in the `grpc-services` package. The service
|
||||
itself is defined in
|
||||
[`grpc/instrumentation/v1alpha/monitoring.proto`](https://github.com/grpc/grpc-proto/blob/master/grpc/instrumentation/v1alpha/monitoring.proto).
|
||||
Currently only the `GetCanonicalRpcStats` method is supported.
|
||||
|
||||
To run the monitoring service, it must be added to a server. While the
|
||||
monitoring service can be added to any existing server, keep in mind that the
|
||||
service will be exposing potentially sensitive information about your
|
||||
applications. It is up to you to make sure that the server hosting the
|
||||
monitoring service is secure. Typically, this will mean running a separate gRPC
|
||||
server to host the monitoring service.
|
||||
|
||||
To start the `HelloWorldServer` with a second server on port `50052` for the
|
||||
monitoring service, we need to make the following changes:
|
||||
|
||||
```diff
|
||||
--- a/examples/build.gradle
|
||||
+++ b/examples/build.gradle
|
||||
@@ -27,6 +27,7 @@
|
||||
dependencies {
|
||||
compile "io.grpc:grpc-netty:${grpcVersion}"
|
||||
compile "io.grpc:grpc-protobuf:${grpcVersion}"
|
||||
+ compile "io.grpc:grpc-services:${grpcVersion}"
|
||||
compile "io.grpc:grpc-stub:${grpcVersion}"
|
||||
|
||||
testCompile "junit:junit:4.12"
|
||||
--- a/examples/src/main/java/io/grpc/examples/helloworld/HelloWorldServer.java
|
||||
+++ b/examples/src/main/java/io/grpc/examples/helloworld/HelloWorldServer.java
|
||||
@@ -33,6 +33,8 @@ package io.grpc.examples.helloworld;
|
||||
|
||||
import io.grpc.Server;
|
||||
import io.grpc.ServerBuilder;
|
||||
+import io.grpc.protobuf.services.ProtoReflectionService;
|
||||
+import io.grpc.services.MonitoringService;
|
||||
import io.grpc.stub.StreamObserver;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Logger;
|
||||
@@ -44,6 +46,7 @@ public class HelloWorldServer {
|
||||
private static final Logger logger = Logger.getLogger(HelloWorldServer.class.getName());
|
||||
|
||||
private Server server;
|
||||
+ private Server monitoringServer;
|
||||
|
||||
private void start() throws IOException {
|
||||
/* The port on which the server should run */
|
||||
@@ -53,6 +56,14 @@ public class HelloWorldServer {
|
||||
.build()
|
||||
.start();
|
||||
logger.info("Server started, listening on " + port);
|
||||
+ int monitoringPort = 50052;
|
||||
+ /* This will throw an exception if StatsManager from instrumentation-java is unavailable */
|
||||
+ monitoringServer = ServerBuilder.forPort(monitoringPort)
|
||||
+ .addService(MonitoringService.getInstance())
|
||||
+ .addService(ProtoReflectionService.newInstance())
|
||||
+ .build()
|
||||
+ .start();
|
||||
+ logger.info("Monitoring server started, listening on " + monitoringPort);
|
||||
Runtime.getRuntime().addShutdownHook(new Thread() {
|
||||
@Override
|
||||
public void run() {
|
||||
@@ -68,6 +79,9 @@ public class HelloWorldServer {
|
||||
if (server != null) {
|
||||
server.shutdown();
|
||||
}
|
||||
+ if (monitoringServer != null) {
|
||||
+ monitoringServer.shutdown();
|
||||
+ }
|
||||
}
|
||||
|
||||
/**
|
||||
```
|
||||
|
||||
Note that the inclusion of the `ProtoReflectionService` is optional, but it will
|
||||
allow us to easily query the monitoring service using the `grpc_cli` tool (see
|
||||
the next section).
|
||||
|
||||
The next example demonstrates running a server with the monitoring service on a
|
||||
Unix domain socket (`/tmp/grpc_monitoring.sock`) alongside the
|
||||
`HelloWorldClient`. This will only work on `linux_x86_64` architectures.
|
||||
|
||||
```diff
|
||||
--- a/examples/build.gradle
|
||||
+++ b/examples/build.gradle
|
||||
@@ -27,7 +27,10 @@
|
||||
dependencies {
|
||||
compile "io.grpc:grpc-netty:${grpcVersion}"
|
||||
compile "io.grpc:grpc-protobuf:${grpcVersion}"
|
||||
+ compile "io.grpc:grpc-services:${grpcVersion}"
|
||||
compile "io.grpc:grpc-stub:${grpcVersion}"
|
||||
+ // This must match the version of netty used by grpcVersion
|
||||
+ compile "io.netty:netty-transport-native-epoll:4.1.8.Final:linux-x86_64"
|
||||
|
||||
testCompile "junit:junit:4.12"
|
||||
testCompile "org.mockito:mockito-core:1.9.5"
|
||||
--- a/examples/src/main/java/io/grpc/examples/helloworld/HelloWorldClient.java
|
||||
+++ b/examples/src/main/java/io/grpc/examples/helloworld/HelloWorldClient.java
|
||||
@@ -33,7 +33,18 @@ package io.grpc.examples.helloworld;
|
||||
|
||||
import io.grpc.ManagedChannel;
|
||||
import io.grpc.ManagedChannelBuilder;
|
||||
+import io.grpc.Server;
|
||||
import io.grpc.StatusRuntimeException;
|
||||
+import io.grpc.netty.NettyServerBuilder;
|
||||
+import io.grpc.protobuf.services.ProtoReflectionService;
|
||||
+import io.grpc.services.MonitoringService;
|
||||
+import io.netty.channel.EventLoopGroup;
|
||||
+import io.netty.channel.epoll.EpollEventLoopGroup;
|
||||
+import io.netty.channel.epoll.EpollServerDomainSocketChannel;
|
||||
+import io.netty.channel.unix.DomainSocketAddress;
|
||||
+import java.io.IOException;
|
||||
+import java.nio.file.FileSystems;
|
||||
+import java.nio.file.Files;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
@@ -79,11 +90,50 @@ public class HelloWorldClient {
|
||||
logger.info("Greeting: " + response.getMessage());
|
||||
}
|
||||
|
||||
+ private static class MonitoringServer {
|
||||
+ private Server server;
|
||||
+ private EventLoopGroup bossEventLoopGroup;
|
||||
+ private EventLoopGroup workerEventLoopGroup;
|
||||
+
|
||||
+ private void start(String udsFilename) throws IOException {
|
||||
+ logger.info("Trying to start monitoring service on " + udsFilename);
|
||||
+ logger.info("Will first delete " + udsFilename + " if it exists");
|
||||
+ Files.deleteIfExists(FileSystems.getDefault().getPath(udsFilename));
|
||||
+ bossEventLoopGroup = new EpollEventLoopGroup();
|
||||
+ workerEventLoopGroup = new EpollEventLoopGroup();
|
||||
+ /* This will throw an exception if StatsManager from instrumentation-java is unavailable */
|
||||
+ server =
|
||||
+ NettyServerBuilder.forAddress(new DomainSocketAddress(udsFilename))
|
||||
+ .channelType(EpollServerDomainSocketChannel.class)
|
||||
+ .bossEventLoopGroup(bossEventLoopGroup)
|
||||
+ .workerEventLoopGroup(workerEventLoopGroup)
|
||||
+ .addService(MonitoringService.getInstance())
|
||||
+ .addService(ProtoReflectionService.newInstance())
|
||||
+ .build();
|
||||
+ server.start();
|
||||
+ logger.info("Monitoring service started on " + udsFilename);
|
||||
+ Runtime.getRuntime().addShutdownHook(new Thread() {
|
||||
+ public void run() {
|
||||
+ MonitoringServer.this.stop();
|
||||
+ }
|
||||
+ });
|
||||
+ }
|
||||
+
|
||||
+ private void stop() {
|
||||
+ server.shutdown();
|
||||
+ bossEventLoopGroup.shutdownGracefully(0, 0, TimeUnit.SECONDS);
|
||||
+ workerEventLoopGroup.shutdownGracefully(0, 0, TimeUnit.SECONDS);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
* Greet server. If provided, the first element of {@code args} is the name to use in the
|
||||
* greeting.
|
||||
*/
|
||||
public static void main(String[] args) throws Exception {
|
||||
+ String udsFilename = "/tmp/grpc_monitoring.sock";
|
||||
+ MonitoringServer monitoringServer = new MonitoringServer();
|
||||
+ monitoringServer.start(udsFilename);
|
||||
HelloWorldClient client = new HelloWorldClient("localhost", 50051);
|
||||
try {
|
||||
/* Access a service running on the local machine on port 50051 */
|
||||
@@ -92,8 +142,11 @@ public class HelloWorldClient {
|
||||
user = args[0]; /* Use the arg as the name to greet if provided */
|
||||
}
|
||||
client.greet(user);
|
||||
+ /* Sleep for 60 seconds to allow time for querying the monitoring server */
|
||||
+ TimeUnit.SECONDS.sleep(60);
|
||||
} finally {
|
||||
client.shutdown();
|
||||
+ monitoringServer.stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
# Querying the service
|
||||
|
||||
The monitoring service's `GetCanonicalStats` method returns a list of stats
|
||||
recorded by gRPC, including latencies, bytes sent and received, and error
|
||||
counts.
|
||||
|
||||
You can query the service via the
|
||||
[`grpc_cli`](https://github.com/grpc/grpc/blob/master/doc/command_line_tool.md)
|
||||
command line tool as follows:
|
||||
|
||||
```sh
|
||||
$ bins/opt/grpc_cli call localhost:50052 \
|
||||
grpc.instrumentation.v1alpha.Monitoring.GetCanonicalRpcStats ''
|
||||
```
|
||||
|
||||
If the server is running on a UDS, it can be queried as follows:
|
||||
|
||||
```sh
|
||||
$ bins/opt/grpc_cli call 'unix:///tmp/grpc_monitoring.sock' \
|
||||
grpc.instrumentation.v1alpha.Monitoring.GetCanonicalRpcStats ''
|
||||
```
|
||||
|
||||
The response data comes as
|
||||
[`instrumentation`](https://github.com/google/instrumentation-proto/blob/master/stats/census.proto)
|
||||
protocol buffers. For each metric, such as `rpc_client_errors`, there is a
|
||||
`google.instrumentation.MeasurementDescriptor` and
|
||||
`google.instrumentation.ViewDescriptor` which describe the measurement and view,
|
||||
respectively, and a `google.instrumentation.View` that contains the actual data.
|
||||
The comments on the [proto
|
||||
file](https://github.com/google/instrumentation-proto/blob/master/stats/census.proto)
|
||||
describe the contents of each of these types.
|
|
@ -16,14 +16,6 @@ description = "gRPC: Services"
|
|||
dependencies {
|
||||
compile project(':grpc-protobuf'),
|
||||
project(':grpc-stub')
|
||||
compile (libraries.instrumentation_api) {
|
||||
// prefer 2.0.19 from libraries instead of 2.0.11
|
||||
exclude group: 'com.google.errorprone', module: 'error_prone_annotations'
|
||||
// prefer 20.0 from libraries instead of 19.0
|
||||
exclude group: 'com.google.guava', module: 'guava'
|
||||
// we'll always be more up-to-date
|
||||
exclude group: 'io.grpc', module: 'grpc-context'
|
||||
}
|
||||
compileOnly libraries.javax_annotation
|
||||
testCompile project(':grpc-testing'),
|
||||
libraries.netty_epoll // for DomainSocketAddress
|
||||
|
|
|
@ -1,668 +0,0 @@
|
|||
package io.grpc.instrumentation.v1alpha;
|
||||
|
||||
import static io.grpc.MethodDescriptor.generateFullMethodName;
|
||||
import static io.grpc.stub.ClientCalls.asyncBidiStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.asyncClientStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.asyncServerStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.asyncUnaryCall;
|
||||
import static io.grpc.stub.ClientCalls.blockingServerStreamingCall;
|
||||
import static io.grpc.stub.ClientCalls.blockingUnaryCall;
|
||||
import static io.grpc.stub.ClientCalls.futureUnaryCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncBidiStreamingCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncClientStreamingCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncServerStreamingCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncUnaryCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncUnimplementedStreamingCall;
|
||||
import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall;
|
||||
|
||||
/**
|
||||
*/
|
||||
@javax.annotation.Generated(
|
||||
value = "by gRPC proto compiler",
|
||||
comments = "Source: grpc/instrumentation/v1alpha/monitoring.proto")
|
||||
public final class MonitoringGrpc {
|
||||
|
||||
private MonitoringGrpc() {}
|
||||
|
||||
public static final String SERVICE_NAME = "grpc.instrumentation.v1alpha.Monitoring";
|
||||
|
||||
// Static method descriptors that strictly reflect the proto.
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
@java.lang.Deprecated // Use {@link #getGetCanonicalRpcStatsMethod()} instead.
|
||||
public static final io.grpc.MethodDescriptor<com.google.protobuf.Empty,
|
||||
io.grpc.instrumentation.v1alpha.CanonicalRpcStats> METHOD_GET_CANONICAL_RPC_STATS = getGetCanonicalRpcStatsMethodHelper();
|
||||
|
||||
private static volatile io.grpc.MethodDescriptor<com.google.protobuf.Empty,
|
||||
io.grpc.instrumentation.v1alpha.CanonicalRpcStats> getGetCanonicalRpcStatsMethod;
|
||||
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
public static io.grpc.MethodDescriptor<com.google.protobuf.Empty,
|
||||
io.grpc.instrumentation.v1alpha.CanonicalRpcStats> getGetCanonicalRpcStatsMethod() {
|
||||
return getGetCanonicalRpcStatsMethodHelper();
|
||||
}
|
||||
|
||||
private static io.grpc.MethodDescriptor<com.google.protobuf.Empty,
|
||||
io.grpc.instrumentation.v1alpha.CanonicalRpcStats> getGetCanonicalRpcStatsMethodHelper() {
|
||||
io.grpc.MethodDescriptor<com.google.protobuf.Empty, io.grpc.instrumentation.v1alpha.CanonicalRpcStats> getGetCanonicalRpcStatsMethod;
|
||||
if ((getGetCanonicalRpcStatsMethod = MonitoringGrpc.getGetCanonicalRpcStatsMethod) == null) {
|
||||
synchronized (MonitoringGrpc.class) {
|
||||
if ((getGetCanonicalRpcStatsMethod = MonitoringGrpc.getGetCanonicalRpcStatsMethod) == null) {
|
||||
MonitoringGrpc.getGetCanonicalRpcStatsMethod = getGetCanonicalRpcStatsMethod =
|
||||
io.grpc.MethodDescriptor.<com.google.protobuf.Empty, io.grpc.instrumentation.v1alpha.CanonicalRpcStats>newBuilder()
|
||||
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||
.setFullMethodName(generateFullMethodName(
|
||||
"grpc.instrumentation.v1alpha.Monitoring", "GetCanonicalRpcStats"))
|
||||
.setSampledToLocalTracing(true)
|
||||
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
||||
com.google.protobuf.Empty.getDefaultInstance()))
|
||||
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
||||
io.grpc.instrumentation.v1alpha.CanonicalRpcStats.getDefaultInstance()))
|
||||
.setSchemaDescriptor(new MonitoringMethodDescriptorSupplier("GetCanonicalRpcStats"))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
}
|
||||
return getGetCanonicalRpcStatsMethod;
|
||||
}
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
@java.lang.Deprecated // Use {@link #getGetStatsMethod()} instead.
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.StatsRequest,
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse> METHOD_GET_STATS = getGetStatsMethodHelper();
|
||||
|
||||
private static volatile io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.StatsRequest,
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse> getGetStatsMethod;
|
||||
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
public static io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.StatsRequest,
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse> getGetStatsMethod() {
|
||||
return getGetStatsMethodHelper();
|
||||
}
|
||||
|
||||
private static io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.StatsRequest,
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse> getGetStatsMethodHelper() {
|
||||
io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.StatsRequest, io.grpc.instrumentation.v1alpha.StatsResponse> getGetStatsMethod;
|
||||
if ((getGetStatsMethod = MonitoringGrpc.getGetStatsMethod) == null) {
|
||||
synchronized (MonitoringGrpc.class) {
|
||||
if ((getGetStatsMethod = MonitoringGrpc.getGetStatsMethod) == null) {
|
||||
MonitoringGrpc.getGetStatsMethod = getGetStatsMethod =
|
||||
io.grpc.MethodDescriptor.<io.grpc.instrumentation.v1alpha.StatsRequest, io.grpc.instrumentation.v1alpha.StatsResponse>newBuilder()
|
||||
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||
.setFullMethodName(generateFullMethodName(
|
||||
"grpc.instrumentation.v1alpha.Monitoring", "GetStats"))
|
||||
.setSampledToLocalTracing(true)
|
||||
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
||||
io.grpc.instrumentation.v1alpha.StatsRequest.getDefaultInstance()))
|
||||
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse.getDefaultInstance()))
|
||||
.setSchemaDescriptor(new MonitoringMethodDescriptorSupplier("GetStats"))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
}
|
||||
return getGetStatsMethod;
|
||||
}
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
@java.lang.Deprecated // Use {@link #getWatchStatsMethod()} instead.
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.StatsRequest,
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse> METHOD_WATCH_STATS = getWatchStatsMethodHelper();
|
||||
|
||||
private static volatile io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.StatsRequest,
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse> getWatchStatsMethod;
|
||||
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
public static io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.StatsRequest,
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse> getWatchStatsMethod() {
|
||||
return getWatchStatsMethodHelper();
|
||||
}
|
||||
|
||||
private static io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.StatsRequest,
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse> getWatchStatsMethodHelper() {
|
||||
io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.StatsRequest, io.grpc.instrumentation.v1alpha.StatsResponse> getWatchStatsMethod;
|
||||
if ((getWatchStatsMethod = MonitoringGrpc.getWatchStatsMethod) == null) {
|
||||
synchronized (MonitoringGrpc.class) {
|
||||
if ((getWatchStatsMethod = MonitoringGrpc.getWatchStatsMethod) == null) {
|
||||
MonitoringGrpc.getWatchStatsMethod = getWatchStatsMethod =
|
||||
io.grpc.MethodDescriptor.<io.grpc.instrumentation.v1alpha.StatsRequest, io.grpc.instrumentation.v1alpha.StatsResponse>newBuilder()
|
||||
.setType(io.grpc.MethodDescriptor.MethodType.SERVER_STREAMING)
|
||||
.setFullMethodName(generateFullMethodName(
|
||||
"grpc.instrumentation.v1alpha.Monitoring", "WatchStats"))
|
||||
.setSampledToLocalTracing(true)
|
||||
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
||||
io.grpc.instrumentation.v1alpha.StatsRequest.getDefaultInstance()))
|
||||
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse.getDefaultInstance()))
|
||||
.setSchemaDescriptor(new MonitoringMethodDescriptorSupplier("WatchStats"))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
}
|
||||
return getWatchStatsMethod;
|
||||
}
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
@java.lang.Deprecated // Use {@link #getGetRequestTracesMethod()} instead.
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.TraceRequest,
|
||||
io.grpc.instrumentation.v1alpha.TraceResponse> METHOD_GET_REQUEST_TRACES = getGetRequestTracesMethodHelper();
|
||||
|
||||
private static volatile io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.TraceRequest,
|
||||
io.grpc.instrumentation.v1alpha.TraceResponse> getGetRequestTracesMethod;
|
||||
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
public static io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.TraceRequest,
|
||||
io.grpc.instrumentation.v1alpha.TraceResponse> getGetRequestTracesMethod() {
|
||||
return getGetRequestTracesMethodHelper();
|
||||
}
|
||||
|
||||
private static io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.TraceRequest,
|
||||
io.grpc.instrumentation.v1alpha.TraceResponse> getGetRequestTracesMethodHelper() {
|
||||
io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.TraceRequest, io.grpc.instrumentation.v1alpha.TraceResponse> getGetRequestTracesMethod;
|
||||
if ((getGetRequestTracesMethod = MonitoringGrpc.getGetRequestTracesMethod) == null) {
|
||||
synchronized (MonitoringGrpc.class) {
|
||||
if ((getGetRequestTracesMethod = MonitoringGrpc.getGetRequestTracesMethod) == null) {
|
||||
MonitoringGrpc.getGetRequestTracesMethod = getGetRequestTracesMethod =
|
||||
io.grpc.MethodDescriptor.<io.grpc.instrumentation.v1alpha.TraceRequest, io.grpc.instrumentation.v1alpha.TraceResponse>newBuilder()
|
||||
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||
.setFullMethodName(generateFullMethodName(
|
||||
"grpc.instrumentation.v1alpha.Monitoring", "GetRequestTraces"))
|
||||
.setSampledToLocalTracing(true)
|
||||
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
||||
io.grpc.instrumentation.v1alpha.TraceRequest.getDefaultInstance()))
|
||||
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
||||
io.grpc.instrumentation.v1alpha.TraceResponse.getDefaultInstance()))
|
||||
.setSchemaDescriptor(new MonitoringMethodDescriptorSupplier("GetRequestTraces"))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
}
|
||||
return getGetRequestTracesMethod;
|
||||
}
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
@java.lang.Deprecated // Use {@link #getGetCustomMonitoringDataMethod()} instead.
|
||||
public static final io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.MonitoringDataGroup,
|
||||
io.grpc.instrumentation.v1alpha.CustomMonitoringData> METHOD_GET_CUSTOM_MONITORING_DATA = getGetCustomMonitoringDataMethodHelper();
|
||||
|
||||
private static volatile io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.MonitoringDataGroup,
|
||||
io.grpc.instrumentation.v1alpha.CustomMonitoringData> getGetCustomMonitoringDataMethod;
|
||||
|
||||
@io.grpc.ExperimentalApi("https://github.com/grpc/grpc-java/issues/1901")
|
||||
public static io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.MonitoringDataGroup,
|
||||
io.grpc.instrumentation.v1alpha.CustomMonitoringData> getGetCustomMonitoringDataMethod() {
|
||||
return getGetCustomMonitoringDataMethodHelper();
|
||||
}
|
||||
|
||||
private static io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.MonitoringDataGroup,
|
||||
io.grpc.instrumentation.v1alpha.CustomMonitoringData> getGetCustomMonitoringDataMethodHelper() {
|
||||
io.grpc.MethodDescriptor<io.grpc.instrumentation.v1alpha.MonitoringDataGroup, io.grpc.instrumentation.v1alpha.CustomMonitoringData> getGetCustomMonitoringDataMethod;
|
||||
if ((getGetCustomMonitoringDataMethod = MonitoringGrpc.getGetCustomMonitoringDataMethod) == null) {
|
||||
synchronized (MonitoringGrpc.class) {
|
||||
if ((getGetCustomMonitoringDataMethod = MonitoringGrpc.getGetCustomMonitoringDataMethod) == null) {
|
||||
MonitoringGrpc.getGetCustomMonitoringDataMethod = getGetCustomMonitoringDataMethod =
|
||||
io.grpc.MethodDescriptor.<io.grpc.instrumentation.v1alpha.MonitoringDataGroup, io.grpc.instrumentation.v1alpha.CustomMonitoringData>newBuilder()
|
||||
.setType(io.grpc.MethodDescriptor.MethodType.UNARY)
|
||||
.setFullMethodName(generateFullMethodName(
|
||||
"grpc.instrumentation.v1alpha.Monitoring", "GetCustomMonitoringData"))
|
||||
.setSampledToLocalTracing(true)
|
||||
.setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
||||
io.grpc.instrumentation.v1alpha.MonitoringDataGroup.getDefaultInstance()))
|
||||
.setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller(
|
||||
io.grpc.instrumentation.v1alpha.CustomMonitoringData.getDefaultInstance()))
|
||||
.setSchemaDescriptor(new MonitoringMethodDescriptorSupplier("GetCustomMonitoringData"))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
}
|
||||
return getGetCustomMonitoringDataMethod;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new async stub that supports all call types for the service
|
||||
*/
|
||||
public static MonitoringStub newStub(io.grpc.Channel channel) {
|
||||
return new MonitoringStub(channel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new blocking-style stub that supports unary and streaming output calls on the service
|
||||
*/
|
||||
public static MonitoringBlockingStub newBlockingStub(
|
||||
io.grpc.Channel channel) {
|
||||
return new MonitoringBlockingStub(channel);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new ListenableFuture-style stub that supports unary calls on the service
|
||||
*/
|
||||
public static MonitoringFutureStub newFutureStub(
|
||||
io.grpc.Channel channel) {
|
||||
return new MonitoringFutureStub(channel);
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static abstract class MonitoringImplBase implements io.grpc.BindableService {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Return canonical RPC stats
|
||||
* </pre>
|
||||
*/
|
||||
public void getCanonicalRpcStats(com.google.protobuf.Empty request,
|
||||
io.grpc.stub.StreamObserver<io.grpc.instrumentation.v1alpha.CanonicalRpcStats> responseObserver) {
|
||||
asyncUnimplementedUnaryCall(getGetCanonicalRpcStatsMethodHelper(), responseObserver);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Query the server for specific stats
|
||||
* </pre>
|
||||
*/
|
||||
public void getStats(io.grpc.instrumentation.v1alpha.StatsRequest request,
|
||||
io.grpc.stub.StreamObserver<io.grpc.instrumentation.v1alpha.StatsResponse> responseObserver) {
|
||||
asyncUnimplementedUnaryCall(getGetStatsMethodHelper(), responseObserver);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Request the server to stream back snapshots of the requested stats
|
||||
* </pre>
|
||||
*/
|
||||
public void watchStats(io.grpc.instrumentation.v1alpha.StatsRequest request,
|
||||
io.grpc.stub.StreamObserver<io.grpc.instrumentation.v1alpha.StatsResponse> responseObserver) {
|
||||
asyncUnimplementedUnaryCall(getWatchStatsMethodHelper(), responseObserver);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Return request traces.
|
||||
* </pre>
|
||||
*/
|
||||
public void getRequestTraces(io.grpc.instrumentation.v1alpha.TraceRequest request,
|
||||
io.grpc.stub.StreamObserver<io.grpc.instrumentation.v1alpha.TraceResponse> responseObserver) {
|
||||
asyncUnimplementedUnaryCall(getGetRequestTracesMethodHelper(), responseObserver);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Return application-defined groups of monitoring data.
|
||||
* This is a low level facility to allow extension of the monitoring API to
|
||||
* application-specific monitoring data. Frameworks may use this to define
|
||||
* additional groups of monitoring data made available by servers.
|
||||
* </pre>
|
||||
*/
|
||||
public void getCustomMonitoringData(io.grpc.instrumentation.v1alpha.MonitoringDataGroup request,
|
||||
io.grpc.stub.StreamObserver<io.grpc.instrumentation.v1alpha.CustomMonitoringData> responseObserver) {
|
||||
asyncUnimplementedUnaryCall(getGetCustomMonitoringDataMethodHelper(), responseObserver);
|
||||
}
|
||||
|
||||
@java.lang.Override public final io.grpc.ServerServiceDefinition bindService() {
|
||||
return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor())
|
||||
.addMethod(
|
||||
getGetCanonicalRpcStatsMethodHelper(),
|
||||
asyncUnaryCall(
|
||||
new MethodHandlers<
|
||||
com.google.protobuf.Empty,
|
||||
io.grpc.instrumentation.v1alpha.CanonicalRpcStats>(
|
||||
this, METHODID_GET_CANONICAL_RPC_STATS)))
|
||||
.addMethod(
|
||||
getGetStatsMethodHelper(),
|
||||
asyncUnaryCall(
|
||||
new MethodHandlers<
|
||||
io.grpc.instrumentation.v1alpha.StatsRequest,
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse>(
|
||||
this, METHODID_GET_STATS)))
|
||||
.addMethod(
|
||||
getWatchStatsMethodHelper(),
|
||||
asyncServerStreamingCall(
|
||||
new MethodHandlers<
|
||||
io.grpc.instrumentation.v1alpha.StatsRequest,
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse>(
|
||||
this, METHODID_WATCH_STATS)))
|
||||
.addMethod(
|
||||
getGetRequestTracesMethodHelper(),
|
||||
asyncUnaryCall(
|
||||
new MethodHandlers<
|
||||
io.grpc.instrumentation.v1alpha.TraceRequest,
|
||||
io.grpc.instrumentation.v1alpha.TraceResponse>(
|
||||
this, METHODID_GET_REQUEST_TRACES)))
|
||||
.addMethod(
|
||||
getGetCustomMonitoringDataMethodHelper(),
|
||||
asyncUnaryCall(
|
||||
new MethodHandlers<
|
||||
io.grpc.instrumentation.v1alpha.MonitoringDataGroup,
|
||||
io.grpc.instrumentation.v1alpha.CustomMonitoringData>(
|
||||
this, METHODID_GET_CUSTOM_MONITORING_DATA)))
|
||||
.build();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static final class MonitoringStub extends io.grpc.stub.AbstractStub<MonitoringStub> {
|
||||
private MonitoringStub(io.grpc.Channel channel) {
|
||||
super(channel);
|
||||
}
|
||||
|
||||
private MonitoringStub(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
super(channel, callOptions);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected MonitoringStub build(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
return new MonitoringStub(channel, callOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Return canonical RPC stats
|
||||
* </pre>
|
||||
*/
|
||||
public void getCanonicalRpcStats(com.google.protobuf.Empty request,
|
||||
io.grpc.stub.StreamObserver<io.grpc.instrumentation.v1alpha.CanonicalRpcStats> responseObserver) {
|
||||
asyncUnaryCall(
|
||||
getChannel().newCall(getGetCanonicalRpcStatsMethodHelper(), getCallOptions()), request, responseObserver);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Query the server for specific stats
|
||||
* </pre>
|
||||
*/
|
||||
public void getStats(io.grpc.instrumentation.v1alpha.StatsRequest request,
|
||||
io.grpc.stub.StreamObserver<io.grpc.instrumentation.v1alpha.StatsResponse> responseObserver) {
|
||||
asyncUnaryCall(
|
||||
getChannel().newCall(getGetStatsMethodHelper(), getCallOptions()), request, responseObserver);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Request the server to stream back snapshots of the requested stats
|
||||
* </pre>
|
||||
*/
|
||||
public void watchStats(io.grpc.instrumentation.v1alpha.StatsRequest request,
|
||||
io.grpc.stub.StreamObserver<io.grpc.instrumentation.v1alpha.StatsResponse> responseObserver) {
|
||||
asyncServerStreamingCall(
|
||||
getChannel().newCall(getWatchStatsMethodHelper(), getCallOptions()), request, responseObserver);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Return request traces.
|
||||
* </pre>
|
||||
*/
|
||||
public void getRequestTraces(io.grpc.instrumentation.v1alpha.TraceRequest request,
|
||||
io.grpc.stub.StreamObserver<io.grpc.instrumentation.v1alpha.TraceResponse> responseObserver) {
|
||||
asyncUnaryCall(
|
||||
getChannel().newCall(getGetRequestTracesMethodHelper(), getCallOptions()), request, responseObserver);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Return application-defined groups of monitoring data.
|
||||
* This is a low level facility to allow extension of the monitoring API to
|
||||
* application-specific monitoring data. Frameworks may use this to define
|
||||
* additional groups of monitoring data made available by servers.
|
||||
* </pre>
|
||||
*/
|
||||
public void getCustomMonitoringData(io.grpc.instrumentation.v1alpha.MonitoringDataGroup request,
|
||||
io.grpc.stub.StreamObserver<io.grpc.instrumentation.v1alpha.CustomMonitoringData> responseObserver) {
|
||||
asyncUnaryCall(
|
||||
getChannel().newCall(getGetCustomMonitoringDataMethodHelper(), getCallOptions()), request, responseObserver);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static final class MonitoringBlockingStub extends io.grpc.stub.AbstractStub<MonitoringBlockingStub> {
|
||||
private MonitoringBlockingStub(io.grpc.Channel channel) {
|
||||
super(channel);
|
||||
}
|
||||
|
||||
private MonitoringBlockingStub(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
super(channel, callOptions);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected MonitoringBlockingStub build(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
return new MonitoringBlockingStub(channel, callOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Return canonical RPC stats
|
||||
* </pre>
|
||||
*/
|
||||
public io.grpc.instrumentation.v1alpha.CanonicalRpcStats getCanonicalRpcStats(com.google.protobuf.Empty request) {
|
||||
return blockingUnaryCall(
|
||||
getChannel(), getGetCanonicalRpcStatsMethodHelper(), getCallOptions(), request);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Query the server for specific stats
|
||||
* </pre>
|
||||
*/
|
||||
public io.grpc.instrumentation.v1alpha.StatsResponse getStats(io.grpc.instrumentation.v1alpha.StatsRequest request) {
|
||||
return blockingUnaryCall(
|
||||
getChannel(), getGetStatsMethodHelper(), getCallOptions(), request);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Request the server to stream back snapshots of the requested stats
|
||||
* </pre>
|
||||
*/
|
||||
public java.util.Iterator<io.grpc.instrumentation.v1alpha.StatsResponse> watchStats(
|
||||
io.grpc.instrumentation.v1alpha.StatsRequest request) {
|
||||
return blockingServerStreamingCall(
|
||||
getChannel(), getWatchStatsMethodHelper(), getCallOptions(), request);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Return request traces.
|
||||
* </pre>
|
||||
*/
|
||||
public io.grpc.instrumentation.v1alpha.TraceResponse getRequestTraces(io.grpc.instrumentation.v1alpha.TraceRequest request) {
|
||||
return blockingUnaryCall(
|
||||
getChannel(), getGetRequestTracesMethodHelper(), getCallOptions(), request);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Return application-defined groups of monitoring data.
|
||||
* This is a low level facility to allow extension of the monitoring API to
|
||||
* application-specific monitoring data. Frameworks may use this to define
|
||||
* additional groups of monitoring data made available by servers.
|
||||
* </pre>
|
||||
*/
|
||||
public io.grpc.instrumentation.v1alpha.CustomMonitoringData getCustomMonitoringData(io.grpc.instrumentation.v1alpha.MonitoringDataGroup request) {
|
||||
return blockingUnaryCall(
|
||||
getChannel(), getGetCustomMonitoringDataMethodHelper(), getCallOptions(), request);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*/
|
||||
public static final class MonitoringFutureStub extends io.grpc.stub.AbstractStub<MonitoringFutureStub> {
|
||||
private MonitoringFutureStub(io.grpc.Channel channel) {
|
||||
super(channel);
|
||||
}
|
||||
|
||||
private MonitoringFutureStub(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
super(channel, callOptions);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected MonitoringFutureStub build(io.grpc.Channel channel,
|
||||
io.grpc.CallOptions callOptions) {
|
||||
return new MonitoringFutureStub(channel, callOptions);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Return canonical RPC stats
|
||||
* </pre>
|
||||
*/
|
||||
public com.google.common.util.concurrent.ListenableFuture<io.grpc.instrumentation.v1alpha.CanonicalRpcStats> getCanonicalRpcStats(
|
||||
com.google.protobuf.Empty request) {
|
||||
return futureUnaryCall(
|
||||
getChannel().newCall(getGetCanonicalRpcStatsMethodHelper(), getCallOptions()), request);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Query the server for specific stats
|
||||
* </pre>
|
||||
*/
|
||||
public com.google.common.util.concurrent.ListenableFuture<io.grpc.instrumentation.v1alpha.StatsResponse> getStats(
|
||||
io.grpc.instrumentation.v1alpha.StatsRequest request) {
|
||||
return futureUnaryCall(
|
||||
getChannel().newCall(getGetStatsMethodHelper(), getCallOptions()), request);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Return request traces.
|
||||
* </pre>
|
||||
*/
|
||||
public com.google.common.util.concurrent.ListenableFuture<io.grpc.instrumentation.v1alpha.TraceResponse> getRequestTraces(
|
||||
io.grpc.instrumentation.v1alpha.TraceRequest request) {
|
||||
return futureUnaryCall(
|
||||
getChannel().newCall(getGetRequestTracesMethodHelper(), getCallOptions()), request);
|
||||
}
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Return application-defined groups of monitoring data.
|
||||
* This is a low level facility to allow extension of the monitoring API to
|
||||
* application-specific monitoring data. Frameworks may use this to define
|
||||
* additional groups of monitoring data made available by servers.
|
||||
* </pre>
|
||||
*/
|
||||
public com.google.common.util.concurrent.ListenableFuture<io.grpc.instrumentation.v1alpha.CustomMonitoringData> getCustomMonitoringData(
|
||||
io.grpc.instrumentation.v1alpha.MonitoringDataGroup request) {
|
||||
return futureUnaryCall(
|
||||
getChannel().newCall(getGetCustomMonitoringDataMethodHelper(), getCallOptions()), request);
|
||||
}
|
||||
}
|
||||
|
||||
private static final int METHODID_GET_CANONICAL_RPC_STATS = 0;
|
||||
private static final int METHODID_GET_STATS = 1;
|
||||
private static final int METHODID_WATCH_STATS = 2;
|
||||
private static final int METHODID_GET_REQUEST_TRACES = 3;
|
||||
private static final int METHODID_GET_CUSTOM_MONITORING_DATA = 4;
|
||||
|
||||
private static final class MethodHandlers<Req, Resp> implements
|
||||
io.grpc.stub.ServerCalls.UnaryMethod<Req, Resp>,
|
||||
io.grpc.stub.ServerCalls.ServerStreamingMethod<Req, Resp>,
|
||||
io.grpc.stub.ServerCalls.ClientStreamingMethod<Req, Resp>,
|
||||
io.grpc.stub.ServerCalls.BidiStreamingMethod<Req, Resp> {
|
||||
private final MonitoringImplBase serviceImpl;
|
||||
private final int methodId;
|
||||
|
||||
MethodHandlers(MonitoringImplBase serviceImpl, int methodId) {
|
||||
this.serviceImpl = serviceImpl;
|
||||
this.methodId = methodId;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("unchecked")
|
||||
public void invoke(Req request, io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
||||
switch (methodId) {
|
||||
case METHODID_GET_CANONICAL_RPC_STATS:
|
||||
serviceImpl.getCanonicalRpcStats((com.google.protobuf.Empty) request,
|
||||
(io.grpc.stub.StreamObserver<io.grpc.instrumentation.v1alpha.CanonicalRpcStats>) responseObserver);
|
||||
break;
|
||||
case METHODID_GET_STATS:
|
||||
serviceImpl.getStats((io.grpc.instrumentation.v1alpha.StatsRequest) request,
|
||||
(io.grpc.stub.StreamObserver<io.grpc.instrumentation.v1alpha.StatsResponse>) responseObserver);
|
||||
break;
|
||||
case METHODID_WATCH_STATS:
|
||||
serviceImpl.watchStats((io.grpc.instrumentation.v1alpha.StatsRequest) request,
|
||||
(io.grpc.stub.StreamObserver<io.grpc.instrumentation.v1alpha.StatsResponse>) responseObserver);
|
||||
break;
|
||||
case METHODID_GET_REQUEST_TRACES:
|
||||
serviceImpl.getRequestTraces((io.grpc.instrumentation.v1alpha.TraceRequest) request,
|
||||
(io.grpc.stub.StreamObserver<io.grpc.instrumentation.v1alpha.TraceResponse>) responseObserver);
|
||||
break;
|
||||
case METHODID_GET_CUSTOM_MONITORING_DATA:
|
||||
serviceImpl.getCustomMonitoringData((io.grpc.instrumentation.v1alpha.MonitoringDataGroup) request,
|
||||
(io.grpc.stub.StreamObserver<io.grpc.instrumentation.v1alpha.CustomMonitoringData>) responseObserver);
|
||||
break;
|
||||
default:
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
@java.lang.SuppressWarnings("unchecked")
|
||||
public io.grpc.stub.StreamObserver<Req> invoke(
|
||||
io.grpc.stub.StreamObserver<Resp> responseObserver) {
|
||||
switch (methodId) {
|
||||
default:
|
||||
throw new AssertionError();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static abstract class MonitoringBaseDescriptorSupplier
|
||||
implements io.grpc.protobuf.ProtoFileDescriptorSupplier, io.grpc.protobuf.ProtoServiceDescriptorSupplier {
|
||||
MonitoringBaseDescriptorSupplier() {}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.getDescriptor();
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() {
|
||||
return getFileDescriptor().findServiceByName("Monitoring");
|
||||
}
|
||||
}
|
||||
|
||||
private static final class MonitoringFileDescriptorSupplier
|
||||
extends MonitoringBaseDescriptorSupplier {
|
||||
MonitoringFileDescriptorSupplier() {}
|
||||
}
|
||||
|
||||
private static final class MonitoringMethodDescriptorSupplier
|
||||
extends MonitoringBaseDescriptorSupplier
|
||||
implements io.grpc.protobuf.ProtoMethodDescriptorSupplier {
|
||||
private final String methodName;
|
||||
|
||||
MonitoringMethodDescriptorSupplier(String methodName) {
|
||||
this.methodName = methodName;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Descriptors.MethodDescriptor getMethodDescriptor() {
|
||||
return getServiceDescriptor().findMethodByName(methodName);
|
||||
}
|
||||
}
|
||||
|
||||
private static volatile io.grpc.ServiceDescriptor serviceDescriptor;
|
||||
|
||||
public static io.grpc.ServiceDescriptor getServiceDescriptor() {
|
||||
io.grpc.ServiceDescriptor result = serviceDescriptor;
|
||||
if (result == null) {
|
||||
synchronized (MonitoringGrpc.class) {
|
||||
result = serviceDescriptor;
|
||||
if (result == null) {
|
||||
serviceDescriptor = result = io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME)
|
||||
.setSchemaDescriptor(new MonitoringFileDescriptorSupplier())
|
||||
.addMethod(getGetCanonicalRpcStatsMethodHelper())
|
||||
.addMethod(getGetStatsMethodHelper())
|
||||
.addMethod(getWatchStatsMethodHelper())
|
||||
.addMethod(getGetRequestTracesMethodHelper())
|
||||
.addMethod(getGetCustomMonitoringDataMethodHelper())
|
||||
.build();
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,242 +0,0 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: grpc/instrumentation/v1alpha/monitoring.proto
|
||||
|
||||
package io.grpc.instrumentation.v1alpha;
|
||||
|
||||
public interface CanonicalRpcStatsOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.instrumentation.v1alpha.CanonicalRpcStats)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_errors = 1;</code>
|
||||
*/
|
||||
boolean hasRpcClientErrors();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_errors = 1;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse getRpcClientErrors();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_errors = 1;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponseOrBuilder getRpcClientErrorsOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_completed_rpcs = 2;</code>
|
||||
*/
|
||||
boolean hasRpcClientCompletedRpcs();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_completed_rpcs = 2;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse getRpcClientCompletedRpcs();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_completed_rpcs = 2;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponseOrBuilder getRpcClientCompletedRpcsOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_started_rpcs = 3;</code>
|
||||
*/
|
||||
boolean hasRpcClientStartedRpcs();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_started_rpcs = 3;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse getRpcClientStartedRpcs();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_started_rpcs = 3;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponseOrBuilder getRpcClientStartedRpcsOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_elapsed_time = 4;</code>
|
||||
*/
|
||||
boolean hasRpcClientElapsedTime();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_elapsed_time = 4;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse getRpcClientElapsedTime();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_elapsed_time = 4;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponseOrBuilder getRpcClientElapsedTimeOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_server_elapsed_time = 5;</code>
|
||||
*/
|
||||
boolean hasRpcClientServerElapsedTime();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_server_elapsed_time = 5;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse getRpcClientServerElapsedTime();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_server_elapsed_time = 5;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponseOrBuilder getRpcClientServerElapsedTimeOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_request_bytes = 6;</code>
|
||||
*/
|
||||
boolean hasRpcClientRequestBytes();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_request_bytes = 6;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse getRpcClientRequestBytes();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_request_bytes = 6;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponseOrBuilder getRpcClientRequestBytesOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_response_bytes = 7;</code>
|
||||
*/
|
||||
boolean hasRpcClientResponseBytes();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_response_bytes = 7;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse getRpcClientResponseBytes();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_response_bytes = 7;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponseOrBuilder getRpcClientResponseBytesOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_request_count = 8;</code>
|
||||
*/
|
||||
boolean hasRpcClientRequestCount();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_request_count = 8;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse getRpcClientRequestCount();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_request_count = 8;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponseOrBuilder getRpcClientRequestCountOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_response_count = 9;</code>
|
||||
*/
|
||||
boolean hasRpcClientResponseCount();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_response_count = 9;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse getRpcClientResponseCount();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_client_response_count = 9;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponseOrBuilder getRpcClientResponseCountOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_errors = 10;</code>
|
||||
*/
|
||||
boolean hasRpcServerErrors();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_errors = 10;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse getRpcServerErrors();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_errors = 10;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponseOrBuilder getRpcServerErrorsOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_completed_rpcs = 11;</code>
|
||||
*/
|
||||
boolean hasRpcServerCompletedRpcs();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_completed_rpcs = 11;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse getRpcServerCompletedRpcs();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_completed_rpcs = 11;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponseOrBuilder getRpcServerCompletedRpcsOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_server_elapsed_time = 12;</code>
|
||||
*/
|
||||
boolean hasRpcServerServerElapsedTime();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_server_elapsed_time = 12;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse getRpcServerServerElapsedTime();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_server_elapsed_time = 12;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponseOrBuilder getRpcServerServerElapsedTimeOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_request_bytes = 13;</code>
|
||||
*/
|
||||
boolean hasRpcServerRequestBytes();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_request_bytes = 13;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse getRpcServerRequestBytes();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_request_bytes = 13;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponseOrBuilder getRpcServerRequestBytesOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_response_bytes = 14;</code>
|
||||
*/
|
||||
boolean hasRpcServerResponseBytes();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_response_bytes = 14;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse getRpcServerResponseBytes();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_response_bytes = 14;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponseOrBuilder getRpcServerResponseBytesOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_request_count = 15;</code>
|
||||
*/
|
||||
boolean hasRpcServerRequestCount();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_request_count = 15;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse getRpcServerRequestCount();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_request_count = 15;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponseOrBuilder getRpcServerRequestCountOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_response_count = 16;</code>
|
||||
*/
|
||||
boolean hasRpcServerResponseCount();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_response_count = 16;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse getRpcServerResponseCount();
|
||||
/**
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_response_count = 16;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponseOrBuilder getRpcServerResponseCountOrBuilder();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
*TODO(ericgribkoff) Add minute-hour interval stats.
|
||||
* </pre>
|
||||
*
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_elapsed_time = 17;</code>
|
||||
*/
|
||||
boolean hasRpcServerElapsedTime();
|
||||
/**
|
||||
* <pre>
|
||||
*TODO(ericgribkoff) Add minute-hour interval stats.
|
||||
* </pre>
|
||||
*
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_elapsed_time = 17;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponse getRpcServerElapsedTime();
|
||||
/**
|
||||
* <pre>
|
||||
*TODO(ericgribkoff) Add minute-hour interval stats.
|
||||
* </pre>
|
||||
*
|
||||
* <code>.grpc.instrumentation.v1alpha.StatsResponse rpc_server_elapsed_time = 17;</code>
|
||||
*/
|
||||
io.grpc.instrumentation.v1alpha.StatsResponseOrBuilder getRpcServerElapsedTimeOrBuilder();
|
||||
}
|
|
@ -1,626 +0,0 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: grpc/instrumentation/v1alpha/monitoring.proto
|
||||
|
||||
package io.grpc.instrumentation.v1alpha;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The wrapper for custom monitoring data.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code grpc.instrumentation.v1alpha.CustomMonitoringData}
|
||||
*/
|
||||
public final class CustomMonitoringData extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:grpc.instrumentation.v1alpha.CustomMonitoringData)
|
||||
CustomMonitoringDataOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use CustomMonitoringData.newBuilder() to construct.
|
||||
private CustomMonitoringData(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private CustomMonitoringData() {
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private CustomMonitoringData(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
int mutable_bitField0_ = 0;
|
||||
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!parseUnknownFieldProto3(
|
||||
input, unknownFields, extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
com.google.protobuf.Any.Builder subBuilder = null;
|
||||
if (contents_ != null) {
|
||||
subBuilder = contents_.toBuilder();
|
||||
}
|
||||
contents_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry);
|
||||
if (subBuilder != null) {
|
||||
subBuilder.mergeFrom(contents_);
|
||||
contents_ = subBuilder.buildPartial();
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.instrumentation.v1alpha.CustomMonitoringData.class, io.grpc.instrumentation.v1alpha.CustomMonitoringData.Builder.class);
|
||||
}
|
||||
|
||||
public static final int CONTENTS_FIELD_NUMBER = 1;
|
||||
private com.google.protobuf.Any contents_;
|
||||
/**
|
||||
* <pre>
|
||||
* can be any application specific monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.protobuf.Any contents = 1;</code>
|
||||
*/
|
||||
public boolean hasContents() {
|
||||
return contents_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* can be any application specific monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.protobuf.Any contents = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.Any getContents() {
|
||||
return contents_ == null ? com.google.protobuf.Any.getDefaultInstance() : contents_;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* can be any application specific monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.protobuf.Any contents = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.AnyOrBuilder getContentsOrBuilder() {
|
||||
return getContents();
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (contents_ != null) {
|
||||
output.writeMessage(1, getContents());
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (contents_ != null) {
|
||||
size += com.google.protobuf.CodedOutputStream
|
||||
.computeMessageSize(1, getContents());
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof io.grpc.instrumentation.v1alpha.CustomMonitoringData)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
io.grpc.instrumentation.v1alpha.CustomMonitoringData other = (io.grpc.instrumentation.v1alpha.CustomMonitoringData) obj;
|
||||
|
||||
boolean result = true;
|
||||
result = result && (hasContents() == other.hasContents());
|
||||
if (hasContents()) {
|
||||
result = result && getContents()
|
||||
.equals(other.getContents());
|
||||
}
|
||||
result = result && unknownFields.equals(other.unknownFields);
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
if (hasContents()) {
|
||||
hash = (37 * hash) + CONTENTS_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getContents().hashCode();
|
||||
}
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.CustomMonitoringData parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(io.grpc.instrumentation.v1alpha.CustomMonitoringData prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* The wrapper for custom monitoring data.
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code grpc.instrumentation.v1alpha.CustomMonitoringData}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:grpc.instrumentation.v1alpha.CustomMonitoringData)
|
||||
io.grpc.instrumentation.v1alpha.CustomMonitoringDataOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.instrumentation.v1alpha.CustomMonitoringData.class, io.grpc.instrumentation.v1alpha.CustomMonitoringData.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using io.grpc.instrumentation.v1alpha.CustomMonitoringData.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
if (contentsBuilder_ == null) {
|
||||
contents_ = null;
|
||||
} else {
|
||||
contents_ = null;
|
||||
contentsBuilder_ = null;
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_descriptor;
|
||||
}
|
||||
|
||||
public io.grpc.instrumentation.v1alpha.CustomMonitoringData getDefaultInstanceForType() {
|
||||
return io.grpc.instrumentation.v1alpha.CustomMonitoringData.getDefaultInstance();
|
||||
}
|
||||
|
||||
public io.grpc.instrumentation.v1alpha.CustomMonitoringData build() {
|
||||
io.grpc.instrumentation.v1alpha.CustomMonitoringData result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public io.grpc.instrumentation.v1alpha.CustomMonitoringData buildPartial() {
|
||||
io.grpc.instrumentation.v1alpha.CustomMonitoringData result = new io.grpc.instrumentation.v1alpha.CustomMonitoringData(this);
|
||||
if (contentsBuilder_ == null) {
|
||||
result.contents_ = contents_;
|
||||
} else {
|
||||
result.contents_ = contentsBuilder_.build();
|
||||
}
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder clone() {
|
||||
return (Builder) super.clone();
|
||||
}
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return (Builder) super.setField(field, value);
|
||||
}
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return (Builder) super.clearField(field);
|
||||
}
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return (Builder) super.clearOneof(oneof);
|
||||
}
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return (Builder) super.setRepeatedField(field, index, value);
|
||||
}
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return (Builder) super.addRepeatedField(field, value);
|
||||
}
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof io.grpc.instrumentation.v1alpha.CustomMonitoringData) {
|
||||
return mergeFrom((io.grpc.instrumentation.v1alpha.CustomMonitoringData)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(io.grpc.instrumentation.v1alpha.CustomMonitoringData other) {
|
||||
if (other == io.grpc.instrumentation.v1alpha.CustomMonitoringData.getDefaultInstance()) return this;
|
||||
if (other.hasContents()) {
|
||||
mergeContents(other.getContents());
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
io.grpc.instrumentation.v1alpha.CustomMonitoringData parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (io.grpc.instrumentation.v1alpha.CustomMonitoringData) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
private com.google.protobuf.Any contents_ = null;
|
||||
private com.google.protobuf.SingleFieldBuilderV3<
|
||||
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder> contentsBuilder_;
|
||||
/**
|
||||
* <pre>
|
||||
* can be any application specific monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.protobuf.Any contents = 1;</code>
|
||||
*/
|
||||
public boolean hasContents() {
|
||||
return contentsBuilder_ != null || contents_ != null;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* can be any application specific monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.protobuf.Any contents = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.Any getContents() {
|
||||
if (contentsBuilder_ == null) {
|
||||
return contents_ == null ? com.google.protobuf.Any.getDefaultInstance() : contents_;
|
||||
} else {
|
||||
return contentsBuilder_.getMessage();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* can be any application specific monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.protobuf.Any contents = 1;</code>
|
||||
*/
|
||||
public Builder setContents(com.google.protobuf.Any value) {
|
||||
if (contentsBuilder_ == null) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
contents_ = value;
|
||||
onChanged();
|
||||
} else {
|
||||
contentsBuilder_.setMessage(value);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* can be any application specific monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.protobuf.Any contents = 1;</code>
|
||||
*/
|
||||
public Builder setContents(
|
||||
com.google.protobuf.Any.Builder builderForValue) {
|
||||
if (contentsBuilder_ == null) {
|
||||
contents_ = builderForValue.build();
|
||||
onChanged();
|
||||
} else {
|
||||
contentsBuilder_.setMessage(builderForValue.build());
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* can be any application specific monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.protobuf.Any contents = 1;</code>
|
||||
*/
|
||||
public Builder mergeContents(com.google.protobuf.Any value) {
|
||||
if (contentsBuilder_ == null) {
|
||||
if (contents_ != null) {
|
||||
contents_ =
|
||||
com.google.protobuf.Any.newBuilder(contents_).mergeFrom(value).buildPartial();
|
||||
} else {
|
||||
contents_ = value;
|
||||
}
|
||||
onChanged();
|
||||
} else {
|
||||
contentsBuilder_.mergeFrom(value);
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* can be any application specific monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.protobuf.Any contents = 1;</code>
|
||||
*/
|
||||
public Builder clearContents() {
|
||||
if (contentsBuilder_ == null) {
|
||||
contents_ = null;
|
||||
onChanged();
|
||||
} else {
|
||||
contents_ = null;
|
||||
contentsBuilder_ = null;
|
||||
}
|
||||
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* can be any application specific monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.protobuf.Any contents = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.Any.Builder getContentsBuilder() {
|
||||
|
||||
onChanged();
|
||||
return getContentsFieldBuilder().getBuilder();
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* can be any application specific monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.protobuf.Any contents = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.AnyOrBuilder getContentsOrBuilder() {
|
||||
if (contentsBuilder_ != null) {
|
||||
return contentsBuilder_.getMessageOrBuilder();
|
||||
} else {
|
||||
return contents_ == null ?
|
||||
com.google.protobuf.Any.getDefaultInstance() : contents_;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* can be any application specific monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.protobuf.Any contents = 1;</code>
|
||||
*/
|
||||
private com.google.protobuf.SingleFieldBuilderV3<
|
||||
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>
|
||||
getContentsFieldBuilder() {
|
||||
if (contentsBuilder_ == null) {
|
||||
contentsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
|
||||
com.google.protobuf.Any, com.google.protobuf.Any.Builder, com.google.protobuf.AnyOrBuilder>(
|
||||
getContents(),
|
||||
getParentForChildren(),
|
||||
isClean());
|
||||
contents_ = null;
|
||||
}
|
||||
return contentsBuilder_;
|
||||
}
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFieldsProto3(unknownFields);
|
||||
}
|
||||
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:grpc.instrumentation.v1alpha.CustomMonitoringData)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:grpc.instrumentation.v1alpha.CustomMonitoringData)
|
||||
private static final io.grpc.instrumentation.v1alpha.CustomMonitoringData DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new io.grpc.instrumentation.v1alpha.CustomMonitoringData();
|
||||
}
|
||||
|
||||
public static io.grpc.instrumentation.v1alpha.CustomMonitoringData getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<CustomMonitoringData>
|
||||
PARSER = new com.google.protobuf.AbstractParser<CustomMonitoringData>() {
|
||||
public CustomMonitoringData parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new CustomMonitoringData(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<CustomMonitoringData> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<CustomMonitoringData> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
public io.grpc.instrumentation.v1alpha.CustomMonitoringData getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,34 +0,0 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: grpc/instrumentation/v1alpha/monitoring.proto
|
||||
|
||||
package io.grpc.instrumentation.v1alpha;
|
||||
|
||||
public interface CustomMonitoringDataOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.instrumentation.v1alpha.CustomMonitoringData)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* can be any application specific monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.protobuf.Any contents = 1;</code>
|
||||
*/
|
||||
boolean hasContents();
|
||||
/**
|
||||
* <pre>
|
||||
* can be any application specific monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.protobuf.Any contents = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.Any getContents();
|
||||
/**
|
||||
* <pre>
|
||||
* can be any application specific monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.protobuf.Any contents = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.AnyOrBuilder getContentsOrBuilder();
|
||||
}
|
|
@ -1,544 +0,0 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: grpc/instrumentation/v1alpha/monitoring.proto
|
||||
|
||||
package io.grpc.instrumentation.v1alpha;
|
||||
|
||||
/**
|
||||
* Protobuf type {@code grpc.instrumentation.v1alpha.MonitoringDataGroup}
|
||||
*/
|
||||
public final class MonitoringDataGroup extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:grpc.instrumentation.v1alpha.MonitoringDataGroup)
|
||||
MonitoringDataGroupOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use MonitoringDataGroup.newBuilder() to construct.
|
||||
private MonitoringDataGroup(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private MonitoringDataGroup() {
|
||||
name_ = "";
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private MonitoringDataGroup(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
int mutable_bitField0_ = 0;
|
||||
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!parseUnknownFieldProto3(
|
||||
input, unknownFields, extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 10: {
|
||||
java.lang.String s = input.readStringRequireUtf8();
|
||||
|
||||
name_ = s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.instrumentation.v1alpha.MonitoringDataGroup.class, io.grpc.instrumentation.v1alpha.MonitoringDataGroup.Builder.class);
|
||||
}
|
||||
|
||||
public static final int NAME_FIELD_NUMBER = 1;
|
||||
private volatile java.lang.Object name_;
|
||||
/**
|
||||
* <pre>
|
||||
* name of a group of monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>string name = 1;</code>
|
||||
*/
|
||||
public java.lang.String getName() {
|
||||
java.lang.Object ref = name_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
return (java.lang.String) ref;
|
||||
} else {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
name_ = s;
|
||||
return s;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* name of a group of monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>string name = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getNameBytes() {
|
||||
java.lang.Object ref = name_;
|
||||
if (ref instanceof java.lang.String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
name_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
if (!getNameBytes().isEmpty()) {
|
||||
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
|
||||
}
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
if (!getNameBytes().isEmpty()) {
|
||||
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
|
||||
}
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof io.grpc.instrumentation.v1alpha.MonitoringDataGroup)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
io.grpc.instrumentation.v1alpha.MonitoringDataGroup other = (io.grpc.instrumentation.v1alpha.MonitoringDataGroup) obj;
|
||||
|
||||
boolean result = true;
|
||||
result = result && getName()
|
||||
.equals(other.getName());
|
||||
result = result && unknownFields.equals(other.unknownFields);
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
hash = (37 * hash) + NAME_FIELD_NUMBER;
|
||||
hash = (53 * hash) + getName().hashCode();
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(io.grpc.instrumentation.v1alpha.MonitoringDataGroup prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* Protobuf type {@code grpc.instrumentation.v1alpha.MonitoringDataGroup}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:grpc.instrumentation.v1alpha.MonitoringDataGroup)
|
||||
io.grpc.instrumentation.v1alpha.MonitoringDataGroupOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.instrumentation.v1alpha.MonitoringDataGroup.class, io.grpc.instrumentation.v1alpha.MonitoringDataGroup.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using io.grpc.instrumentation.v1alpha.MonitoringDataGroup.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
name_ = "";
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_descriptor;
|
||||
}
|
||||
|
||||
public io.grpc.instrumentation.v1alpha.MonitoringDataGroup getDefaultInstanceForType() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringDataGroup.getDefaultInstance();
|
||||
}
|
||||
|
||||
public io.grpc.instrumentation.v1alpha.MonitoringDataGroup build() {
|
||||
io.grpc.instrumentation.v1alpha.MonitoringDataGroup result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public io.grpc.instrumentation.v1alpha.MonitoringDataGroup buildPartial() {
|
||||
io.grpc.instrumentation.v1alpha.MonitoringDataGroup result = new io.grpc.instrumentation.v1alpha.MonitoringDataGroup(this);
|
||||
result.name_ = name_;
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder clone() {
|
||||
return (Builder) super.clone();
|
||||
}
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return (Builder) super.setField(field, value);
|
||||
}
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return (Builder) super.clearField(field);
|
||||
}
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return (Builder) super.clearOneof(oneof);
|
||||
}
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return (Builder) super.setRepeatedField(field, index, value);
|
||||
}
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return (Builder) super.addRepeatedField(field, value);
|
||||
}
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof io.grpc.instrumentation.v1alpha.MonitoringDataGroup) {
|
||||
return mergeFrom((io.grpc.instrumentation.v1alpha.MonitoringDataGroup)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(io.grpc.instrumentation.v1alpha.MonitoringDataGroup other) {
|
||||
if (other == io.grpc.instrumentation.v1alpha.MonitoringDataGroup.getDefaultInstance()) return this;
|
||||
if (!other.getName().isEmpty()) {
|
||||
name_ = other.name_;
|
||||
onChanged();
|
||||
}
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
io.grpc.instrumentation.v1alpha.MonitoringDataGroup parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (io.grpc.instrumentation.v1alpha.MonitoringDataGroup) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
private java.lang.Object name_ = "";
|
||||
/**
|
||||
* <pre>
|
||||
* name of a group of monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>string name = 1;</code>
|
||||
*/
|
||||
public java.lang.String getName() {
|
||||
java.lang.Object ref = name_;
|
||||
if (!(ref instanceof java.lang.String)) {
|
||||
com.google.protobuf.ByteString bs =
|
||||
(com.google.protobuf.ByteString) ref;
|
||||
java.lang.String s = bs.toStringUtf8();
|
||||
name_ = s;
|
||||
return s;
|
||||
} else {
|
||||
return (java.lang.String) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* name of a group of monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>string name = 1;</code>
|
||||
*/
|
||||
public com.google.protobuf.ByteString
|
||||
getNameBytes() {
|
||||
java.lang.Object ref = name_;
|
||||
if (ref instanceof String) {
|
||||
com.google.protobuf.ByteString b =
|
||||
com.google.protobuf.ByteString.copyFromUtf8(
|
||||
(java.lang.String) ref);
|
||||
name_ = b;
|
||||
return b;
|
||||
} else {
|
||||
return (com.google.protobuf.ByteString) ref;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* name of a group of monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>string name = 1;</code>
|
||||
*/
|
||||
public Builder setName(
|
||||
java.lang.String value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
|
||||
name_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* name of a group of monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>string name = 1;</code>
|
||||
*/
|
||||
public Builder clearName() {
|
||||
|
||||
name_ = getDefaultInstance().getName();
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* name of a group of monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>string name = 1;</code>
|
||||
*/
|
||||
public Builder setNameBytes(
|
||||
com.google.protobuf.ByteString value) {
|
||||
if (value == null) {
|
||||
throw new NullPointerException();
|
||||
}
|
||||
checkByteStringIsUtf8(value);
|
||||
|
||||
name_ = value;
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFieldsProto3(unknownFields);
|
||||
}
|
||||
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:grpc.instrumentation.v1alpha.MonitoringDataGroup)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:grpc.instrumentation.v1alpha.MonitoringDataGroup)
|
||||
private static final io.grpc.instrumentation.v1alpha.MonitoringDataGroup DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new io.grpc.instrumentation.v1alpha.MonitoringDataGroup();
|
||||
}
|
||||
|
||||
public static io.grpc.instrumentation.v1alpha.MonitoringDataGroup getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<MonitoringDataGroup>
|
||||
PARSER = new com.google.protobuf.AbstractParser<MonitoringDataGroup>() {
|
||||
public MonitoringDataGroup parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new MonitoringDataGroup(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<MonitoringDataGroup> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<MonitoringDataGroup> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
public io.grpc.instrumentation.v1alpha.MonitoringDataGroup getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,27 +0,0 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: grpc/instrumentation/v1alpha/monitoring.proto
|
||||
|
||||
package io.grpc.instrumentation.v1alpha;
|
||||
|
||||
public interface MonitoringDataGroupOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.instrumentation.v1alpha.MonitoringDataGroup)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* name of a group of monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>string name = 1;</code>
|
||||
*/
|
||||
java.lang.String getName();
|
||||
/**
|
||||
* <pre>
|
||||
* name of a group of monitoring data
|
||||
* </pre>
|
||||
*
|
||||
* <code>string name = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getNameBytes();
|
||||
}
|
|
@ -1,191 +0,0 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: grpc/instrumentation/v1alpha/monitoring.proto
|
||||
|
||||
package io.grpc.instrumentation.v1alpha;
|
||||
|
||||
public final class MonitoringProto {
|
||||
private MonitoringProto() {}
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistryLite registry) {
|
||||
}
|
||||
|
||||
public static void registerAllExtensions(
|
||||
com.google.protobuf.ExtensionRegistry registry) {
|
||||
registerAllExtensions(
|
||||
(com.google.protobuf.ExtensionRegistryLite) registry);
|
||||
}
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_instrumentation_v1alpha_StatsRequest_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_instrumentation_v1alpha_StatsRequest_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_instrumentation_v1alpha_StatsResponse_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_instrumentation_v1alpha_StatsResponse_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_instrumentation_v1alpha_TraceRequest_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_instrumentation_v1alpha_TraceRequest_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_instrumentation_v1alpha_TraceResponse_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_instrumentation_v1alpha_TraceResponse_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_fieldAccessorTable;
|
||||
static final com.google.protobuf.Descriptors.Descriptor
|
||||
internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_descriptor;
|
||||
static final
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_fieldAccessorTable;
|
||||
|
||||
public static com.google.protobuf.Descriptors.FileDescriptor
|
||||
getDescriptor() {
|
||||
return descriptor;
|
||||
}
|
||||
private static com.google.protobuf.Descriptors.FileDescriptor
|
||||
descriptor;
|
||||
static {
|
||||
java.lang.String[] descriptorData = {
|
||||
"\n-grpc/instrumentation/v1alpha/monitorin" +
|
||||
"g.proto\022\034grpc.instrumentation.v1alpha\032#g" +
|
||||
"oogle/instrumentation/census.proto\032\031goog" +
|
||||
"le/protobuf/any.proto\032\033google/protobuf/e" +
|
||||
"mpty.proto\"\323\n\n\021CanonicalRpcStats\022F\n\021rpc_" +
|
||||
"client_errors\030\001 \001(\0132+.grpc.instrumentati" +
|
||||
"on.v1alpha.StatsResponse\022N\n\031rpc_client_c" +
|
||||
"ompleted_rpcs\030\002 \001(\0132+.grpc.instrumentati" +
|
||||
"on.v1alpha.StatsResponse\022L\n\027rpc_client_s" +
|
||||
"tarted_rpcs\030\003 \001(\0132+.grpc.instrumentation" +
|
||||
".v1alpha.StatsResponse\022L\n\027rpc_client_ela" +
|
||||
"psed_time\030\004 \001(\0132+.grpc.instrumentation.v" +
|
||||
"1alpha.StatsResponse\022S\n\036rpc_client_serve" +
|
||||
"r_elapsed_time\030\005 \001(\0132+.grpc.instrumentat" +
|
||||
"ion.v1alpha.StatsResponse\022M\n\030rpc_client_" +
|
||||
"request_bytes\030\006 \001(\0132+.grpc.instrumentati" +
|
||||
"on.v1alpha.StatsResponse\022N\n\031rpc_client_r" +
|
||||
"esponse_bytes\030\007 \001(\0132+.grpc.instrumentati" +
|
||||
"on.v1alpha.StatsResponse\022M\n\030rpc_client_r" +
|
||||
"equest_count\030\010 \001(\0132+.grpc.instrumentatio" +
|
||||
"n.v1alpha.StatsResponse\022N\n\031rpc_client_re" +
|
||||
"sponse_count\030\t \001(\0132+.grpc.instrumentatio" +
|
||||
"n.v1alpha.StatsResponse\022F\n\021rpc_server_er" +
|
||||
"rors\030\n \001(\0132+.grpc.instrumentation.v1alph" +
|
||||
"a.StatsResponse\022N\n\031rpc_server_completed_" +
|
||||
"rpcs\030\013 \001(\0132+.grpc.instrumentation.v1alph" +
|
||||
"a.StatsResponse\022S\n\036rpc_server_server_ela" +
|
||||
"psed_time\030\014 \001(\0132+.grpc.instrumentation.v" +
|
||||
"1alpha.StatsResponse\022M\n\030rpc_server_reque" +
|
||||
"st_bytes\030\r \001(\0132+.grpc.instrumentation.v1" +
|
||||
"alpha.StatsResponse\022N\n\031rpc_server_respon" +
|
||||
"se_bytes\030\016 \001(\0132+.grpc.instrumentation.v1" +
|
||||
"alpha.StatsResponse\022M\n\030rpc_server_reques" +
|
||||
"t_count\030\017 \001(\0132+.grpc.instrumentation.v1a" +
|
||||
"lpha.StatsResponse\022N\n\031rpc_server_respons" +
|
||||
"e_count\030\020 \001(\0132+.grpc.instrumentation.v1a" +
|
||||
"lpha.StatsResponse\022L\n\027rpc_server_elapsed" +
|
||||
"_time\030\021 \001(\0132+.grpc.instrumentation.v1alp" +
|
||||
"ha.StatsResponse\"q\n\014StatsRequest\022\022\n\nview" +
|
||||
"_names\030\001 \003(\t\022\031\n\021measurement_names\030\002 \003(\t\022" +
|
||||
"2\n*dont_include_descriptors_in_first_res" +
|
||||
"ponse\030\003 \001(\010\"\313\001\n\rStatsResponse\022M\n\026measure" +
|
||||
"ment_descriptor\030\001 \001(\0132-.google.instrumen" +
|
||||
"tation.MeasurementDescriptor\022?\n\017view_des" +
|
||||
"criptor\030\002 \001(\0132&.google.instrumentation.V" +
|
||||
"iewDescriptor\022*\n\004view\030\003 \001(\0132\034.google.ins" +
|
||||
"trumentation.View\"\016\n\014TraceRequest\"\017\n\rTra" +
|
||||
"ceResponse\"#\n\023MonitoringDataGroup\022\014\n\004nam" +
|
||||
"e\030\001 \001(\t\">\n\024CustomMonitoringData\022&\n\010conte" +
|
||||
"nts\030\001 \001(\0132\024.google.protobuf.Any2\265\004\n\nMoni" +
|
||||
"toring\022a\n\024GetCanonicalRpcStats\022\026.google." +
|
||||
"protobuf.Empty\032/.grpc.instrumentation.v1" +
|
||||
"alpha.CanonicalRpcStats\"\000\022e\n\010GetStats\022*." +
|
||||
"grpc.instrumentation.v1alpha.StatsReques" +
|
||||
"t\032+.grpc.instrumentation.v1alpha.StatsRe" +
|
||||
"sponse\"\000\022i\n\nWatchStats\022*.grpc.instrument" +
|
||||
"ation.v1alpha.StatsRequest\032+.grpc.instru" +
|
||||
"mentation.v1alpha.StatsResponse\"\0000\001\022m\n\020G" +
|
||||
"etRequestTraces\022*.grpc.instrumentation.v" +
|
||||
"1alpha.TraceRequest\032+.grpc.instrumentati" +
|
||||
"on.v1alpha.TraceResponse\"\000\022\202\001\n\027GetCustom" +
|
||||
"MonitoringData\0221.grpc.instrumentation.v1" +
|
||||
"alpha.MonitoringDataGroup\0322.grpc.instrum" +
|
||||
"entation.v1alpha.CustomMonitoringData\"\000B" +
|
||||
"4\n\037io.grpc.instrumentation.v1alphaB\017Moni" +
|
||||
"toringProtoP\001b\006proto3"
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
|
||||
new com.google.protobuf.Descriptors.FileDescriptor. InternalDescriptorAssigner() {
|
||||
public com.google.protobuf.ExtensionRegistry assignDescriptors(
|
||||
com.google.protobuf.Descriptors.FileDescriptor root) {
|
||||
descriptor = root;
|
||||
return null;
|
||||
}
|
||||
};
|
||||
com.google.protobuf.Descriptors.FileDescriptor
|
||||
.internalBuildGeneratedFileFrom(descriptorData,
|
||||
new com.google.protobuf.Descriptors.FileDescriptor[] {
|
||||
com.google.instrumentation.stats.proto.CensusProto.getDescriptor(),
|
||||
com.google.protobuf.AnyProto.getDescriptor(),
|
||||
com.google.protobuf.EmptyProto.getDescriptor(),
|
||||
}, assigner);
|
||||
internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_descriptor =
|
||||
getDescriptor().getMessageTypes().get(0);
|
||||
internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_instrumentation_v1alpha_CanonicalRpcStats_descriptor,
|
||||
new java.lang.String[] { "RpcClientErrors", "RpcClientCompletedRpcs", "RpcClientStartedRpcs", "RpcClientElapsedTime", "RpcClientServerElapsedTime", "RpcClientRequestBytes", "RpcClientResponseBytes", "RpcClientRequestCount", "RpcClientResponseCount", "RpcServerErrors", "RpcServerCompletedRpcs", "RpcServerServerElapsedTime", "RpcServerRequestBytes", "RpcServerResponseBytes", "RpcServerRequestCount", "RpcServerResponseCount", "RpcServerElapsedTime", });
|
||||
internal_static_grpc_instrumentation_v1alpha_StatsRequest_descriptor =
|
||||
getDescriptor().getMessageTypes().get(1);
|
||||
internal_static_grpc_instrumentation_v1alpha_StatsRequest_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_instrumentation_v1alpha_StatsRequest_descriptor,
|
||||
new java.lang.String[] { "ViewNames", "MeasurementNames", "DontIncludeDescriptorsInFirstResponse", });
|
||||
internal_static_grpc_instrumentation_v1alpha_StatsResponse_descriptor =
|
||||
getDescriptor().getMessageTypes().get(2);
|
||||
internal_static_grpc_instrumentation_v1alpha_StatsResponse_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_instrumentation_v1alpha_StatsResponse_descriptor,
|
||||
new java.lang.String[] { "MeasurementDescriptor", "ViewDescriptor", "View", });
|
||||
internal_static_grpc_instrumentation_v1alpha_TraceRequest_descriptor =
|
||||
getDescriptor().getMessageTypes().get(3);
|
||||
internal_static_grpc_instrumentation_v1alpha_TraceRequest_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_instrumentation_v1alpha_TraceRequest_descriptor,
|
||||
new java.lang.String[] { });
|
||||
internal_static_grpc_instrumentation_v1alpha_TraceResponse_descriptor =
|
||||
getDescriptor().getMessageTypes().get(4);
|
||||
internal_static_grpc_instrumentation_v1alpha_TraceResponse_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_instrumentation_v1alpha_TraceResponse_descriptor,
|
||||
new java.lang.String[] { });
|
||||
internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_descriptor =
|
||||
getDescriptor().getMessageTypes().get(5);
|
||||
internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_instrumentation_v1alpha_MonitoringDataGroup_descriptor,
|
||||
new java.lang.String[] { "Name", });
|
||||
internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_descriptor =
|
||||
getDescriptor().getMessageTypes().get(6);
|
||||
internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_fieldAccessorTable = new
|
||||
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
|
||||
internal_static_grpc_instrumentation_v1alpha_CustomMonitoringData_descriptor,
|
||||
new java.lang.String[] { "Contents", });
|
||||
com.google.instrumentation.stats.proto.CensusProto.getDescriptor();
|
||||
com.google.protobuf.AnyProto.getDescriptor();
|
||||
com.google.protobuf.EmptyProto.getDescriptor();
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(outer_class_scope)
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,138 +0,0 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: grpc/instrumentation/v1alpha/monitoring.proto
|
||||
|
||||
package io.grpc.instrumentation.v1alpha;
|
||||
|
||||
public interface StatsRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.instrumentation.v1alpha.StatsRequest)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* An optional set of ViewDescriptor names. Only Views using these
|
||||
* descriptors will be sent back in the response. If no names are provided,
|
||||
* then all Views present in the client system will be included in every
|
||||
* response. If measurement_names is also provided, then Views matching the
|
||||
* intersection of the two are returned.
|
||||
* TODO(aveitch): Consider making this a list of regexes or prefix matches in
|
||||
* the future.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string view_names = 1;</code>
|
||||
*/
|
||||
java.util.List<java.lang.String>
|
||||
getViewNamesList();
|
||||
/**
|
||||
* <pre>
|
||||
* An optional set of ViewDescriptor names. Only Views using these
|
||||
* descriptors will be sent back in the response. If no names are provided,
|
||||
* then all Views present in the client system will be included in every
|
||||
* response. If measurement_names is also provided, then Views matching the
|
||||
* intersection of the two are returned.
|
||||
* TODO(aveitch): Consider making this a list of regexes or prefix matches in
|
||||
* the future.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string view_names = 1;</code>
|
||||
*/
|
||||
int getViewNamesCount();
|
||||
/**
|
||||
* <pre>
|
||||
* An optional set of ViewDescriptor names. Only Views using these
|
||||
* descriptors will be sent back in the response. If no names are provided,
|
||||
* then all Views present in the client system will be included in every
|
||||
* response. If measurement_names is also provided, then Views matching the
|
||||
* intersection of the two are returned.
|
||||
* TODO(aveitch): Consider making this a list of regexes or prefix matches in
|
||||
* the future.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string view_names = 1;</code>
|
||||
*/
|
||||
java.lang.String getViewNames(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* An optional set of ViewDescriptor names. Only Views using these
|
||||
* descriptors will be sent back in the response. If no names are provided,
|
||||
* then all Views present in the client system will be included in every
|
||||
* response. If measurement_names is also provided, then Views matching the
|
||||
* intersection of the two are returned.
|
||||
* TODO(aveitch): Consider making this a list of regexes or prefix matches in
|
||||
* the future.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string view_names = 1;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getViewNamesBytes(int index);
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* An optional set of MeasurementDescriptor names. Only Views using these
|
||||
* descriptors will be sent back in the response. If no names are provided,
|
||||
* then all Views present in the client system will be included in every
|
||||
* response. If view_names is also provided, then Views matching the
|
||||
* intersection of the two are returned.
|
||||
* TODO(aveitch): Consider making this a list of regexes or prefix matches in
|
||||
* the future.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string measurement_names = 2;</code>
|
||||
*/
|
||||
java.util.List<java.lang.String>
|
||||
getMeasurementNamesList();
|
||||
/**
|
||||
* <pre>
|
||||
* An optional set of MeasurementDescriptor names. Only Views using these
|
||||
* descriptors will be sent back in the response. If no names are provided,
|
||||
* then all Views present in the client system will be included in every
|
||||
* response. If view_names is also provided, then Views matching the
|
||||
* intersection of the two are returned.
|
||||
* TODO(aveitch): Consider making this a list of regexes or prefix matches in
|
||||
* the future.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string measurement_names = 2;</code>
|
||||
*/
|
||||
int getMeasurementNamesCount();
|
||||
/**
|
||||
* <pre>
|
||||
* An optional set of MeasurementDescriptor names. Only Views using these
|
||||
* descriptors will be sent back in the response. If no names are provided,
|
||||
* then all Views present in the client system will be included in every
|
||||
* response. If view_names is also provided, then Views matching the
|
||||
* intersection of the two are returned.
|
||||
* TODO(aveitch): Consider making this a list of regexes or prefix matches in
|
||||
* the future.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string measurement_names = 2;</code>
|
||||
*/
|
||||
java.lang.String getMeasurementNames(int index);
|
||||
/**
|
||||
* <pre>
|
||||
* An optional set of MeasurementDescriptor names. Only Views using these
|
||||
* descriptors will be sent back in the response. If no names are provided,
|
||||
* then all Views present in the client system will be included in every
|
||||
* response. If view_names is also provided, then Views matching the
|
||||
* intersection of the two are returned.
|
||||
* TODO(aveitch): Consider making this a list of regexes or prefix matches in
|
||||
* the future.
|
||||
* </pre>
|
||||
*
|
||||
* <code>repeated string measurement_names = 2;</code>
|
||||
*/
|
||||
com.google.protobuf.ByteString
|
||||
getMeasurementNamesBytes(int index);
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* By default, the MeasurementDescriptors and ViewDescriptors corresponding to
|
||||
* the Views that are returned in a StatsResponse will be included in the
|
||||
* first such response. Set this to true to have them not sent.
|
||||
* </pre>
|
||||
*
|
||||
* <code>bool dont_include_descriptors_in_first_response = 3;</code>
|
||||
*/
|
||||
boolean getDontIncludeDescriptorsInFirstResponse();
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -1,87 +0,0 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: grpc/instrumentation/v1alpha/monitoring.proto
|
||||
|
||||
package io.grpc.instrumentation.v1alpha;
|
||||
|
||||
public interface StatsResponseOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.instrumentation.v1alpha.StatsResponse)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* A StatsResponse can optionally contain the MeasurementDescriptor and
|
||||
* ViewDescriptor for the View. These will be sent in the first WatchStats
|
||||
* response, or all GetStats and GetCanonicalRpcStats responses. These will
|
||||
* not be set for {Get,Watch}Stats if
|
||||
* dont_include_descriptors_in_first_response is set to true in the
|
||||
* StatsRequest.
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.instrumentation.MeasurementDescriptor measurement_descriptor = 1;</code>
|
||||
*/
|
||||
boolean hasMeasurementDescriptor();
|
||||
/**
|
||||
* <pre>
|
||||
* A StatsResponse can optionally contain the MeasurementDescriptor and
|
||||
* ViewDescriptor for the View. These will be sent in the first WatchStats
|
||||
* response, or all GetStats and GetCanonicalRpcStats responses. These will
|
||||
* not be set for {Get,Watch}Stats if
|
||||
* dont_include_descriptors_in_first_response is set to true in the
|
||||
* StatsRequest.
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.instrumentation.MeasurementDescriptor measurement_descriptor = 1;</code>
|
||||
*/
|
||||
com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptor getMeasurementDescriptor();
|
||||
/**
|
||||
* <pre>
|
||||
* A StatsResponse can optionally contain the MeasurementDescriptor and
|
||||
* ViewDescriptor for the View. These will be sent in the first WatchStats
|
||||
* response, or all GetStats and GetCanonicalRpcStats responses. These will
|
||||
* not be set for {Get,Watch}Stats if
|
||||
* dont_include_descriptors_in_first_response is set to true in the
|
||||
* StatsRequest.
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.instrumentation.MeasurementDescriptor measurement_descriptor = 1;</code>
|
||||
*/
|
||||
com.google.instrumentation.stats.proto.CensusProto.MeasurementDescriptorOrBuilder getMeasurementDescriptorOrBuilder();
|
||||
|
||||
/**
|
||||
* <code>.google.instrumentation.ViewDescriptor view_descriptor = 2;</code>
|
||||
*/
|
||||
boolean hasViewDescriptor();
|
||||
/**
|
||||
* <code>.google.instrumentation.ViewDescriptor view_descriptor = 2;</code>
|
||||
*/
|
||||
com.google.instrumentation.stats.proto.CensusProto.ViewDescriptor getViewDescriptor();
|
||||
/**
|
||||
* <code>.google.instrumentation.ViewDescriptor view_descriptor = 2;</code>
|
||||
*/
|
||||
com.google.instrumentation.stats.proto.CensusProto.ViewDescriptorOrBuilder getViewDescriptorOrBuilder();
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* The View data.
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.instrumentation.View view = 3;</code>
|
||||
*/
|
||||
boolean hasView();
|
||||
/**
|
||||
* <pre>
|
||||
* The View data.
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.instrumentation.View view = 3;</code>
|
||||
*/
|
||||
com.google.instrumentation.stats.proto.CensusProto.View getView();
|
||||
/**
|
||||
* <pre>
|
||||
* The View data.
|
||||
* </pre>
|
||||
*
|
||||
* <code>.google.instrumentation.View view = 3;</code>
|
||||
*/
|
||||
com.google.instrumentation.stats.proto.CensusProto.ViewOrBuilder getViewOrBuilder();
|
||||
}
|
|
@ -1,396 +0,0 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: grpc/instrumentation/v1alpha/monitoring.proto
|
||||
|
||||
package io.grpc.instrumentation.v1alpha;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* TODO(aveitch): Complete definition of this type
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code grpc.instrumentation.v1alpha.TraceRequest}
|
||||
*/
|
||||
public final class TraceRequest extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:grpc.instrumentation.v1alpha.TraceRequest)
|
||||
TraceRequestOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use TraceRequest.newBuilder() to construct.
|
||||
private TraceRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private TraceRequest() {
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private TraceRequest(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!parseUnknownFieldProto3(
|
||||
input, unknownFields, extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceRequest_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceRequest_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.instrumentation.v1alpha.TraceRequest.class, io.grpc.instrumentation.v1alpha.TraceRequest.Builder.class);
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof io.grpc.instrumentation.v1alpha.TraceRequest)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
io.grpc.instrumentation.v1alpha.TraceRequest other = (io.grpc.instrumentation.v1alpha.TraceRequest) obj;
|
||||
|
||||
boolean result = true;
|
||||
result = result && unknownFields.equals(other.unknownFields);
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static io.grpc.instrumentation.v1alpha.TraceRequest parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceRequest parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceRequest parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceRequest parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceRequest parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceRequest parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceRequest parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceRequest parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceRequest parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceRequest parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceRequest parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceRequest parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(io.grpc.instrumentation.v1alpha.TraceRequest prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* TODO(aveitch): Complete definition of this type
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code grpc.instrumentation.v1alpha.TraceRequest}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:grpc.instrumentation.v1alpha.TraceRequest)
|
||||
io.grpc.instrumentation.v1alpha.TraceRequestOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceRequest_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceRequest_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.instrumentation.v1alpha.TraceRequest.class, io.grpc.instrumentation.v1alpha.TraceRequest.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using io.grpc.instrumentation.v1alpha.TraceRequest.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceRequest_descriptor;
|
||||
}
|
||||
|
||||
public io.grpc.instrumentation.v1alpha.TraceRequest getDefaultInstanceForType() {
|
||||
return io.grpc.instrumentation.v1alpha.TraceRequest.getDefaultInstance();
|
||||
}
|
||||
|
||||
public io.grpc.instrumentation.v1alpha.TraceRequest build() {
|
||||
io.grpc.instrumentation.v1alpha.TraceRequest result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public io.grpc.instrumentation.v1alpha.TraceRequest buildPartial() {
|
||||
io.grpc.instrumentation.v1alpha.TraceRequest result = new io.grpc.instrumentation.v1alpha.TraceRequest(this);
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder clone() {
|
||||
return (Builder) super.clone();
|
||||
}
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return (Builder) super.setField(field, value);
|
||||
}
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return (Builder) super.clearField(field);
|
||||
}
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return (Builder) super.clearOneof(oneof);
|
||||
}
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return (Builder) super.setRepeatedField(field, index, value);
|
||||
}
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return (Builder) super.addRepeatedField(field, value);
|
||||
}
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof io.grpc.instrumentation.v1alpha.TraceRequest) {
|
||||
return mergeFrom((io.grpc.instrumentation.v1alpha.TraceRequest)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(io.grpc.instrumentation.v1alpha.TraceRequest other) {
|
||||
if (other == io.grpc.instrumentation.v1alpha.TraceRequest.getDefaultInstance()) return this;
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
io.grpc.instrumentation.v1alpha.TraceRequest parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (io.grpc.instrumentation.v1alpha.TraceRequest) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFieldsProto3(unknownFields);
|
||||
}
|
||||
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:grpc.instrumentation.v1alpha.TraceRequest)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:grpc.instrumentation.v1alpha.TraceRequest)
|
||||
private static final io.grpc.instrumentation.v1alpha.TraceRequest DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new io.grpc.instrumentation.v1alpha.TraceRequest();
|
||||
}
|
||||
|
||||
public static io.grpc.instrumentation.v1alpha.TraceRequest getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<TraceRequest>
|
||||
PARSER = new com.google.protobuf.AbstractParser<TraceRequest>() {
|
||||
public TraceRequest parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new TraceRequest(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<TraceRequest> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<TraceRequest> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
public io.grpc.instrumentation.v1alpha.TraceRequest getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: grpc/instrumentation/v1alpha/monitoring.proto
|
||||
|
||||
package io.grpc.instrumentation.v1alpha;
|
||||
|
||||
public interface TraceRequestOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.instrumentation.v1alpha.TraceRequest)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
}
|
|
@ -1,396 +0,0 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: grpc/instrumentation/v1alpha/monitoring.proto
|
||||
|
||||
package io.grpc.instrumentation.v1alpha;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* TODO(aveitch): Complete definition of this type
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code grpc.instrumentation.v1alpha.TraceResponse}
|
||||
*/
|
||||
public final class TraceResponse extends
|
||||
com.google.protobuf.GeneratedMessageV3 implements
|
||||
// @@protoc_insertion_point(message_implements:grpc.instrumentation.v1alpha.TraceResponse)
|
||||
TraceResponseOrBuilder {
|
||||
private static final long serialVersionUID = 0L;
|
||||
// Use TraceResponse.newBuilder() to construct.
|
||||
private TraceResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
|
||||
super(builder);
|
||||
}
|
||||
private TraceResponse() {
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public final com.google.protobuf.UnknownFieldSet
|
||||
getUnknownFields() {
|
||||
return this.unknownFields;
|
||||
}
|
||||
private TraceResponse(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
this();
|
||||
if (extensionRegistry == null) {
|
||||
throw new java.lang.NullPointerException();
|
||||
}
|
||||
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
|
||||
com.google.protobuf.UnknownFieldSet.newBuilder();
|
||||
try {
|
||||
boolean done = false;
|
||||
while (!done) {
|
||||
int tag = input.readTag();
|
||||
switch (tag) {
|
||||
case 0:
|
||||
done = true;
|
||||
break;
|
||||
default: {
|
||||
if (!parseUnknownFieldProto3(
|
||||
input, unknownFields, extensionRegistry, tag)) {
|
||||
done = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
throw e.setUnfinishedMessage(this);
|
||||
} catch (java.io.IOException e) {
|
||||
throw new com.google.protobuf.InvalidProtocolBufferException(
|
||||
e).setUnfinishedMessage(this);
|
||||
} finally {
|
||||
this.unknownFields = unknownFields.build();
|
||||
makeExtensionsImmutable();
|
||||
}
|
||||
}
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceResponse_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceResponse_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.instrumentation.v1alpha.TraceResponse.class, io.grpc.instrumentation.v1alpha.TraceResponse.Builder.class);
|
||||
}
|
||||
|
||||
private byte memoizedIsInitialized = -1;
|
||||
public final boolean isInitialized() {
|
||||
byte isInitialized = memoizedIsInitialized;
|
||||
if (isInitialized == 1) return true;
|
||||
if (isInitialized == 0) return false;
|
||||
|
||||
memoizedIsInitialized = 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public void writeTo(com.google.protobuf.CodedOutputStream output)
|
||||
throws java.io.IOException {
|
||||
unknownFields.writeTo(output);
|
||||
}
|
||||
|
||||
public int getSerializedSize() {
|
||||
int size = memoizedSize;
|
||||
if (size != -1) return size;
|
||||
|
||||
size = 0;
|
||||
size += unknownFields.getSerializedSize();
|
||||
memoizedSize = size;
|
||||
return size;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public boolean equals(final java.lang.Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
if (!(obj instanceof io.grpc.instrumentation.v1alpha.TraceResponse)) {
|
||||
return super.equals(obj);
|
||||
}
|
||||
io.grpc.instrumentation.v1alpha.TraceResponse other = (io.grpc.instrumentation.v1alpha.TraceResponse) obj;
|
||||
|
||||
boolean result = true;
|
||||
result = result && unknownFields.equals(other.unknownFields);
|
||||
return result;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public int hashCode() {
|
||||
if (memoizedHashCode != 0) {
|
||||
return memoizedHashCode;
|
||||
}
|
||||
int hash = 41;
|
||||
hash = (19 * hash) + getDescriptor().hashCode();
|
||||
hash = (29 * hash) + unknownFields.hashCode();
|
||||
memoizedHashCode = hash;
|
||||
return hash;
|
||||
}
|
||||
|
||||
public static io.grpc.instrumentation.v1alpha.TraceResponse parseFrom(
|
||||
java.nio.ByteBuffer data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceResponse parseFrom(
|
||||
java.nio.ByteBuffer data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceResponse parseFrom(
|
||||
com.google.protobuf.ByteString data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceResponse parseFrom(
|
||||
com.google.protobuf.ByteString data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceResponse parseFrom(byte[] data)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceResponse parseFrom(
|
||||
byte[] data,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return PARSER.parseFrom(data, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceResponse parseFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceResponse parseFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceResponse parseDelimitedFrom(java.io.InputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceResponse parseDelimitedFrom(
|
||||
java.io.InputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceResponse parseFrom(
|
||||
com.google.protobuf.CodedInputStream input)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input);
|
||||
}
|
||||
public static io.grpc.instrumentation.v1alpha.TraceResponse parseFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
return com.google.protobuf.GeneratedMessageV3
|
||||
.parseWithIOException(PARSER, input, extensionRegistry);
|
||||
}
|
||||
|
||||
public Builder newBuilderForType() { return newBuilder(); }
|
||||
public static Builder newBuilder() {
|
||||
return DEFAULT_INSTANCE.toBuilder();
|
||||
}
|
||||
public static Builder newBuilder(io.grpc.instrumentation.v1alpha.TraceResponse prototype) {
|
||||
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
|
||||
}
|
||||
public Builder toBuilder() {
|
||||
return this == DEFAULT_INSTANCE
|
||||
? new Builder() : new Builder().mergeFrom(this);
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
protected Builder newBuilderForType(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
Builder builder = new Builder(parent);
|
||||
return builder;
|
||||
}
|
||||
/**
|
||||
* <pre>
|
||||
* TODO(aveitch): Complete definition of this type
|
||||
* </pre>
|
||||
*
|
||||
* Protobuf type {@code grpc.instrumentation.v1alpha.TraceResponse}
|
||||
*/
|
||||
public static final class Builder extends
|
||||
com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
|
||||
// @@protoc_insertion_point(builder_implements:grpc.instrumentation.v1alpha.TraceResponse)
|
||||
io.grpc.instrumentation.v1alpha.TraceResponseOrBuilder {
|
||||
public static final com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptor() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceResponse_descriptor;
|
||||
}
|
||||
|
||||
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
|
||||
internalGetFieldAccessorTable() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceResponse_fieldAccessorTable
|
||||
.ensureFieldAccessorsInitialized(
|
||||
io.grpc.instrumentation.v1alpha.TraceResponse.class, io.grpc.instrumentation.v1alpha.TraceResponse.Builder.class);
|
||||
}
|
||||
|
||||
// Construct using io.grpc.instrumentation.v1alpha.TraceResponse.newBuilder()
|
||||
private Builder() {
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
|
||||
private Builder(
|
||||
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
|
||||
super(parent);
|
||||
maybeForceBuilderInitialization();
|
||||
}
|
||||
private void maybeForceBuilderInitialization() {
|
||||
if (com.google.protobuf.GeneratedMessageV3
|
||||
.alwaysUseFieldBuilders) {
|
||||
}
|
||||
}
|
||||
public Builder clear() {
|
||||
super.clear();
|
||||
return this;
|
||||
}
|
||||
|
||||
public com.google.protobuf.Descriptors.Descriptor
|
||||
getDescriptorForType() {
|
||||
return io.grpc.instrumentation.v1alpha.MonitoringProto.internal_static_grpc_instrumentation_v1alpha_TraceResponse_descriptor;
|
||||
}
|
||||
|
||||
public io.grpc.instrumentation.v1alpha.TraceResponse getDefaultInstanceForType() {
|
||||
return io.grpc.instrumentation.v1alpha.TraceResponse.getDefaultInstance();
|
||||
}
|
||||
|
||||
public io.grpc.instrumentation.v1alpha.TraceResponse build() {
|
||||
io.grpc.instrumentation.v1alpha.TraceResponse result = buildPartial();
|
||||
if (!result.isInitialized()) {
|
||||
throw newUninitializedMessageException(result);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public io.grpc.instrumentation.v1alpha.TraceResponse buildPartial() {
|
||||
io.grpc.instrumentation.v1alpha.TraceResponse result = new io.grpc.instrumentation.v1alpha.TraceResponse(this);
|
||||
onBuilt();
|
||||
return result;
|
||||
}
|
||||
|
||||
public Builder clone() {
|
||||
return (Builder) super.clone();
|
||||
}
|
||||
public Builder setField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return (Builder) super.setField(field, value);
|
||||
}
|
||||
public Builder clearField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field) {
|
||||
return (Builder) super.clearField(field);
|
||||
}
|
||||
public Builder clearOneof(
|
||||
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
|
||||
return (Builder) super.clearOneof(oneof);
|
||||
}
|
||||
public Builder setRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
int index, java.lang.Object value) {
|
||||
return (Builder) super.setRepeatedField(field, index, value);
|
||||
}
|
||||
public Builder addRepeatedField(
|
||||
com.google.protobuf.Descriptors.FieldDescriptor field,
|
||||
java.lang.Object value) {
|
||||
return (Builder) super.addRepeatedField(field, value);
|
||||
}
|
||||
public Builder mergeFrom(com.google.protobuf.Message other) {
|
||||
if (other instanceof io.grpc.instrumentation.v1alpha.TraceResponse) {
|
||||
return mergeFrom((io.grpc.instrumentation.v1alpha.TraceResponse)other);
|
||||
} else {
|
||||
super.mergeFrom(other);
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public Builder mergeFrom(io.grpc.instrumentation.v1alpha.TraceResponse other) {
|
||||
if (other == io.grpc.instrumentation.v1alpha.TraceResponse.getDefaultInstance()) return this;
|
||||
this.mergeUnknownFields(other.unknownFields);
|
||||
onChanged();
|
||||
return this;
|
||||
}
|
||||
|
||||
public final boolean isInitialized() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public Builder mergeFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws java.io.IOException {
|
||||
io.grpc.instrumentation.v1alpha.TraceResponse parsedMessage = null;
|
||||
try {
|
||||
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
|
||||
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
|
||||
parsedMessage = (io.grpc.instrumentation.v1alpha.TraceResponse) e.getUnfinishedMessage();
|
||||
throw e.unwrapIOException();
|
||||
} finally {
|
||||
if (parsedMessage != null) {
|
||||
mergeFrom(parsedMessage);
|
||||
}
|
||||
}
|
||||
return this;
|
||||
}
|
||||
public final Builder setUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.setUnknownFieldsProto3(unknownFields);
|
||||
}
|
||||
|
||||
public final Builder mergeUnknownFields(
|
||||
final com.google.protobuf.UnknownFieldSet unknownFields) {
|
||||
return super.mergeUnknownFields(unknownFields);
|
||||
}
|
||||
|
||||
|
||||
// @@protoc_insertion_point(builder_scope:grpc.instrumentation.v1alpha.TraceResponse)
|
||||
}
|
||||
|
||||
// @@protoc_insertion_point(class_scope:grpc.instrumentation.v1alpha.TraceResponse)
|
||||
private static final io.grpc.instrumentation.v1alpha.TraceResponse DEFAULT_INSTANCE;
|
||||
static {
|
||||
DEFAULT_INSTANCE = new io.grpc.instrumentation.v1alpha.TraceResponse();
|
||||
}
|
||||
|
||||
public static io.grpc.instrumentation.v1alpha.TraceResponse getDefaultInstance() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
private static final com.google.protobuf.Parser<TraceResponse>
|
||||
PARSER = new com.google.protobuf.AbstractParser<TraceResponse>() {
|
||||
public TraceResponse parsePartialFrom(
|
||||
com.google.protobuf.CodedInputStream input,
|
||||
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
|
||||
throws com.google.protobuf.InvalidProtocolBufferException {
|
||||
return new TraceResponse(input, extensionRegistry);
|
||||
}
|
||||
};
|
||||
|
||||
public static com.google.protobuf.Parser<TraceResponse> parser() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
@java.lang.Override
|
||||
public com.google.protobuf.Parser<TraceResponse> getParserForType() {
|
||||
return PARSER;
|
||||
}
|
||||
|
||||
public io.grpc.instrumentation.v1alpha.TraceResponse getDefaultInstanceForType() {
|
||||
return DEFAULT_INSTANCE;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: grpc/instrumentation/v1alpha/monitoring.proto
|
||||
|
||||
package io.grpc.instrumentation.v1alpha;
|
||||
|
||||
public interface TraceResponseOrBuilder extends
|
||||
// @@protoc_insertion_point(interface_extends:grpc.instrumentation.v1alpha.TraceResponse)
|
||||
com.google.protobuf.MessageOrBuilder {
|
||||
}
|
|
@ -1,96 +0,0 @@
|
|||
/*
|
||||
* Copyright 2017, gRPC Authors All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.grpc.services;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.instrumentation.stats.RpcConstants;
|
||||
import com.google.instrumentation.stats.Stats;
|
||||
import com.google.instrumentation.stats.StatsManager;
|
||||
import com.google.protobuf.Empty;
|
||||
import io.grpc.ExperimentalApi;
|
||||
import io.grpc.instrumentation.v1alpha.CanonicalRpcStats;
|
||||
import io.grpc.instrumentation.v1alpha.MonitoringGrpc;
|
||||
import io.grpc.stub.StreamObserver;
|
||||
|
||||
/**
|
||||
* An implementation of the gRPC monitoring service.
|
||||
*
|
||||
* <p>An implementation of {@link StatsManager} must be available at runtime (determined via {@link
|
||||
* Stats#getStatsManager}) or instantiating this service will fail.
|
||||
*/
|
||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/2776")
|
||||
public final class MonitoringService extends MonitoringGrpc.MonitoringImplBase {
|
||||
private static MonitoringService instance;
|
||||
|
||||
private final StatsManager statsManager;
|
||||
|
||||
@VisibleForTesting
|
||||
MonitoringService(StatsManager statsManager) {
|
||||
checkNotNull(statsManager, "StatsManager implementation unavailable");
|
||||
this.statsManager = statsManager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the singleton instance of the MonitoringService.
|
||||
*
|
||||
* @throws IllegalStateException if {@link Stats#getStatsManager} returns null
|
||||
*/
|
||||
public static synchronized MonitoringService getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new MonitoringService(Stats.getStatsManager());
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
// TODO(ericgribkoff) Add remaining CanonicalRpcStats fields when they are included in
|
||||
// instrumentation.
|
||||
@Override
|
||||
public void getCanonicalRpcStats(
|
||||
Empty request, StreamObserver<CanonicalRpcStats> responseObserver) {
|
||||
CanonicalRpcStats response =
|
||||
CanonicalRpcStats.newBuilder()
|
||||
.setRpcClientElapsedTime(
|
||||
MonitoringUtil.buildCanonicalRpcStatsView(
|
||||
statsManager.getView(RpcConstants.RPC_CLIENT_ROUNDTRIP_LATENCY_VIEW)))
|
||||
.setRpcClientServerElapsedTime(
|
||||
MonitoringUtil.buildCanonicalRpcStatsView(
|
||||
statsManager.getView(RpcConstants.RPC_CLIENT_SERVER_ELAPSED_TIME_VIEW)))
|
||||
.setRpcClientRequestBytes(
|
||||
MonitoringUtil.buildCanonicalRpcStatsView(
|
||||
statsManager.getView(RpcConstants.RPC_CLIENT_REQUEST_BYTES_VIEW)))
|
||||
.setRpcClientResponseBytes(
|
||||
MonitoringUtil.buildCanonicalRpcStatsView(
|
||||
statsManager.getView(RpcConstants.RPC_CLIENT_RESPONSE_BYTES_VIEW)))
|
||||
.setRpcServerServerElapsedTime(
|
||||
MonitoringUtil.buildCanonicalRpcStatsView(
|
||||
statsManager.getView(RpcConstants.RPC_SERVER_SERVER_LATENCY_VIEW)))
|
||||
.setRpcServerRequestBytes(
|
||||
MonitoringUtil.buildCanonicalRpcStatsView(
|
||||
statsManager.getView(RpcConstants.RPC_SERVER_REQUEST_BYTES_VIEW)))
|
||||
.setRpcServerResponseBytes(
|
||||
MonitoringUtil.buildCanonicalRpcStatsView(
|
||||
statsManager.getView(RpcConstants.RPC_SERVER_RESPONSE_BYTES_VIEW)))
|
||||
.setRpcServerElapsedTime(
|
||||
MonitoringUtil.buildCanonicalRpcStatsView(
|
||||
statsManager.getView(RpcConstants.RPC_SERVER_SERVER_ELAPSED_TIME_VIEW)))
|
||||
.build();
|
||||
responseObserver.onNext(response);
|
||||
responseObserver.onCompleted();
|
||||
}
|
||||
}
|
|
@ -1,261 +0,0 @@
|
|||
/*
|
||||
* Copyright 2017, gRPC Authors All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.grpc.services;
|
||||
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
import com.google.instrumentation.common.Duration;
|
||||
import com.google.instrumentation.common.Timestamp;
|
||||
import com.google.instrumentation.stats.DistributionAggregation;
|
||||
import com.google.instrumentation.stats.DistributionAggregationDescriptor;
|
||||
import com.google.instrumentation.stats.IntervalAggregation;
|
||||
import com.google.instrumentation.stats.IntervalAggregation.Interval;
|
||||
import com.google.instrumentation.stats.IntervalAggregationDescriptor;
|
||||
import com.google.instrumentation.stats.MeasurementDescriptor;
|
||||
import com.google.instrumentation.stats.MeasurementDescriptor.BasicUnit;
|
||||
import com.google.instrumentation.stats.MeasurementDescriptor.MeasurementUnit;
|
||||
import com.google.instrumentation.stats.Tag;
|
||||
import com.google.instrumentation.stats.TagKey;
|
||||
import com.google.instrumentation.stats.View;
|
||||
import com.google.instrumentation.stats.View.DistributionView;
|
||||
import com.google.instrumentation.stats.View.IntervalView;
|
||||
import com.google.instrumentation.stats.ViewDescriptor;
|
||||
import com.google.instrumentation.stats.ViewDescriptor.DistributionViewDescriptor;
|
||||
import com.google.instrumentation.stats.ViewDescriptor.IntervalViewDescriptor;
|
||||
import com.google.instrumentation.stats.proto.CensusProto;
|
||||
import io.grpc.ExperimentalApi;
|
||||
import io.grpc.instrumentation.v1alpha.StatsResponse;
|
||||
|
||||
/** Utility methods to support {@link MonitoringService}. */
|
||||
@ExperimentalApi("https://github.com/grpc/grpc-java/issues/2776")
|
||||
final class MonitoringUtil {
|
||||
|
||||
private MonitoringUtil() {}
|
||||
|
||||
/** Serialize a {@link View} and associated descriptors to a {@link StatsResponse}. */
|
||||
static StatsResponse buildCanonicalRpcStatsView(View view) {
|
||||
return StatsResponse.newBuilder()
|
||||
.setMeasurementDescriptor(
|
||||
serializeMeasurementDescriptor(view.getViewDescriptor().getMeasurementDescriptor()))
|
||||
.setViewDescriptor(serializeViewDescriptor(view.getViewDescriptor()))
|
||||
.setView(serializeView(view))
|
||||
.build();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static CensusProto.MeasurementDescriptor serializeMeasurementDescriptor(
|
||||
MeasurementDescriptor measurementDescriptor) {
|
||||
return CensusProto.MeasurementDescriptor.newBuilder()
|
||||
.setName(measurementDescriptor.getName())
|
||||
.setDescription(measurementDescriptor.getDescription())
|
||||
.setUnit(serializeMeasurementUnit(measurementDescriptor.getUnit()))
|
||||
.build();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static CensusProto.MeasurementDescriptor.MeasurementUnit serializeMeasurementUnit(
|
||||
MeasurementUnit unit) {
|
||||
CensusProto.MeasurementDescriptor.MeasurementUnit.Builder unitBuilder =
|
||||
CensusProto.MeasurementDescriptor.MeasurementUnit.newBuilder()
|
||||
.setPower10(unit.getPower10());
|
||||
for (BasicUnit basicUnit : unit.getNumerators()) {
|
||||
unitBuilder.addNumerators(serializeBasicUnit(basicUnit));
|
||||
}
|
||||
for (BasicUnit basicUnit : unit.getDenominators()) {
|
||||
unitBuilder.addDenominators(serializeBasicUnit(basicUnit));
|
||||
}
|
||||
return unitBuilder.build();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static CensusProto.MeasurementDescriptor.BasicUnit serializeBasicUnit(BasicUnit basicUnit) {
|
||||
switch (basicUnit) {
|
||||
case SCALAR:
|
||||
return CensusProto.MeasurementDescriptor.BasicUnit.SCALAR;
|
||||
case BITS:
|
||||
return CensusProto.MeasurementDescriptor.BasicUnit.BITS;
|
||||
case BYTES:
|
||||
return CensusProto.MeasurementDescriptor.BasicUnit.BYTES;
|
||||
case SECONDS:
|
||||
return CensusProto.MeasurementDescriptor.BasicUnit.SECONDS;
|
||||
case CORES:
|
||||
return CensusProto.MeasurementDescriptor.BasicUnit.CORES;
|
||||
default:
|
||||
return CensusProto.MeasurementDescriptor.BasicUnit.UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static CensusProto.ViewDescriptor serializeViewDescriptor(ViewDescriptor viewDescriptor) {
|
||||
CensusProto.ViewDescriptor.Builder viewDescriptorBuilder =
|
||||
CensusProto.ViewDescriptor.newBuilder()
|
||||
.setName(viewDescriptor.getName())
|
||||
.setDescription(viewDescriptor.getDescription())
|
||||
.setMeasurementDescriptorName(viewDescriptor.getMeasurementDescriptor().getName());
|
||||
for (TagKey tagKey : viewDescriptor.getTagKeys()) {
|
||||
viewDescriptorBuilder.addTagKeys(tagKey.toString());
|
||||
}
|
||||
|
||||
if (viewDescriptor instanceof DistributionViewDescriptor) {
|
||||
viewDescriptorBuilder.setDistributionAggregation(
|
||||
serializeDistributionAggregationDescriptor(
|
||||
((DistributionViewDescriptor) viewDescriptor)
|
||||
.getDistributionAggregationDescriptor()));
|
||||
} else {
|
||||
viewDescriptorBuilder.setIntervalAggregation(
|
||||
serializeIntervalAggregationDescriptor(
|
||||
((IntervalViewDescriptor) viewDescriptor).getIntervalAggregationDescriptor()));
|
||||
}
|
||||
|
||||
return viewDescriptorBuilder.build();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static CensusProto.DistributionAggregationDescriptor serializeDistributionAggregationDescriptor(
|
||||
DistributionAggregationDescriptor distributionAggregationDescriptor) {
|
||||
CensusProto.DistributionAggregationDescriptor.Builder distributionAggregationDescriptorBuilder =
|
||||
CensusProto.DistributionAggregationDescriptor.newBuilder();
|
||||
if (distributionAggregationDescriptor.getBucketBoundaries() != null) {
|
||||
distributionAggregationDescriptorBuilder.addAllBucketBounds(
|
||||
distributionAggregationDescriptor.getBucketBoundaries());
|
||||
}
|
||||
return distributionAggregationDescriptorBuilder.build();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static CensusProto.IntervalAggregationDescriptor serializeIntervalAggregationDescriptor(
|
||||
IntervalAggregationDescriptor intervalAggregationDescriptor) {
|
||||
CensusProto.IntervalAggregationDescriptor.Builder intervalAggregationDescriptorBuilder =
|
||||
CensusProto.IntervalAggregationDescriptor.newBuilder()
|
||||
.setNSubIntervals(intervalAggregationDescriptor.getNumSubIntervals());
|
||||
for (Duration intervalSize : intervalAggregationDescriptor.getIntervalSizes()) {
|
||||
intervalAggregationDescriptorBuilder.addIntervalSizes(serializeDuration(intervalSize));
|
||||
}
|
||||
return intervalAggregationDescriptorBuilder.build();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static CensusProto.Duration serializeDuration(Duration duration) {
|
||||
return CensusProto.Duration.newBuilder()
|
||||
.setSeconds(duration.getSeconds())
|
||||
.setNanos(duration.getNanos())
|
||||
.build();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static CensusProto.View serializeView(View view) {
|
||||
CensusProto.View.Builder viewBuilder =
|
||||
CensusProto.View.newBuilder().setViewName(view.getViewDescriptor().getName());
|
||||
|
||||
if (view instanceof DistributionView) {
|
||||
viewBuilder.setDistributionView(serializeDistributionView((DistributionView) view));
|
||||
} else {
|
||||
viewBuilder.setIntervalView(serializeIntervalView((IntervalView) view));
|
||||
}
|
||||
|
||||
return viewBuilder.build();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static CensusProto.DistributionView serializeDistributionView(DistributionView distributionView) {
|
||||
CensusProto.DistributionView.Builder distributionViewBuilder =
|
||||
CensusProto.DistributionView.newBuilder();
|
||||
//TODO(ericgribkoff) Re-enable once getter methods are public in instrumentation.
|
||||
//distributionViewBuilder.setStart(serializeTimestamp(distributionView.getStart()))
|
||||
//distributionViewBuilder.setEnd(serializeTimestamp(distributionView.getEnd()));
|
||||
for (DistributionAggregation aggregation : distributionView.getDistributionAggregations()) {
|
||||
distributionViewBuilder.addAggregations(serializeDistributionAggregation(aggregation));
|
||||
}
|
||||
return distributionViewBuilder.build();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static CensusProto.Timestamp serializeTimestamp(Timestamp timestamp) {
|
||||
return CensusProto.Timestamp.newBuilder()
|
||||
.setSeconds(timestamp.getSeconds())
|
||||
.setNanos(timestamp.getNanos())
|
||||
.build();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static CensusProto.DistributionAggregation serializeDistributionAggregation(
|
||||
DistributionAggregation aggregation) {
|
||||
CensusProto.DistributionAggregation.Builder aggregationBuilder =
|
||||
CensusProto.DistributionAggregation.newBuilder()
|
||||
.setCount(aggregation.getCount())
|
||||
.setMean(aggregation.getMean())
|
||||
.setSum(aggregation.getSum())
|
||||
.setRange(serializeRange(aggregation.getRange()));
|
||||
if (aggregation.getBucketCounts() != null) {
|
||||
aggregationBuilder.addAllBucketCounts(aggregation.getBucketCounts());
|
||||
}
|
||||
for (Tag tag : aggregation.getTags()) {
|
||||
aggregationBuilder.addTags(serializeTag(tag));
|
||||
}
|
||||
return aggregationBuilder.build();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static CensusProto.DistributionAggregation.Range serializeRange(
|
||||
DistributionAggregation.Range range) {
|
||||
CensusProto.DistributionAggregation.Range.Builder builder =
|
||||
CensusProto.DistributionAggregation.Range.newBuilder();
|
||||
if (range != null) {
|
||||
builder.setMin(range.getMin()).setMax(range.getMax());
|
||||
}
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static CensusProto.Tag serializeTag(Tag tag) {
|
||||
return CensusProto.Tag.newBuilder()
|
||||
.setKey(tag.getKey().toString())
|
||||
.setValue(tag.getValue().toString())
|
||||
.build();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static CensusProto.IntervalView serializeIntervalView(IntervalView intervalView) {
|
||||
CensusProto.IntervalView.Builder intervalViewBuilder = CensusProto.IntervalView.newBuilder();
|
||||
for (IntervalAggregation aggregation : intervalView.getIntervalAggregations()) {
|
||||
intervalViewBuilder.addAggregations(serializeIntervalAggregation(aggregation));
|
||||
}
|
||||
return intervalViewBuilder.build();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static CensusProto.IntervalAggregation serializeIntervalAggregation(
|
||||
IntervalAggregation aggregation) {
|
||||
CensusProto.IntervalAggregation.Builder aggregationBuilder =
|
||||
CensusProto.IntervalAggregation.newBuilder();
|
||||
for (Interval interval : aggregation.getIntervals()) {
|
||||
aggregationBuilder.addIntervals(serializeInterval(interval));
|
||||
}
|
||||
for (Tag tag : aggregation.getTags()) {
|
||||
aggregationBuilder.addTags(serializeTag(tag));
|
||||
}
|
||||
return aggregationBuilder.build();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
static CensusProto.IntervalAggregation.Interval serializeInterval(Interval interval) {
|
||||
return CensusProto.IntervalAggregation.Interval.newBuilder()
|
||||
.setIntervalSize(serializeDuration(interval.getIntervalSize()))
|
||||
.setCount(interval.getCount())
|
||||
.setSum(interval.getSum())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -1,141 +0,0 @@
|
|||
// Copyright 2017, gRPC Authors
|
||||
// All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// This file defines an interface for exporting monitoring information
|
||||
// out of gRPC servers.
|
||||
syntax = "proto3";
|
||||
|
||||
// TODO(ericgribkoff) Figure out how to manage the external Census proto
|
||||
// dependency.
|
||||
import "google/instrumentation/census.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
import "google/protobuf/empty.proto";
|
||||
|
||||
package grpc.instrumentation.v1alpha;
|
||||
|
||||
option java_multiple_files = true;
|
||||
option java_package = "io.grpc.instrumentation.v1alpha";
|
||||
option java_outer_classname = "MonitoringProto";
|
||||
|
||||
service Monitoring {
|
||||
// Return canonical RPC stats
|
||||
rpc GetCanonicalRpcStats(google.protobuf.Empty) returns (CanonicalRpcStats) {
|
||||
}
|
||||
|
||||
// Query the server for specific stats
|
||||
rpc GetStats(StatsRequest) returns (StatsResponse) {
|
||||
}
|
||||
|
||||
// Request the server to stream back snapshots of the requested stats
|
||||
rpc WatchStats(StatsRequest) returns (stream StatsResponse) {
|
||||
}
|
||||
|
||||
|
||||
// Return request traces.
|
||||
rpc GetRequestTraces(TraceRequest) returns(TraceResponse) {
|
||||
// TODO(aveitch): Please define the messages here
|
||||
}
|
||||
|
||||
// Return application-defined groups of monitoring data.
|
||||
// This is a low level facility to allow extension of the monitoring API to
|
||||
// application-specific monitoring data. Frameworks may use this to define
|
||||
// additional groups of monitoring data made available by servers.
|
||||
rpc GetCustomMonitoringData(MonitoringDataGroup)
|
||||
returns (CustomMonitoringData) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Canonical RPC stats exported by gRPC.
|
||||
message CanonicalRpcStats {
|
||||
StatsResponse rpc_client_errors = 1;
|
||||
StatsResponse rpc_client_completed_rpcs = 2;
|
||||
StatsResponse rpc_client_started_rpcs = 3;
|
||||
StatsResponse rpc_client_elapsed_time = 4;
|
||||
StatsResponse rpc_client_server_elapsed_time = 5;
|
||||
StatsResponse rpc_client_request_bytes = 6;
|
||||
StatsResponse rpc_client_response_bytes = 7;
|
||||
StatsResponse rpc_client_request_count = 8;
|
||||
StatsResponse rpc_client_response_count = 9;
|
||||
StatsResponse rpc_server_errors = 10;
|
||||
StatsResponse rpc_server_completed_rpcs = 11;
|
||||
StatsResponse rpc_server_server_elapsed_time = 12;
|
||||
StatsResponse rpc_server_request_bytes = 13;
|
||||
StatsResponse rpc_server_response_bytes = 14;
|
||||
StatsResponse rpc_server_request_count = 15;
|
||||
StatsResponse rpc_server_response_count = 16;
|
||||
StatsResponse rpc_server_elapsed_time = 17;
|
||||
//TODO(ericgribkoff) Add minute-hour interval stats.
|
||||
}
|
||||
|
||||
// This message is sent when requesting a set of stats (Census Views) from
|
||||
// a client system, as part of the MonitoringService API's.
|
||||
message StatsRequest {
|
||||
// An optional set of ViewDescriptor names. Only Views using these
|
||||
// descriptors will be sent back in the response. If no names are provided,
|
||||
// then all Views present in the client system will be included in every
|
||||
// response. If measurement_names is also provided, then Views matching the
|
||||
// intersection of the two are returned.
|
||||
// TODO(aveitch): Consider making this a list of regexes or prefix matches in
|
||||
// the future.
|
||||
repeated string view_names = 1;
|
||||
|
||||
// An optional set of MeasurementDescriptor names. Only Views using these
|
||||
// descriptors will be sent back in the response. If no names are provided,
|
||||
// then all Views present in the client system will be included in every
|
||||
// response. If view_names is also provided, then Views matching the
|
||||
// intersection of the two are returned.
|
||||
// TODO(aveitch): Consider making this a list of regexes or prefix matches in
|
||||
// the future.
|
||||
repeated string measurement_names = 2;
|
||||
|
||||
// By default, the MeasurementDescriptors and ViewDescriptors corresponding to
|
||||
// the Views that are returned in a StatsResponse will be included in the
|
||||
// first such response. Set this to true to have them not sent.
|
||||
bool dont_include_descriptors_in_first_response = 3;
|
||||
}
|
||||
|
||||
// This message contains all information relevant to a single View. It is the
|
||||
// return type for GetStats and WatchStats, and used in CanonicalRpcStats.
|
||||
message StatsResponse {
|
||||
// A StatsResponse can optionally contain the MeasurementDescriptor and
|
||||
// ViewDescriptor for the View. These will be sent in the first WatchStats
|
||||
// response, or all GetStats and GetCanonicalRpcStats responses. These will
|
||||
// not be set for {Get,Watch}Stats if
|
||||
// dont_include_descriptors_in_first_response is set to true in the
|
||||
// StatsRequest.
|
||||
google.instrumentation.MeasurementDescriptor measurement_descriptor = 1;
|
||||
google.instrumentation.ViewDescriptor view_descriptor = 2;
|
||||
|
||||
// The View data.
|
||||
google.instrumentation.View view = 3;
|
||||
}
|
||||
|
||||
message TraceRequest {
|
||||
// TODO(aveitch): Complete definition of this type
|
||||
}
|
||||
|
||||
message TraceResponse {
|
||||
// TODO(aveitch): Complete definition of this type
|
||||
}
|
||||
|
||||
message MonitoringDataGroup {
|
||||
string name = 1; // name of a group of monitoring data
|
||||
}
|
||||
|
||||
// The wrapper for custom monitoring data.
|
||||
message CustomMonitoringData {
|
||||
// can be any application specific monitoring data
|
||||
google.protobuf.Any contents = 1;
|
||||
}
|
|
@ -1,97 +0,0 @@
|
|||
/*
|
||||
* Copyright 2017, gRPC Authors All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.grpc.services;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.mockito.Matchers.any;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.verify;
|
||||
import static org.mockito.Mockito.verifyNoMoreInteractions;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import com.google.instrumentation.stats.RpcConstants;
|
||||
import com.google.instrumentation.stats.StatsManager;
|
||||
import com.google.instrumentation.stats.ViewDescriptor.DistributionViewDescriptor;
|
||||
import com.google.instrumentation.stats.ViewDescriptor.IntervalViewDescriptor;
|
||||
import com.google.protobuf.Empty;
|
||||
import io.grpc.instrumentation.v1alpha.CanonicalRpcStats;
|
||||
import io.grpc.stub.StreamObserver;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
import org.mockito.ArgumentCaptor;
|
||||
import org.mockito.Mock;
|
||||
import org.mockito.MockitoAnnotations;
|
||||
|
||||
/** Unit tests for {@link MonitoringService}. */
|
||||
@RunWith(JUnit4.class)
|
||||
public class MonitoringServiceTest {
|
||||
@Mock private StatsManager statsManager;
|
||||
|
||||
private MonitoringService monitoringService;
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
MockitoAnnotations.initMocks(this);
|
||||
when(statsManager.getView(any(DistributionViewDescriptor.class)))
|
||||
.thenReturn(MonitoringUtilTest.DISTRIBUTION_VIEW);
|
||||
when(statsManager.getView(any(IntervalViewDescriptor.class)))
|
||||
.thenReturn(MonitoringUtilTest.INTERVAL_VIEW);
|
||||
monitoringService = new MonitoringService(statsManager);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getCanonicalRpcStats() throws Exception {
|
||||
@SuppressWarnings("unchecked")
|
||||
StreamObserver<CanonicalRpcStats> observer = mock(StreamObserver.class);
|
||||
ArgumentCaptor<CanonicalRpcStats> statsResponse =
|
||||
ArgumentCaptor.forClass(CanonicalRpcStats.class);
|
||||
|
||||
monitoringService.getCanonicalRpcStats(Empty.getDefaultInstance(), observer);
|
||||
|
||||
verify(statsManager).getView(RpcConstants.RPC_CLIENT_ROUNDTRIP_LATENCY_VIEW);
|
||||
verify(statsManager).getView(RpcConstants.RPC_CLIENT_SERVER_ELAPSED_TIME_VIEW);
|
||||
verify(statsManager).getView(RpcConstants.RPC_CLIENT_REQUEST_BYTES_VIEW);
|
||||
verify(statsManager).getView(RpcConstants.RPC_CLIENT_RESPONSE_BYTES_VIEW);
|
||||
verify(statsManager).getView(RpcConstants.RPC_SERVER_SERVER_LATENCY_VIEW);
|
||||
verify(statsManager).getView(RpcConstants.RPC_SERVER_REQUEST_BYTES_VIEW);
|
||||
verify(statsManager).getView(RpcConstants.RPC_SERVER_RESPONSE_BYTES_VIEW);
|
||||
verify(statsManager).getView(RpcConstants.RPC_SERVER_SERVER_ELAPSED_TIME_VIEW);
|
||||
verifyNoMoreInteractions(statsManager);
|
||||
|
||||
verify(observer).onNext(statsResponse.capture());
|
||||
assertFalse(statsResponse.getValue().hasRpcClientErrors());
|
||||
assertFalse(statsResponse.getValue().hasRpcClientCompletedRpcs());
|
||||
assertFalse(statsResponse.getValue().hasRpcClientStartedRpcs());
|
||||
assertTrue(statsResponse.getValue().hasRpcClientElapsedTime());
|
||||
assertTrue(statsResponse.getValue().hasRpcClientServerElapsedTime());
|
||||
assertTrue(statsResponse.getValue().hasRpcClientRequestBytes());
|
||||
assertTrue(statsResponse.getValue().hasRpcClientResponseBytes());
|
||||
assertFalse(statsResponse.getValue().hasRpcClientRequestCount());
|
||||
assertFalse(statsResponse.getValue().hasRpcClientResponseCount());
|
||||
assertFalse(statsResponse.getValue().hasRpcServerErrors());
|
||||
assertFalse(statsResponse.getValue().hasRpcServerCompletedRpcs());
|
||||
assertTrue(statsResponse.getValue().hasRpcServerServerElapsedTime());
|
||||
assertTrue(statsResponse.getValue().hasRpcServerRequestBytes());
|
||||
assertTrue(statsResponse.getValue().hasRpcServerResponseBytes());
|
||||
assertFalse(statsResponse.getValue().hasRpcServerRequestCount());
|
||||
assertFalse(statsResponse.getValue().hasRpcServerResponseCount());
|
||||
assertTrue(statsResponse.getValue().hasRpcServerElapsedTime());
|
||||
}
|
||||
}
|
|
@ -1,351 +0,0 @@
|
|||
/*
|
||||
* Copyright 2017, gRPC Authors All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package io.grpc.services;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import com.google.instrumentation.common.Duration;
|
||||
import com.google.instrumentation.common.Timestamp;
|
||||
import com.google.instrumentation.stats.DistributionAggregation;
|
||||
import com.google.instrumentation.stats.DistributionAggregation.Range;
|
||||
import com.google.instrumentation.stats.DistributionAggregationDescriptor;
|
||||
import com.google.instrumentation.stats.IntervalAggregation;
|
||||
import com.google.instrumentation.stats.IntervalAggregation.Interval;
|
||||
import com.google.instrumentation.stats.IntervalAggregationDescriptor;
|
||||
import com.google.instrumentation.stats.MeasurementDescriptor;
|
||||
import com.google.instrumentation.stats.MeasurementDescriptor.BasicUnit;
|
||||
import com.google.instrumentation.stats.MeasurementDescriptor.MeasurementUnit;
|
||||
import com.google.instrumentation.stats.Tag;
|
||||
import com.google.instrumentation.stats.TagKey;
|
||||
import com.google.instrumentation.stats.TagValue;
|
||||
import com.google.instrumentation.stats.View.DistributionView;
|
||||
import com.google.instrumentation.stats.View.IntervalView;
|
||||
import com.google.instrumentation.stats.ViewDescriptor.DistributionViewDescriptor;
|
||||
import com.google.instrumentation.stats.ViewDescriptor.IntervalViewDescriptor;
|
||||
import com.google.instrumentation.stats.proto.CensusProto;
|
||||
import io.grpc.instrumentation.v1alpha.StatsResponse;
|
||||
import java.util.Arrays;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.JUnit4;
|
||||
|
||||
/** Unit tests for {@link MonitoringUtil}. */
|
||||
@RunWith(JUnit4.class)
|
||||
public class MonitoringUtilTest {
|
||||
@Test
|
||||
public void buildCanonicalRpcStatsViewForDistributionView() throws Exception {
|
||||
assertEquals(
|
||||
DISTRIBUTION_STATS_RESPONSE_PROTO,
|
||||
MonitoringUtil.buildCanonicalRpcStatsView(DISTRIBUTION_VIEW));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void buildCanonicalRpcStatsViewForIntervalView() throws Exception {
|
||||
assertEquals(
|
||||
INTERVAL_STATS_RESPONSE_PROTO, MonitoringUtil.buildCanonicalRpcStatsView(INTERVAL_VIEW));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serializeMeasurementDescriptor() throws Exception {
|
||||
assertEquals(
|
||||
MEASUREMENT_DESC_PROTO,
|
||||
MonitoringUtil.serializeMeasurementDescriptor(measurementDescriptor));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serializeMeasurementUnit() throws Exception {
|
||||
assertEquals(MEASUREMENT_UNIT_PROTO, MonitoringUtil.serializeMeasurementUnit(MEASUREMENT_UNIT));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serializeViewDescriptorForDistributionView() throws Exception {
|
||||
assertEquals(
|
||||
DISTRIBUTION_VIEW_DESC_PROTO,
|
||||
MonitoringUtil.serializeViewDescriptor(DISTRIBUTION_VIEW_DESC));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serializeViewDescriptorForIntervalView() throws Exception {
|
||||
assertEquals(
|
||||
INTERVAL_VIEW_DESC_PROTO, MonitoringUtil.serializeViewDescriptor(INTERVAL_VIEW_DESC));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serializeDistributionAggregationDescriptor() throws Exception {
|
||||
assertEquals(
|
||||
DISTRIBUTION_AGG_DESC_PROTO,
|
||||
MonitoringUtil.serializeDistributionAggregationDescriptor(DISTRIBUTION_AGG_DESC));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serializeIntervalAggregationDescriptor() throws Exception {
|
||||
assertEquals(
|
||||
INTERVAL_AGG_DESC_PROTO,
|
||||
MonitoringUtil.serializeIntervalAggregationDescriptor(INTERVAL_AGG_DESC));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serializeDuration() throws Exception {
|
||||
assertEquals(DURATION_PROTO, MonitoringUtil.serializeDuration(DURATION));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serializeViewWithDistributionView() throws Exception {
|
||||
assertEquals(
|
||||
VIEW_WITH_DISTRIBUTION_VIEW_PROTO, MonitoringUtil.serializeView(DISTRIBUTION_VIEW));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serializeViewWithIntervalView() throws Exception {
|
||||
assertEquals(VIEW_WITH_INTERVAL_VIEW_PROTO, MonitoringUtil.serializeView(INTERVAL_VIEW));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serializeDistributionView() throws Exception {
|
||||
assertEquals(
|
||||
DISTRIBUTION_VIEW_PROTO, MonitoringUtil.serializeDistributionView(DISTRIBUTION_VIEW));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serializeTimestamp() throws Exception {
|
||||
assertEquals(START_TIMESTAMP_PROTO, MonitoringUtil.serializeTimestamp(START_TIMESTAMP));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serializeDistributionAggregation() throws Exception {
|
||||
assertEquals(
|
||||
DISTRIBUTION_AGG_PROTO, MonitoringUtil.serializeDistributionAggregation(DISTRIBUTION_AGG));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serializeRange() throws Exception {
|
||||
assertEquals(RANGE_PROTO, MonitoringUtil.serializeRange(RANGE));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serializeTag() throws Exception {
|
||||
assertEquals(TAG_PROTO, MonitoringUtil.serializeTag(TAG));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serializeIntervalView() throws Exception {
|
||||
assertEquals(INTERVAL_VIEW_PROTO, MonitoringUtil.serializeIntervalView(INTERVAL_VIEW));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serializeIntervalAggregation() throws Exception {
|
||||
assertEquals(INTERVAL_AGG_PROTO, MonitoringUtil.serializeIntervalAggregation(INTERVAL_AGG));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void serializeInterval() throws Exception {
|
||||
assertEquals(INTERVAL_PROTO, MonitoringUtil.serializeInterval(INTERVAL));
|
||||
}
|
||||
|
||||
private static final int UNIT_POWER = -3;
|
||||
private static final MeasurementUnit MEASUREMENT_UNIT =
|
||||
MeasurementUnit.create(
|
||||
UNIT_POWER,
|
||||
Arrays.asList(BasicUnit.SCALAR),
|
||||
Arrays.asList(BasicUnit.SECONDS, BasicUnit.SECONDS));
|
||||
private static final CensusProto.MeasurementDescriptor.MeasurementUnit MEASUREMENT_UNIT_PROTO =
|
||||
CensusProto.MeasurementDescriptor.MeasurementUnit.newBuilder()
|
||||
.setPower10(UNIT_POWER)
|
||||
.addNumerators(MonitoringUtil.serializeBasicUnit(BasicUnit.SCALAR))
|
||||
.addDenominators(MonitoringUtil.serializeBasicUnit(BasicUnit.SECONDS))
|
||||
.addDenominators(MonitoringUtil.serializeBasicUnit(BasicUnit.SECONDS))
|
||||
.build();
|
||||
|
||||
private static final String MEASUREMENT_DESC_NAME = "measurement descriptor name";
|
||||
private static final String MEASUREMENT_DESC_DESCRIPTION = "measurement descriptor description";
|
||||
private static final MeasurementDescriptor measurementDescriptor =
|
||||
MeasurementDescriptor.create(
|
||||
MEASUREMENT_DESC_NAME, MEASUREMENT_DESC_DESCRIPTION, MEASUREMENT_UNIT);
|
||||
private static final CensusProto.MeasurementDescriptor MEASUREMENT_DESC_PROTO =
|
||||
CensusProto.MeasurementDescriptor.newBuilder()
|
||||
.setName(MEASUREMENT_DESC_NAME)
|
||||
.setDescription(MEASUREMENT_DESC_DESCRIPTION)
|
||||
.setUnit(MEASUREMENT_UNIT_PROTO)
|
||||
.build();
|
||||
|
||||
private static final long START_SECONDS = 1L;
|
||||
private static final int START_NANOS = 1;
|
||||
private static final long END_SECONDS = 100000L;
|
||||
private static final int END_NANOS = 9999;
|
||||
private static final Timestamp START_TIMESTAMP = Timestamp.create(START_SECONDS, START_NANOS);
|
||||
private static final Timestamp END_TIMESTAMP = Timestamp.create(END_SECONDS, END_NANOS);
|
||||
private static final CensusProto.Timestamp START_TIMESTAMP_PROTO =
|
||||
CensusProto.Timestamp.newBuilder().setSeconds(START_SECONDS).setNanos(START_NANOS).build();
|
||||
// TODO(ericgribkoff) Re-enable once getter methods are public in instrumentation.
|
||||
//private static final CensusProto.Timestamp END_TIMESTAMP_PROTO =
|
||||
// CensusProto.Timestamp.newBuilder().setSeconds(END_SECONDS).setNanos(END_NANOS).build();
|
||||
|
||||
private static final String TAG_KEY = "tag key";
|
||||
private static final String TAG_VALUE = "tag value";
|
||||
private static final Tag TAG = Tag.create(TagKey.create(TAG_KEY), TagValue.create(TAG_VALUE));
|
||||
private static final CensusProto.Tag TAG_PROTO =
|
||||
CensusProto.Tag.newBuilder().setKey(TAG_KEY).setValue(TAG_VALUE).build();
|
||||
|
||||
private static final double RANGE_MIN = 0.1;
|
||||
private static final double RANGE_MAX = 999.9;
|
||||
private static final Range RANGE = Range.create(RANGE_MIN, RANGE_MAX);
|
||||
private static final CensusProto.DistributionAggregation.Range RANGE_PROTO =
|
||||
CensusProto.DistributionAggregation.Range.newBuilder()
|
||||
.setMin(RANGE_MIN)
|
||||
.setMax(RANGE_MAX)
|
||||
.build();
|
||||
|
||||
private static final long DISTRIBUTION_AGG_COUNT = 100L;
|
||||
private static final double DISTRIBUTION_AGG_MEAN = 55.1;
|
||||
private static final double DISTRIBUTION_AGG_SUM = 4098.5;
|
||||
private static final long BUCKET_COUNT = 11L;
|
||||
private static final DistributionAggregation DISTRIBUTION_AGG =
|
||||
DistributionAggregation.create(
|
||||
DISTRIBUTION_AGG_COUNT,
|
||||
DISTRIBUTION_AGG_MEAN,
|
||||
DISTRIBUTION_AGG_SUM,
|
||||
RANGE,
|
||||
Arrays.asList(TAG),
|
||||
Arrays.asList(BUCKET_COUNT));
|
||||
private static final CensusProto.DistributionAggregation DISTRIBUTION_AGG_PROTO =
|
||||
CensusProto.DistributionAggregation.newBuilder()
|
||||
.setCount(DISTRIBUTION_AGG_COUNT)
|
||||
.setMean(DISTRIBUTION_AGG_MEAN)
|
||||
.setSum(DISTRIBUTION_AGG_SUM)
|
||||
.setRange(RANGE_PROTO)
|
||||
.addAllBucketCounts(Arrays.asList(BUCKET_COUNT))
|
||||
.addTags(TAG_PROTO)
|
||||
.build();
|
||||
|
||||
private static final double BUCKET_BOUNDARY = 14.0;
|
||||
private static final DistributionAggregationDescriptor DISTRIBUTION_AGG_DESC =
|
||||
DistributionAggregationDescriptor.create(Arrays.asList(BUCKET_BOUNDARY));
|
||||
private static final CensusProto.DistributionAggregationDescriptor DISTRIBUTION_AGG_DESC_PROTO =
|
||||
CensusProto.DistributionAggregationDescriptor.newBuilder()
|
||||
.addBucketBounds(BUCKET_BOUNDARY)
|
||||
.build();
|
||||
|
||||
private static final String DISTRIBUTION_VIEW_NAME = "distribution view name";
|
||||
private static final String DISTRIBUTION_VIEW_DESCRIPTION = "distribution view description";
|
||||
private static final DistributionViewDescriptor DISTRIBUTION_VIEW_DESC =
|
||||
DistributionViewDescriptor.create(
|
||||
DISTRIBUTION_VIEW_NAME,
|
||||
DISTRIBUTION_VIEW_DESCRIPTION,
|
||||
measurementDescriptor,
|
||||
DISTRIBUTION_AGG_DESC,
|
||||
Arrays.asList(TagKey.create(TAG_KEY)));
|
||||
private static final CensusProto.ViewDescriptor DISTRIBUTION_VIEW_DESC_PROTO =
|
||||
CensusProto.ViewDescriptor.newBuilder()
|
||||
.setName(DISTRIBUTION_VIEW_NAME)
|
||||
.setDescription(DISTRIBUTION_VIEW_DESCRIPTION)
|
||||
.setMeasurementDescriptorName(MEASUREMENT_DESC_NAME)
|
||||
.setDistributionAggregation(DISTRIBUTION_AGG_DESC_PROTO)
|
||||
.addTagKeys(TAG_KEY)
|
||||
.build();
|
||||
|
||||
static final DistributionView DISTRIBUTION_VIEW =
|
||||
DistributionView.create(
|
||||
DISTRIBUTION_VIEW_DESC, Arrays.asList(DISTRIBUTION_AGG), START_TIMESTAMP, END_TIMESTAMP);
|
||||
private static final CensusProto.DistributionView DISTRIBUTION_VIEW_PROTO =
|
||||
CensusProto.DistributionView.newBuilder()
|
||||
.addAggregations(DISTRIBUTION_AGG_PROTO)
|
||||
// TODO(ericgribkoff) Re-enable once getter methods are public in instrumentation.
|
||||
//.setStart(START_TIMESTAMP_PROTO)
|
||||
//.setEnd(END_TIMESTAMP_PROTO)
|
||||
.build();
|
||||
private static final CensusProto.View VIEW_WITH_DISTRIBUTION_VIEW_PROTO =
|
||||
CensusProto.View.newBuilder()
|
||||
.setViewName(DISTRIBUTION_VIEW_NAME)
|
||||
.setDistributionView(DISTRIBUTION_VIEW_PROTO)
|
||||
.build();
|
||||
private static final StatsResponse DISTRIBUTION_STATS_RESPONSE_PROTO =
|
||||
StatsResponse.newBuilder()
|
||||
.setMeasurementDescriptor(MEASUREMENT_DESC_PROTO)
|
||||
.setViewDescriptor(DISTRIBUTION_VIEW_DESC_PROTO)
|
||||
.setView(VIEW_WITH_DISTRIBUTION_VIEW_PROTO)
|
||||
.build();
|
||||
|
||||
private static final long DURATION_SECONDS = 100L;
|
||||
private static final int DURATION_NANOS = 9999;
|
||||
private static final Duration DURATION = Duration.create(DURATION_SECONDS, DURATION_NANOS);
|
||||
private static final CensusProto.Duration DURATION_PROTO =
|
||||
CensusProto.Duration.newBuilder()
|
||||
.setSeconds(DURATION_SECONDS)
|
||||
.setNanos(DURATION_NANOS)
|
||||
.build();
|
||||
|
||||
private static final int NUM_SUB_INTERVALS = 2;
|
||||
private static final IntervalAggregationDescriptor INTERVAL_AGG_DESC =
|
||||
IntervalAggregationDescriptor.create(NUM_SUB_INTERVALS, Arrays.asList(DURATION));
|
||||
private static final CensusProto.IntervalAggregationDescriptor INTERVAL_AGG_DESC_PROTO =
|
||||
CensusProto.IntervalAggregationDescriptor.newBuilder()
|
||||
.setNSubIntervals(NUM_SUB_INTERVALS)
|
||||
.addIntervalSizes(DURATION_PROTO)
|
||||
.build();
|
||||
|
||||
private static final String INTERVAL_VIEW_NAME = "interval view name";
|
||||
private static final String INTERVAL_VIEW_DESCRIPTION = "interval view description";
|
||||
private static final IntervalViewDescriptor INTERVAL_VIEW_DESC =
|
||||
IntervalViewDescriptor.create(
|
||||
INTERVAL_VIEW_NAME,
|
||||
INTERVAL_VIEW_DESCRIPTION,
|
||||
measurementDescriptor,
|
||||
INTERVAL_AGG_DESC,
|
||||
Arrays.asList(TagKey.create(TAG_KEY)));
|
||||
private static final CensusProto.ViewDescriptor INTERVAL_VIEW_DESC_PROTO =
|
||||
CensusProto.ViewDescriptor.newBuilder()
|
||||
.setName(INTERVAL_VIEW_NAME)
|
||||
.setDescription(INTERVAL_VIEW_DESCRIPTION)
|
||||
.setMeasurementDescriptorName(MEASUREMENT_DESC_NAME)
|
||||
.setIntervalAggregation(INTERVAL_AGG_DESC_PROTO)
|
||||
.addTagKeys(TAG_KEY)
|
||||
.build();
|
||||
|
||||
private static final double INTERVAL_COUNT = 6.0;
|
||||
private static final double INTERVAL_SUM = 98.5;
|
||||
private static final Interval INTERVAL = Interval.create(DURATION, INTERVAL_COUNT, INTERVAL_SUM);
|
||||
private static final CensusProto.IntervalAggregation.Interval INTERVAL_PROTO =
|
||||
CensusProto.IntervalAggregation.Interval.newBuilder()
|
||||
.setIntervalSize(DURATION_PROTO)
|
||||
.setCount(INTERVAL_COUNT)
|
||||
.setSum(INTERVAL_SUM)
|
||||
.build();
|
||||
|
||||
private static final IntervalAggregation INTERVAL_AGG =
|
||||
IntervalAggregation.create(Arrays.asList(TAG), Arrays.asList(INTERVAL));
|
||||
private static final CensusProto.IntervalAggregation INTERVAL_AGG_PROTO =
|
||||
CensusProto.IntervalAggregation.newBuilder()
|
||||
.addIntervals(INTERVAL_PROTO)
|
||||
.addTags(TAG_PROTO)
|
||||
.build();
|
||||
|
||||
static final IntervalView INTERVAL_VIEW =
|
||||
IntervalView.create(INTERVAL_VIEW_DESC, Arrays.asList(INTERVAL_AGG));
|
||||
private static final CensusProto.IntervalView INTERVAL_VIEW_PROTO =
|
||||
CensusProto.IntervalView.newBuilder().addAggregations(INTERVAL_AGG_PROTO).build();
|
||||
private static final CensusProto.View VIEW_WITH_INTERVAL_VIEW_PROTO =
|
||||
CensusProto.View.newBuilder()
|
||||
.setViewName(INTERVAL_VIEW_NAME)
|
||||
.setIntervalView(INTERVAL_VIEW_PROTO)
|
||||
.build();
|
||||
private static final StatsResponse INTERVAL_STATS_RESPONSE_PROTO =
|
||||
StatsResponse.newBuilder()
|
||||
.setMeasurementDescriptor(MEASUREMENT_DESC_PROTO)
|
||||
.setViewDescriptor(INTERVAL_VIEW_DESC_PROTO)
|
||||
.setView(VIEW_WITH_INTERVAL_VIEW_PROTO)
|
||||
.build();
|
||||
}
|
Loading…
Reference in New Issue