mirror of https://github.com/grpc/grpc.git
The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)
https://grpc.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
132 lines
4.6 KiB
132 lines
4.6 KiB
8 years ago
|
// Copyright 2017, Google Inc.
|
||
|
// All rights reserved.
|
||
|
//
|
||
|
// Redistribution and use in source and binary forms, with or without
|
||
|
// modification, are permitted provided that the following conditions are
|
||
|
// met:
|
||
|
//
|
||
|
// * Redistributions of source code must retain the above copyright
|
||
|
// notice, this list of conditions and the following disclaimer.
|
||
|
// * Redistributions in binary form must reproduce the above
|
||
|
// copyright notice, this list of conditions and the following disclaimer
|
||
|
// in the documentation and/or other materials provided with the
|
||
|
// distribution.
|
||
|
// * Neither the name of Google Inc. nor the names of its
|
||
|
// contributors may be used to endorse or promote products derived from
|
||
|
// this software without specific prior written permission.
|
||
|
//
|
||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||
|
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||
|
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||
|
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||
|
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||
|
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||
|
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||
|
|
||
|
// 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 "tools/grpcz/census.proto";
|
||
|
import "tools/grpcz/empty.proto";
|
||
|
import "tools/grpcz/any.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) {
|
||
|
// TODO(aveitch, ericgribkoff): Pease define the stats response message
|
||
|
// StatsRequest would specifically identify the stats to be returned.
|
||
|
}
|
||
|
|
||
|
// 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 {
|
||
|
// Wrapper combining View and ViewDescriptor.
|
||
|
message View {
|
||
|
google.instrumentation.MeasurementDescriptor measurement_descriptor = 1;
|
||
|
google.instrumentation.ViewDescriptor view_descriptor = 2;
|
||
|
google.instrumentation.View view = 3;
|
||
|
}
|
||
|
|
||
|
View rpc_client_errors = 1;
|
||
|
View rpc_client_completed_rpcs = 2;
|
||
|
View rpc_client_started_rpcs = 3;
|
||
|
View rpc_client_elapsed_time = 4;
|
||
|
View rpc_client_server_elapsed_time = 5;
|
||
|
View rpc_client_request_bytes = 6;
|
||
|
View rpc_client_response_bytes = 7;
|
||
|
View rpc_client_request_count = 8;
|
||
|
View rpc_client_response_count = 9;
|
||
|
View rpc_server_errors = 10;
|
||
|
View rpc_server_completed_rpcs = 11;
|
||
|
View rpc_server_server_elapsed_time = 12;
|
||
|
View rpc_server_request_bytes = 13;
|
||
|
View rpc_server_response_bytes = 14;
|
||
|
View rpc_server_request_count = 15;
|
||
|
View rpc_server_response_count = 16;
|
||
|
View rpc_server_elapsed_time = 17;
|
||
|
//TODO(ericgribkoff) Add minute-hour interval stats.
|
||
|
}
|
||
|
|
||
|
message StatsRequest {
|
||
|
// TODO(aveitch): Complete definition of this type
|
||
|
}
|
||
|
|
||
|
message StatsResponse {
|
||
|
// TODO(aveitch): Complete definition of this type
|
||
|
}
|
||
|
|
||
|
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
|
||
|
Any contents = 1;
|
||
|
}
|
||
|
|