mirror of
https://github.com/pomerium/pomerium.git
synced 2025-05-10 23:57:34 +02:00
GRPC metrics improvements
- change to ocgrpc plugin - rename labels to be more consistent - refactor view registration patterns - add server metrics- add client request size metrics
This commit is contained in:
parent
d0f1314286
commit
4bd4b27f28
11 changed files with 273 additions and 152 deletions
|
@ -70,9 +70,9 @@ func Test_HTTPMetricsHandler(t *testing.T) {
|
|||
rec := httptest.NewRecorder()
|
||||
chainHandler.ServeHTTP(rec, req)
|
||||
|
||||
testDataRetrieval(httpServerResponseSize, t, tt.wanthttpServerResponseSize)
|
||||
testDataRetrieval(httpServerRequestDuration, t, tt.wanthttpServerRequestDuration)
|
||||
testDataRetrieval(httpServerRequestCount, t, tt.wanthttpServerRequestCount)
|
||||
testDataRetrieval(HTTPServerRequestSizeView, t, tt.wanthttpServerResponseSize)
|
||||
testDataRetrieval(HTTPServerRequestDurationView, t, tt.wanthttpServerRequestDuration)
|
||||
testDataRetrieval(HTTPServerRequestCountView, t, tt.wanthttpServerRequestCount)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -144,9 +144,9 @@ func Test_HTTPMetricsRoundTripper(t *testing.T) {
|
|||
resp, err := client.Do(req)
|
||||
|
||||
t.Logf("response: %#v, %#v", resp, err)
|
||||
testDataRetrieval(httpClientResponseSize, t, tt.wanthttpClientResponseSize)
|
||||
testDataRetrieval(httpClientRequestDuration, t, tt.wanthttpClientRequestDuration)
|
||||
testDataRetrieval(httpClientRequestCount, t, tt.wanthttpClientRequestCount)
|
||||
testDataRetrieval(HTTPClientResponseSizeView, t, tt.wanthttpClientResponseSize)
|
||||
testDataRetrieval(HTTPClientRequestDurationView, t, tt.wanthttpClientRequestDuration)
|
||||
testDataRetrieval(HTTPClientRequestCountView, t, tt.wanthttpClientRequestCount)
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue