Skip to content

Commit

Permalink
Merge pull request #938 from krakend/otel_add_backend_and_endpoint_st…
Browse files Browse the repository at this point in the history
…atic_attrs

Otel add backend and endpoint static attrs
  • Loading branch information
kpacha authored Oct 30, 2024
2 parents 919f660 + 062cebe commit 98eaf8e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
4 changes: 4 additions & 0 deletions executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 0 additions & 2 deletions proxy_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
}

Expand Down

0 comments on commit 98eaf8e

Please sign in to comment.