Skip to content

Commit

Permalink
Add message prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
zasweq committed Mar 16, 2023
1 parent 6f44ae8 commit 82ab7bf
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 32 deletions.
8 changes: 4 additions & 4 deletions gcp/observability/opencensus.go
Expand Up @@ -39,13 +39,13 @@ var (
opencensus.ClientStartedRPCsView,
opencensus.ClientCompletedRPCsView,
opencensus.ClientRoundtripLatencyView,
opencensus.ClientSentCompressedBytesPerRPCView,
opencensus.ClientReceivedCompressedBytesPerRPCView,
opencensus.ClientSentCompressedMessageBytesPerRPCView,
opencensus.ClientReceivedCompressedMessageBytesPerRPCView,
opencensus.ClientAPILatencyView,
opencensus.ServerStartedRPCsView,
opencensus.ServerCompletedRPCsView,
opencensus.ServerSentCompressedBytesPerRPCView,
opencensus.ServerReceivedCompressedBytesPerRPCView,
opencensus.ServerSentCompressedMessageBytesPerRPCView,
opencensus.ServerReceivedCompressedMessageBytesPerRPCView,
opencensus.ServerLatencyView,
}
)
Expand Down
20 changes: 10 additions & 10 deletions stats/opencensus/client_metrics.go
Expand Up @@ -72,12 +72,12 @@ var (
TagKeys: []tag.Key{keyClientMethod},
Aggregation: bytesDistribution,
}
// ClientSentCompressedBytesPerRPCView is the distribution of compressed
// sent bytes per RPC, keyed on method.
ClientSentCompressedBytesPerRPCView = &view.View{
// ClientSentCompressedMessageBytesPerRPCView is the distribution of
// compressed sent message bytes per RPC, keyed on method.
ClientSentCompressedMessageBytesPerRPCView = &view.View{
Measure: clientSentCompressedBytesPerRPC,
Name: "grpc.io/client/sent_compressed_bytes_per_rpc",
Description: "Distribution of sent compressed bytes per RPC, by method.",
Name: "grpc.io/client/sent_compressed_message_bytes_per_rpc",
Description: "Distribution of sent compressed message bytes per RPC, by method.",
TagKeys: []tag.Key{keyClientMethod},
Aggregation: bytesDistribution,
}
Expand All @@ -90,12 +90,12 @@ var (
TagKeys: []tag.Key{keyClientMethod},
Aggregation: bytesDistribution,
}
// ClientReceivedCompressedBytesPerRPCView is the distribution of compressed
// received bytes per RPC, keyed on method.
ClientReceivedCompressedBytesPerRPCView = &view.View{
// ClientReceivedCompressedMessageBytesPerRPCView is the distribution of
// compressed received message bytes per RPC, keyed on method.
ClientReceivedCompressedMessageBytesPerRPCView = &view.View{
Measure: clientReceivedCompressedBytesPerRPC,
Name: "grpc.io/client/received_compressed_bytes_per_rpc",
Description: "Distribution of received compressed bytes per RPC, by method.",
Name: "grpc.io/client/received_compressed_message_bytes_per_rpc",
Description: "Distribution of received compressed message bytes per RPC, by method.",
TagKeys: []tag.Key{keyClientMethod},
Aggregation: bytesDistribution,
}
Expand Down
16 changes: 8 additions & 8 deletions stats/opencensus/e2e_test.go
Expand Up @@ -236,13 +236,13 @@ func (s) TestAllMetricsOneFunction(t *testing.T) {
ClientCompletedRPCsView,
ServerCompletedRPCsView,
ClientSentBytesPerRPCView,
ClientSentCompressedBytesPerRPCView,
ClientSentCompressedMessageBytesPerRPCView,
ServerSentBytesPerRPCView,
ServerSentCompressedBytesPerRPCView,
ServerSentCompressedMessageBytesPerRPCView,
ClientReceivedBytesPerRPCView,
ClientReceivedCompressedBytesPerRPCView,
ClientReceivedCompressedMessageBytesPerRPCView,
ServerReceivedBytesPerRPCView,
ServerReceivedCompressedBytesPerRPCView,
ServerReceivedCompressedMessageBytesPerRPCView,
ClientSentMessagesPerRPCView,
ServerSentMessagesPerRPCView,
ClientReceivedMessagesPerRPCView,
Expand Down Expand Up @@ -505,7 +505,7 @@ func (s) TestAllMetricsOneFunction(t *testing.T) {
},
},
{
metric: ClientSentCompressedBytesPerRPCView,
metric: ClientSentCompressedMessageBytesPerRPCView,
wantVI: &viewInformation{
aggType: view.AggTypeDistribution,
aggBuckets: bytesDistributionBounds,
Expand Down Expand Up @@ -579,7 +579,7 @@ func (s) TestAllMetricsOneFunction(t *testing.T) {
},
},
{
metric: ServerSentCompressedBytesPerRPCView,
metric: ServerSentCompressedMessageBytesPerRPCView,
wantVI: &viewInformation{
aggType: view.AggTypeDistribution,
aggBuckets: bytesDistributionBounds,
Expand Down Expand Up @@ -653,7 +653,7 @@ func (s) TestAllMetricsOneFunction(t *testing.T) {
},
},
{
metric: ClientReceivedCompressedBytesPerRPCView,
metric: ClientReceivedCompressedMessageBytesPerRPCView,
wantVI: &viewInformation{
aggType: view.AggTypeDistribution,
aggBuckets: bytesDistributionBounds,
Expand Down Expand Up @@ -727,7 +727,7 @@ func (s) TestAllMetricsOneFunction(t *testing.T) {
},
},
{
metric: ServerReceivedCompressedBytesPerRPCView,
metric: ServerReceivedCompressedMessageBytesPerRPCView,
wantVI: &viewInformation{
aggType: view.AggTypeDistribution,
aggBuckets: bytesDistributionBounds,
Expand Down
20 changes: 10 additions & 10 deletions stats/opencensus/server_metrics.go
Expand Up @@ -69,11 +69,11 @@ var (
TagKeys: []tag.Key{keyServerMethod},
Aggregation: bytesDistribution,
}
// ServerSentCompressedBytesPerRPCView is the distribution of received
// compressed bytes per RPC, keyed on method.
ServerSentCompressedBytesPerRPCView = &view.View{
Name: "grpc.io/server/sent_compressed_bytes_per_rpc",
Description: "Distribution of sent compressed bytes per RPC, by method.",
// ServerSentCompressedMessageBytesPerRPCView is the distribution of
// received compressed message bytes per RPC, keyed on method.
ServerSentCompressedMessageBytesPerRPCView = &view.View{
Name: "grpc.io/server/sent_compressed_message_bytes_per_rpc",
Description: "Distribution of sent compressed message bytes per RPC, by method.",
Measure: serverSentCompressedBytesPerRPC,
TagKeys: []tag.Key{keyServerMethod},
Aggregation: bytesDistribution,
Expand All @@ -87,11 +87,11 @@ var (
TagKeys: []tag.Key{keyServerMethod},
Aggregation: bytesDistribution,
}
// ServerReceivedCompressedBytesPerRPCView is the distribution of sent bytes
// per RPC, keyed on method.
ServerReceivedCompressedBytesPerRPCView = &view.View{
Name: "grpc.io/server/received_compressed_bytes_per_rpc",
Description: "Distribution of received compressed bytes per RPC, by method.",
// ServerReceivedCompressedMessageBytesPerRPCView is the distribution of
// sent compressed message bytes per RPC, keyed on method.
ServerReceivedCompressedMessageBytesPerRPCView = &view.View{
Name: "grpc.io/server/received_compressed_message_bytes_per_rpc",
Description: "Distribution of received compressed message bytes per RPC, by method.",
Measure: serverReceivedCompressedBytesPerRPC,
TagKeys: []tag.Key{keyServerMethod},
Aggregation: bytesDistribution,
Expand Down

0 comments on commit 82ab7bf

Please sign in to comment.