diff --git a/executor.go b/executor.go index bafc3417..1ce2852b 100644 --- a/executor.go +++ b/executor.go @@ -200,6 +200,10 @@ func (e *ExecutorBuilder) NewCmdExecutor(ctx context.Context) cmd.Executor { bpf := e.BackendFactory.NewBackendFactory(ctx, logger, metricCollector) pf := e.ProxyFactory.NewProxyFactory(logger, bpf, metricCollector) + // we move the proxy factory out of the default proxy factory to make + // sure that is always the outer middleware and that wraps any internal + // proxy layer middleware: + pf = otellura.ProxyFactory(pf) agentPing := make(chan string, len(cfg.AsyncAgents)) diff --git a/go.mod b/go.mod index 8830c173..7b2211f8 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.22 require ( github.com/gin-gonic/gin v1.9.1 github.com/go-contrib/uuid v1.2.0 - github.com/krakend/krakend-otel v0.6.1 + github.com/krakend/krakend-otel v0.6.2 github.com/krakendio/bloomfilter/v2 v2.0.4 github.com/krakendio/krakend-amqp/v2 v2.1.0 github.com/krakendio/krakend-audit v0.0.7 diff --git a/go.sum b/go.sum index f64d6b33..9f466969 100644 --- a/go.sum +++ b/go.sum @@ -473,8 +473,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/krakend/go-auth0/v2 v2.0.1 h1:Ve73eo/rUo1NK/GrzOeWSuVdweGHY2sGU52NYdp73iU= github.com/krakend/go-auth0/v2 v2.0.1/go.mod h1:jaMs1/YcOmZYRUPBvk/nrhABJv/XkrUJGA2eywOUFRA= -github.com/krakend/krakend-otel v0.6.1 h1:0+F/2aq/BATDUiMTSPGAJ6CwRX/xnn0OLu1V1WQfRF4= -github.com/krakend/krakend-otel v0.6.1/go.mod h1:8Q6FfeY1S6RHMO/5/s0B+JJ1AEGDTJZHYtpmF1a+USA= +github.com/krakend/krakend-otel v0.6.2 h1:jvSxVMo7ckPgNUQUNjOVT/+GKnw7I6QXwwWLvzFcbLQ= +github.com/krakend/krakend-otel v0.6.2/go.mod h1:8Q6FfeY1S6RHMO/5/s0B+JJ1AEGDTJZHYtpmF1a+USA= github.com/krakendio/binder v0.0.0-20230413105421-1bbe94e65f45 h1:5UbGH+Sa62LMtbBn6m3EEcaA4JFxaDd91X/X0SsZuO8= github.com/krakendio/binder v0.0.0-20230413105421-1bbe94e65f45/go.mod h1:VgJK/LM9NwyIxzYETGXQeRxdDg0IgBw4Fol58JVx2+4= github.com/krakendio/bloomfilter/v2 v2.0.4 h1:+FCe52Izx4mZgFevvifOMF+3WbbhmZT0xZnrnUE4C0U= diff --git a/proxy_factory.go b/proxy_factory.go index 979cf90c..2ea6b71e 100644 --- a/proxy_factory.go +++ b/proxy_factory.go @@ -3,7 +3,6 @@ package krakend import ( "fmt" - otellura "github.com/krakend/krakend-otel/lura" cel "github.com/krakendio/krakend-cel/v2" jsonschema "github.com/krakendio/krakend-jsonschema/v2" lua "github.com/krakendio/krakend-lua/v2/proxy" @@ -24,7 +23,6 @@ func internalNewProxyFactory(logger logging.Logger, backendFactory proxy.Backend proxyFactory = lua.ProxyFactory(logger, proxyFactory) proxyFactory = metricCollector.ProxyFactory("pipe", proxyFactory) proxyFactory = opencensus.ProxyFactory(proxyFactory) - proxyFactory = otellura.ProxyFactory(proxyFactory) return proxyFactory }