From 29d0096b43ff2da557829073753b3692987085eb Mon Sep 17 00:00:00 2001 From: Wise-Wizard Date: Tue, 16 Jul 2024 22:49:00 +0530 Subject: [PATCH] Removed Comments Signed-off-by: Wise-Wizard --- .../internal/extension/jaegerquery/server.go | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/cmd/jaeger/internal/extension/jaegerquery/server.go b/cmd/jaeger/internal/extension/jaegerquery/server.go index bee57a90f40..8339f3be615 100644 --- a/cmd/jaeger/internal/extension/jaegerquery/server.go +++ b/cmd/jaeger/internal/extension/jaegerquery/server.go @@ -5,7 +5,6 @@ package jaegerquery import ( "context" - "errors" "fmt" "go.opentelemetry.io/collector/component" @@ -25,10 +24,9 @@ var ( ) type server struct { - config *Config - server *queryApp.Server - telset component.TelemetrySettings - closeTracer func(ctx context.Context) error + config *Config + server *queryApp.Server + telset component.TelemetrySettings } func newServer(config *Config, otel component.TelemetrySettings) *server { @@ -72,11 +70,7 @@ func (s *server) Start(_ context.Context, host component.Host) error { // TODO OTel-collector does not initialize the tracer currently // https://github.com/open-telemetry/opentelemetry-collector/issues/7532 //nolint - // tracerProvider, err := jtracer.New("jaeger") - // if err != nil { - // return fmt.Errorf("could not initialize a tracer: %w", err) - // } - // s.closeTracer = tracerProvider.Close + telset := telemetery.Setting{ Logger: s.telset.Logger, TracerProvider: s.telset.TracerProvider, @@ -132,13 +126,6 @@ func (s *server) makeQueryOptions() *queryApp.QueryOptions { } } -func (s *server) Shutdown(ctx context.Context) error { - var errs []error - if s.server != nil { - errs = append(errs, s.server.Close()) - } - if s.closeTracer != nil { - errs = append(errs, s.closeTracer(ctx)) - } - return errors.Join(errs...) +func (s *server) Shutdown(_ context.Context) error { + return s.server.Close() }