From a100783603d780c61ebc4a921ea2e35f1304aff4 Mon Sep 17 00:00:00 2001 From: Geoffrey Ragot Date: Fri, 15 Jul 2022 12:45:16 +0200 Subject: [PATCH] fix: OpenTelemetry support on storage. --- examples/jaeger-exporter/docker-compose.yml | 32 +++++++++++++++++++++ pkg/ledger/resolver.go | 8 ------ 2 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 examples/jaeger-exporter/docker-compose.yml diff --git a/examples/jaeger-exporter/docker-compose.yml b/examples/jaeger-exporter/docker-compose.yml new file mode 100644 index 000000000..56ee939bd --- /dev/null +++ b/examples/jaeger-exporter/docker-compose.yml @@ -0,0 +1,32 @@ +--- +volumes: + postgres: +services: + postgres: + extends: + file: ../../docker-compose.yml + service: postgres + jaeger: + image: jaegertracing/opentelemetry-all-in-one + ports: + - "16686:16686/tcp" + ledger: + extends: + file: ../../docker-compose.yml + service: ledger + depends_on: + - postgres + - jaeger + image: golang:1.18-alpine + entrypoint: go run main.go server start + volumes: + - ../..:/src + working_dir: /src + ports: + - "3068:3068/tcp" + environment: + CGO_ENABLED: 0 + NUMARY_DEBUG: "true" + NUMARY_OTEL_TRACES: "true" + NUMARY_OTEL_TRACES_EXPORTER: jaeger + NUMARY_OTEL_TRACES_EXPORTER_JAEGER_ENDPOINT: http://jaeger:14268/api/traces diff --git a/pkg/ledger/resolver.go b/pkg/ledger/resolver.go index b682de9d4..8609687ba 100644 --- a/pkg/ledger/resolver.go +++ b/pkg/ledger/resolver.go @@ -18,13 +18,6 @@ func (fn ResolveOptionFn) apply(r *Resolver) error { return fn(r) } -func WithStorageDriver(factory storage.Driver) ResolveOptionFn { - return func(r *Resolver) error { - r.storageDriver = factory - return nil - } -} - func WithLocker(locker Locker) ResolveOptionFn { return func(r *Resolver) error { r.locker = locker @@ -108,7 +101,6 @@ func ResolveModule() fx.Option { fx.Provide( fx.Annotate(NewResolver, fx.ParamTags("", ResolverOptionsKey)), ), - ProvideResolverOption(WithStorageDriver), ) }