Skip to content

Commit

Permalink
Merge pull request #7255 from ckcd/ck2311_fix_grpc_metrics
Browse files Browse the repository at this point in the history
Fix missing label on server_server_latency metric
  • Loading branch information
daixiang0 committed Dec 5, 2023
2 parents 5050df5 + 168433e commit 743d120
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/diagnostics/grpc_monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ func (g *grpcMetrics) Init(appID string) error {
return view.Register(
diagUtils.NewMeasureView(g.serverReceivedBytes, []tag.Key{appIDKey, KeyServerMethod}, defaultSizeDistribution),
diagUtils.NewMeasureView(g.serverSentBytes, []tag.Key{appIDKey, KeyServerMethod}, defaultSizeDistribution),
diagUtils.NewMeasureView(g.serverLatency, []tag.Key{appIDKey, KeyServerMethod}, defaultLatencyDistribution),
diagUtils.NewMeasureView(g.serverLatency, []tag.Key{appIDKey, KeyServerMethod, KeyServerStatus}, defaultLatencyDistribution),
diagUtils.NewMeasureView(g.serverCompletedRpcs, []tag.Key{appIDKey, KeyServerMethod, KeyServerStatus}, view.Count()),
diagUtils.NewMeasureView(g.clientSentBytes, []tag.Key{appIDKey, KeyClientMethod}, defaultSizeDistribution),
diagUtils.NewMeasureView(g.clientReceivedBytes, []tag.Key{appIDKey, KeyClientMethod}, defaultSizeDistribution),
Expand Down
1 change: 1 addition & 0 deletions pkg/diagnostics/grpc_monitoring_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ func TestStreamingServerInterceptor(t *testing.T) {
require.Len(t, rows, 1)
assert.Equal(t, "app_id", rows[0].Tags[0].Key.Name())
assert.Equal(t, "grpc_server_method", rows[0].Tags[1].Key.Name())
assert.Equal(t, "grpc_server_status", rows[0].Tags[2].Key.Name())
})
}

Expand Down

0 comments on commit 743d120

Please sign in to comment.