Allow to disable NGINX metrics
This commit is contained in:
parent
c4ba23832a
commit
06d33c16b5
9 changed files with 42 additions and 9 deletions
|
|
@ -914,13 +914,15 @@ func proxySetHeader(loc interface{}) string {
|
|||
|
||||
// buildCustomErrorDeps is a utility function returning a struct wrapper with
|
||||
// the data required to build the 'CUSTOM_ERRORS' template
|
||||
func buildCustomErrorDeps(proxySetHeaders map[string]string, errorCodes []int) interface{} {
|
||||
func buildCustomErrorDeps(proxySetHeaders map[string]string, errorCodes []int, enableMetrics bool) interface{} {
|
||||
return struct {
|
||||
ProxySetHeaders map[string]string
|
||||
ErrorCodes []int
|
||||
EnableMetrics bool
|
||||
}{
|
||||
ProxySetHeaders: proxySetHeaders,
|
||||
ErrorCodes: errorCodes,
|
||||
EnableMetrics: enableMetrics,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -826,7 +826,7 @@ func TestEscapeLiteralDollar(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func Test_opentracingPropagateContext(t *testing.T) {
|
||||
func TestOpentracingPropagateContext(t *testing.T) {
|
||||
tests := map[interface{}]string{
|
||||
&ingress.Location{BackendProtocol: "HTTP"}: "opentracing_propagate_context",
|
||||
&ingress.Location{BackendProtocol: "HTTPS"}: "opentracing_propagate_context",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue