From 8729b39daebf2056602e2a9016b6cf714266ff21 Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Wed, 17 Jan 2024 14:20:11 -0800 Subject: [PATCH] Remove unnecessary validation when constructing new Service --- service/service.go | 9 --------- 1 file changed, 9 deletions(-) diff --git a/service/service.go b/service/service.go index 75710f6ee5d..be008598e3b 100644 --- a/service/service.go +++ b/service/service.go @@ -121,11 +121,6 @@ func New(ctx context.Context, set Settings, cfg Config) (*Service, error) { srv.telemetrySettings.MeterProvider = srv.telemetryInitializer.mp srv.telemetrySettings.TracerProvider = srv.telemetryInitializer.tp - // validate the configuration - if err := validate(ctx, set, cfg, srv.telemetrySettings); err != nil { - return nil, err - } - // process the configuration and initialize the pipeline if err = srv.initExtensionsAndPipeline(ctx, set, cfg); err != nil { // If pipeline initialization fails then shut down the telemetry server @@ -151,10 +146,6 @@ func Validate(ctx context.Context, set Settings, cfg Config) error { MeterProvider: noop.NewMeterProvider(), } - return validate(ctx, set, cfg, telSettings) -} - -func validate(ctx context.Context, set Settings, cfg Config, telSettings servicetelemetry.TelemetrySettings) error { pSet := graph.Settings{ Telemetry: telSettings, BuildInfo: set.BuildInfo,