Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Otel add backend and endpoint static attrs #938

Merged
merged 5 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading