Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Grpc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tci-gateway-module
Grpc
Commits
2c19723e
Commit
2c19723e
authored
8 years ago
by
Makarand Dharmapurikar
Browse files
Options
Downloads
Patches
Plain Diff
updated monitoring.proto
Also changed the name of stats attr to 'data-stats' to be more html5 compliant.
parent
25e78e32
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
tools/grpcz/grpcz_client.cc
+2
-2
2 additions, 2 deletions
tools/grpcz/grpcz_client.cc
tools/grpcz/monitoring.proto
+55
-30
55 additions, 30 deletions
tools/grpcz/monitoring.proto
with
57 additions
and
32 deletions
tools/grpcz/grpcz_client.cc
+
2
−
2
View file @
2c19723e
...
@@ -65,14 +65,14 @@ static const std::string static_html_header =
...
@@ -65,14 +65,14 @@ static const std::string static_html_header =
table { border-collapse: collapse; width: 100%; } \
table { border-collapse: collapse; width: 100%; } \
table, td, th { border: 1px solid black; } \
table, td, th { border: 1px solid black; } \
</style> </head> <body>\
</style> </head> <body>\
<div id='stats' stats='"
;
<div id='stats'
data-
stats='"
;
static
const
std
::
string
static_html_footer
=
static
const
std
::
string
static_html_footer
=
"' class='hidden'></div>\
"' class='hidden'></div>\
<h1>GRPCZ Statistics</h1> <div id='table'> </div> \
<h1>GRPCZ Statistics</h1> <div id='table'> </div> \
<script> \
<script> \
var canonical_stats = JSON.parse(\
var canonical_stats = JSON.parse(\
document.getElementById('stats').getAttribute('stats')); \
document.getElementById('stats').getAttribute('
data-
stats')); \
var table = document.createElement('table'); \
var table = document.createElement('table'); \
if (canonical_stats['Error Message'] != undefined) { \
if (canonical_stats['Error Message'] != undefined) { \
document.getElementById('table').innerHTML = canonical_stats['Error Message']; } \
document.getElementById('table').innerHTML = canonical_stats['Error Message']; } \
...
...
This diff is collapsed.
Click to expand it.
tools/grpcz/monitoring.proto
+
55
−
30
View file @
2c19723e
...
@@ -34,8 +34,8 @@ syntax = "proto3";
...
@@ -34,8 +34,8 @@ syntax = "proto3";
// TODO(ericgribkoff) Figure out how to manage the external Census proto
// TODO(ericgribkoff) Figure out how to manage the external Census proto
// dependency.
// dependency.
import
"tools/grpcz/census.proto"
;
import
"tools/grpcz/census.proto"
;
import
"google/protobuf/empty.proto"
;
import
"google/protobuf/any.proto"
;
import
"google/protobuf/any.proto"
;
import
"google/protobuf/empty.proto"
;
package
grpc
.
instrumentation.v1alpha
;
package
grpc
.
instrumentation.v1alpha
;
...
@@ -50,8 +50,6 @@ service Monitoring {
...
@@ -50,8 +50,6 @@ service Monitoring {
// Query the server for specific stats
// Query the server for specific stats
rpc
GetStats
(
StatsRequest
)
returns
(
StatsResponse
)
{
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
// Request the server to stream back snapshots of the requested stats
...
@@ -76,39 +74,67 @@ service Monitoring {
...
@@ -76,39 +74,67 @@ service Monitoring {
// Canonical RPC stats exported by gRPC.
// Canonical RPC stats exported by gRPC.
message
CanonicalRpcStats
{
message
CanonicalRpcStats
{
// Wrapper combining View and ViewDescriptor.
StatsResponse
rpc_client_errors
=
1
;
message
View
{
StatsResponse
rpc_client_completed_rpcs
=
2
;
google.instrumentation.MeasurementDescriptor
measurement_descriptor
=
1
;
StatsResponse
rpc_client_started_rpcs
=
3
;
google.instrumentation.ViewDescriptor
view_descriptor
=
2
;
StatsResponse
rpc_client_elapsed_time
=
4
;
google.instrumentation.View
view
=
3
;
StatsResponse
rpc_client_server_elapsed_time
=
5
;
}
StatsResponse
rpc_client_request_bytes
=
6
;
StatsResponse
rpc_client_response_bytes
=
7
;
View
rpc_client_errors
=
1
;
StatsResponse
rpc_client_request_count
=
8
;
View
rpc_client_completed_rpcs
=
2
;
StatsResponse
rpc_client_response_count
=
9
;
View
rpc_client_started_rpcs
=
3
;
StatsResponse
rpc_server_errors
=
10
;
View
rpc_client_elapsed_time
=
4
;
StatsResponse
rpc_server_completed_rpcs
=
11
;
View
rpc_client_server_elapsed_time
=
5
;
StatsResponse
rpc_server_server_elapsed_time
=
12
;
View
rpc_client_request_bytes
=
6
;
StatsResponse
rpc_server_request_bytes
=
13
;
View
rpc_client_response_bytes
=
7
;
StatsResponse
rpc_server_response_bytes
=
14
;
View
rpc_client_request_count
=
8
;
StatsResponse
rpc_server_request_count
=
15
;
View
rpc_client_response_count
=
9
;
StatsResponse
rpc_server_response_count
=
16
;
View
rpc_server_errors
=
10
;
StatsResponse
rpc_server_elapsed_time
=
17
;
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.
//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
{
message
StatsRequest
{
// TODO(aveitch): Complete definition of this type
// 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
{
message
StatsResponse
{
// TODO(aveitch): Complete definition of this type
// 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
{
message
TraceRequest
{
...
@@ -128,4 +154,3 @@ message CustomMonitoringData {
...
@@ -128,4 +154,3 @@ message CustomMonitoringData {
// can be any application specific monitoring data
// can be any application specific monitoring data
google.protobuf.Any
contents
=
1
;
google.protobuf.Any
contents
=
1
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment