diff --git a/cmd/openonu-adapter/common.go b/cmd/openonu-adapter/common.go
index 7507288..9c871ef 100644
--- a/cmd/openonu-adapter/common.go
+++ b/cmd/openonu-adapter/common.go
@@ -18,15 +18,15 @@
 package main
 
 import (
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
 )
 
-var logger log.Logger
+var logger log.CLogger
 
 func init() {
 	// Setup this package so that it's log level can be modified at run time
 	var err error
-	logger, err = log.AddPackage(log.JSON, log.ErrorLevel, log.Fields{"pkg": "main"})
+	logger, err = log.RegisterPackage(log.JSON, log.ErrorLevel, log.Fields{"pkg": "main"})
 	// previously log.DebugLevel was set !?
 	if err != nil {
 		panic(err)
diff --git a/cmd/openonu-adapter/main.go b/cmd/openonu-adapter/main.go
index df7c327..e82c155 100644
--- a/cmd/openonu-adapter/main.go
+++ b/cmd/openonu-adapter/main.go
@@ -28,17 +28,17 @@
 	"syscall"
 	"time"
 
-	"github.com/opencord/voltha-lib-go/v3/pkg/adapters"
-	"github.com/opencord/voltha-lib-go/v3/pkg/adapters/adapterif"
-	com "github.com/opencord/voltha-lib-go/v3/pkg/adapters/common"
-	conf "github.com/opencord/voltha-lib-go/v3/pkg/config"
-	"github.com/opencord/voltha-lib-go/v3/pkg/db/kvstore"
-	"github.com/opencord/voltha-lib-go/v3/pkg/kafka"
-	"github.com/opencord/voltha-lib-go/v3/pkg/log"
-	"github.com/opencord/voltha-lib-go/v3/pkg/probe"
-	"github.com/opencord/voltha-lib-go/v3/pkg/version"
-	ic "github.com/opencord/voltha-protos/v3/go/inter_container"
-	"github.com/opencord/voltha-protos/v3/go/voltha"
+	"github.com/opencord/voltha-lib-go/v4/pkg/adapters"
+	"github.com/opencord/voltha-lib-go/v4/pkg/adapters/adapterif"
+	com "github.com/opencord/voltha-lib-go/v4/pkg/adapters/common"
+	conf "github.com/opencord/voltha-lib-go/v4/pkg/config"
+	"github.com/opencord/voltha-lib-go/v4/pkg/db/kvstore"
+	"github.com/opencord/voltha-lib-go/v4/pkg/kafka"
+	"github.com/opencord/voltha-lib-go/v4/pkg/log"
+	"github.com/opencord/voltha-lib-go/v4/pkg/probe"
+	"github.com/opencord/voltha-lib-go/v4/pkg/version"
+	ic "github.com/opencord/voltha-protos/v4/go/inter_container"
+	"github.com/opencord/voltha-protos/v4/go/voltha"
 
 	"github.com/opencord/voltha-openonu-adapter-go/internal/pkg/config"
 	ac "github.com/opencord/voltha-openonu-adapter-go/internal/pkg/onuadaptercore"
@@ -71,7 +71,7 @@
 }
 
 func (a *adapter) start(ctx context.Context) error {
-	logger.Info("Starting Core Adapter components")
+	logger.Info(ctx, "Starting Core Adapter components")
 	var err error
 
 	var p *probe.Probe
@@ -79,6 +79,7 @@
 		if _, ok := value.(*probe.Probe); ok {
 			p = value.(*probe.Probe)
 			p.RegisterService(
+				ctx,
 				"message-bus",
 				"kv-store",
 				"container-proxy",
@@ -89,42 +90,42 @@
 	}
 
 	// Setup KV Client
-	logger.Debugw("create-kv-client", log.Fields{"kvstore": a.config.KVStoreType})
-	if err = a.setKVClient(); err != nil {
-		logger.Fatalw("error-setting-kv-client", log.Fields{"error": err})
+	logger.Debugw(ctx, "create-kv-client", log.Fields{"kvstore": a.config.KVStoreType})
+	if err = a.setKVClient(ctx); err != nil {
+		logger.Fatalw(ctx, "error-setting-kv-client", log.Fields{"error": err})
 	}
 
 	if p != nil {
-		p.UpdateStatus("kv-store", probe.ServiceStatusRunning)
+		p.UpdateStatus(ctx, "kv-store", probe.ServiceStatusRunning)
 	}
 
 	// Setup Log Config
 	/* address config update acc. to [VOL-2736] */
 	addr := a.config.KVStoreHost + ":" + strconv.Itoa(a.config.KVStorePort)
-	cm := conf.NewConfigManager(a.kvClient, a.config.KVStoreType, addr, a.config.KVStoreTimeout)
+	cm := conf.NewConfigManager(ctx, a.kvClient, a.config.KVStoreType, addr, a.config.KVStoreTimeout)
 	go conf.StartLogLevelConfigProcessing(cm, ctx)
 
 	// Setup Kafka Client
-	if a.kafkaClient, err = newKafkaClient("sarama", a.config.KafkaAdapterHost, a.config.KafkaAdapterPort); err != nil {
-		logger.Fatalw("Unsupported-common-client", log.Fields{"error": err})
+	if a.kafkaClient, err = newKafkaClient(ctx, "sarama", a.config.KafkaAdapterHost, a.config.KafkaAdapterPort); err != nil {
+		logger.Fatalw(ctx, "Unsupported-common-client", log.Fields{"error": err})
 	}
 
 	if p != nil {
-		p.UpdateStatus("message-bus", probe.ServiceStatusRunning)
+		p.UpdateStatus(ctx, "message-bus", probe.ServiceStatusRunning)
 	}
 
 	// Start the common InterContainer Proxy - retries as per program arguments or indefinitely per default
 	if a.kip, err = a.startInterContainerProxy(ctx, a.config.KafkaReconnectRetries); err != nil {
-		logger.Fatalw("error-starting-inter-container-proxy", log.Fields{"error": err})
+		logger.Fatalw(ctx, "error-starting-inter-container-proxy", log.Fields{"error": err})
 		//aborting the complete processing here (does notmake sense after set Retry number [else use -1 for infinite])
 		return err
 	}
 
 	// Create the core proxy to handle requests to the Core
-	a.coreProxy = com.NewCoreProxy(a.kip, a.config.Topic, a.config.CoreTopic)
+	a.coreProxy = com.NewCoreProxy(ctx, a.kip, a.config.Topic, a.config.CoreTopic)
 
-	logger.Debugw("create adapter proxy", log.Fields{"OltTopic": a.config.OltTopic, "CoreTopic": a.config.CoreTopic})
-	a.adapterProxy = com.NewAdapterProxy(a.kip, a.config.OltTopic, a.config.CoreTopic, cm.Backend)
+	logger.Debugw(ctx, "create adapter proxy", log.Fields{"OltTopic": a.config.OltTopic, "CoreTopic": a.config.CoreTopic})
+	a.adapterProxy = com.NewAdapterProxy(ctx, a.kip, a.config.CoreTopic, cm.Backend)
 
 	// Create the event proxy to post events to KAFKA
 	a.eventProxy = com.NewEventProxy(com.MsgClient(a.kafkaClient), com.MsgTopic(kafka.Topic{Name: a.config.EventTopic}))
@@ -132,17 +133,17 @@
 	// Create the open ONU interface adapter
 	if a.iAdapter, err = a.startVolthaInterfaceAdapter(ctx, a.kip, a.coreProxy, a.adapterProxy, a.eventProxy,
 		a.config, cm); err != nil {
-		logger.Fatalw("error-starting-volthaInterfaceAdapter for OpenOnt", log.Fields{"error": err})
+		logger.Fatalw(ctx, "error-starting-volthaInterfaceAdapter for OpenOnt", log.Fields{"error": err})
 	}
 
 	// Register the core request handler
 	if err = a.setupRequestHandler(ctx, a.instanceID, a.iAdapter); err != nil {
-		logger.Fatalw("error-setting-core-request-handler", log.Fields{"error": err})
+		logger.Fatalw(ctx, "error-setting-core-request-handler", log.Fields{"error": err})
 	}
 
 	// Register this adapter to the Core - retries indefinitely
 	if err = a.registerWithCore(ctx, -1); err != nil {
-		logger.Fatalw("error-registering-with-core", log.Fields{"error": err})
+		logger.Fatalw(ctx, "error-registering-with-core", log.Fields{"error": err})
 	}
 
 	// check the readiness and liveliness and update the probe status
@@ -161,34 +162,34 @@
 	if a.kvClient != nil {
 		// Release all reservations
 		if err := a.kvClient.ReleaseAllReservations(ctx); err != nil {
-			logger.Infow("fail-to-release-all-reservations", log.Fields{"error": err})
+			logger.Infow(ctx, "fail-to-release-all-reservations", log.Fields{"error": err})
 		}
 		// Close the DB connection
-		a.kvClient.Close()
+		a.kvClient.Close(ctx)
 	}
 
 	if a.kip != nil {
-		a.kip.Stop()
+		a.kip.Stop(ctx)
 	}
 }
 
 // #############################################
 // Adapter Utility methods ##### begin #########
 
-func newKVClient(storeType, address string, timeout time.Duration) (kvstore.Client, error) {
-	logger.Infow("kv-store-type", log.Fields{"store": storeType})
+func newKVClient(ctx context.Context, storeType, address string, timeout time.Duration) (kvstore.Client, error) {
+	logger.Infow(ctx, "kv-store-type", log.Fields{"store": storeType})
 	switch storeType {
 	case "consul":
-		return kvstore.NewConsulClient(address, timeout)
+		return kvstore.NewConsulClient(ctx, address, timeout)
 	case "etcd":
-		return kvstore.NewEtcdClient(address, timeout, log.FatalLevel)
+		return kvstore.NewEtcdClient(ctx, address, timeout, log.FatalLevel)
 	}
 	return nil, errors.New("unsupported-kv-store")
 }
 
-func newKafkaClient(clientType, host string, port int) (kafka.Client, error) {
+func newKafkaClient(ctx context.Context, clientType, host string, port int) (kafka.Client, error) {
 
-	logger.Infow("common-client-type", log.Fields{"client": clientType})
+	logger.Infow(ctx, "common-client-type", log.Fields{"client": clientType})
 	/* address config update acc. to [VOL-2736] */
 	addr := host + ":" + strconv.Itoa(port)
 
@@ -206,12 +207,12 @@
 	return nil, errors.New("unsupported-client-type")
 }
 
-func (a *adapter) setKVClient() error {
+func (a *adapter) setKVClient(ctx context.Context) error {
 	addr := a.config.KVStoreHost + ":" + strconv.Itoa(a.config.KVStorePort)
-	client, err := newKVClient(a.config.KVStoreType, addr, a.config.KVStoreTimeout)
+	client, err := newKVClient(ctx, a.config.KVStoreType, addr, a.config.KVStoreTimeout)
 	if err != nil {
 		a.kvClient = nil
-		logger.Errorw("error-starting-KVClient", log.Fields{"error": err})
+		logger.Errorw(ctx, "error-starting-KVClient", log.Fields{"error": err})
 		return err
 	}
 	a.kvClient = client
@@ -219,7 +220,7 @@
 }
 
 func (a *adapter) startInterContainerProxy(ctx context.Context, retries int) (kafka.InterContainerProxy, error) {
-	logger.Infow("starting-intercontainer-messaging-proxy", log.Fields{"host": a.config.KafkaAdapterHost,
+	logger.Infow(ctx, "starting-intercontainer-messaging-proxy", log.Fields{"host": a.config.KafkaAdapterHost,
 		"port": a.config.KafkaAdapterPort, "topic": a.config.Topic})
 	var err error
 	/* address config update acc. to [VOL-2736] */
@@ -230,8 +231,8 @@
 		kafka.DefaultTopic(&kafka.Topic{Name: a.config.Topic}))
 	count := 0
 	for {
-		if err = kip.Start(); err != nil {
-			logger.Warnw("error-starting-messaging-proxy", log.Fields{"error": err, "retry": retries, "count": count})
+		if err = kip.Start(ctx); err != nil {
+			logger.Warnw(ctx, "error-starting-messaging-proxy", log.Fields{"error": err, "retry": retries, "count": count})
 			if retries == count {
 				return nil, err
 			}
@@ -243,7 +244,7 @@
 		}
 	}
 	probe.UpdateStatusFromContext(ctx, "container-proxy", probe.ServiceStatusRunning)
-	logger.Info("common-messaging-proxy-created")
+	logger.Info(ctx, "common-messaging-proxy-created")
 	return kip, nil
 }
 
@@ -254,30 +255,30 @@
 	sAcONU := ac.NewOpenONUAC(ctx, a.kip, cp, ap, ep, a.kvClient, cfg, cm)
 
 	if err = sAcONU.Start(ctx); err != nil {
-		logger.Fatalw("error-starting-OpenOnuAdapterCore", log.Fields{"error": err})
+		logger.Fatalw(ctx, "error-starting-OpenOnuAdapterCore", log.Fields{"error": err})
 		return nil, err
 	}
 
-	logger.Info("open-ont-OpenOnuAdapterCore-started")
+	logger.Info(ctx, "open-ont-OpenOnuAdapterCore-started")
 	return sAcONU, nil
 }
 
 func (a *adapter) setupRequestHandler(ctx context.Context, coreInstanceID string, iadapter adapters.IAdapter) error {
-	logger.Info("setting-request-handler")
+	logger.Info(ctx, "setting-request-handler")
 	requestProxy := com.NewRequestHandlerProxy(coreInstanceID, iadapter, a.coreProxy)
-	if err := a.kip.SubscribeWithRequestHandlerInterface(kafka.Topic{Name: a.config.Topic}, requestProxy); err != nil {
-		logger.Errorw("request-handler-setup-failed", log.Fields{"error": err})
+	if err := a.kip.SubscribeWithRequestHandlerInterface(ctx, kafka.Topic{Name: a.config.Topic}, requestProxy); err != nil {
+		logger.Errorw(ctx, "request-handler-setup-failed", log.Fields{"error": err})
 		return err
 
 	}
 	probe.UpdateStatusFromContext(ctx, "core-request-handler", probe.ServiceStatusRunning)
-	logger.Info("request-handler-setup-done")
+	logger.Info(ctx, "request-handler-setup-done")
 	return nil
 }
 
 func (a *adapter) registerWithCore(ctx context.Context, retries int) error {
 	adapterID := fmt.Sprintf("brcm_openomci_onu_%d", a.config.CurrentReplica)
-	logger.Infow("registering-with-core", log.Fields{
+	logger.Infow(ctx, "registering-with-core", log.Fields{
 		"adapterID":      adapterID,
 		"currentReplica": a.config.CurrentReplica,
 		"totalReplicas":  a.config.TotalReplicas,
@@ -302,7 +303,7 @@
 	count := 0
 	for {
 		if err := a.coreProxy.RegisterAdapter(context.TODO(), adapterDescription, deviceTypes); err != nil {
-			logger.Warnw("registering-with-core-failed", log.Fields{"error": err})
+			logger.Warnw(ctx, "registering-with-core-failed", log.Fields{"error": err})
 			if retries == count {
 				return err
 			}
@@ -314,7 +315,7 @@
 		}
 	}
 	probe.UpdateStatusFromContext(ctx, "register-with-core", probe.ServiceStatusRunning)
-	logger.Info("registered-with-core")
+	logger.Info(ctx, "registered-with-core")
 	return nil
 }
 
@@ -360,7 +361,7 @@
 			}
 		case <-timeoutTimer.C:
 			// Check the status of the kv-store
-			logger.Info("kv-store liveliness-recheck")
+			logger.Info(ctx, "kv-store liveliness-recheck")
 			if a.kvClient.IsConnectionUp(ctx) {
 				kvStoreChannel <- true
 			} else {
@@ -375,8 +376,8 @@
 and update the status in the probe.
 */
 func (a *adapter) checkKafkaReadiness(ctx context.Context) {
-	livelinessChannel := a.kafkaClient.EnableLivenessChannel(true)
-	healthinessChannel := a.kafkaClient.EnableHealthinessChannel(true)
+	livelinessChannel := a.kafkaClient.EnableLivenessChannel(ctx, true)
+	healthinessChannel := a.kafkaClient.EnableHealthinessChannel(ctx, true)
 	timeout := a.config.LiveProbeInterval
 	for {
 		timeoutTimer := time.NewTimer(timeout)
@@ -385,7 +386,7 @@
 		case healthiness := <-healthinessChannel:
 			if !healthiness {
 				// logger.Fatal will call os.Exit(1) to terminate
-				logger.Fatal("Kafka service has become unhealthy")
+				logger.Fatal(ctx, "Kafka service has become unhealthy")
 			}
 		case liveliness := <-livelinessChannel:
 			if !liveliness {
@@ -402,13 +403,13 @@
 				<-timeoutTimer.C
 			}
 		case <-timeoutTimer.C:
-			logger.Info("kafka-proxy-liveness-recheck")
+			logger.Info(ctx, "kafka-proxy-liveness-recheck")
 			// send the liveness probe in a goroutine; we don't want to deadlock ourselves as
 			// the liveness probe may wait (and block) writing to our channel.
-			err := a.kafkaClient.SendLiveness()
+			err := a.kafkaClient.SendLiveness(ctx)
 			if err != nil {
 				// Catch possible error case if sending liveness after Sarama has been stopped.
-				logger.Warnw("error-kafka-send-liveness", log.Fields{"error": err})
+				logger.Warnw(ctx, "error-kafka-send-liveness", log.Fields{"error": err})
 			}
 		}
 	}
@@ -417,13 +418,13 @@
 // Adapter Utility methods ##### end   #########
 // #############################################
 
-func getVerifiedCodeVersion() string {
+func getVerifiedCodeVersion(ctx context.Context) string {
 	if version.VersionInfo.Version == "unknown-version" {
 		content, err := ioutil.ReadFile("VERSION")
 		if err == nil {
 			return (string(content))
 		}
-		logger.Error("'VERSION'-file not readable")
+		logger.Error(ctx, "'VERSION'-file not readable")
 	}
 	return version.VersionInfo.Version
 }
@@ -458,7 +459,7 @@
 	go func() {
 		select {
 		case <-ctx.Done():
-			logger.Infow("Adapter run aborted due to internal errors", log.Fields{"context": "done"})
+			logger.Infow(ctx, "Adapter run aborted due to internal errors", log.Fields{"context": "done"})
 			exitChannel <- 2
 		case s := <-signalChannel:
 			switch s {
@@ -466,10 +467,10 @@
 				syscall.SIGINT,
 				syscall.SIGTERM,
 				syscall.SIGQUIT:
-				logger.Infow("closing-signal-received", log.Fields{"signal": s})
+				logger.Infow(ctx, "closing-signal-received", log.Fields{"signal": s})
 				exitChannel <- 0
 			default:
-				logger.Infow("unexpected-signal-received", log.Fields{"signal": s})
+				logger.Infow(ctx, "unexpected-signal-received", log.Fields{"signal": s})
 				exitChannel <- 1
 			}
 		}
@@ -481,31 +482,33 @@
 
 func main() {
 	start := time.Now()
+	ctx, cancel := context.WithCancel(context.Background())
+	defer cancel()
 
 	cf := config.NewAdapterFlags()
-	defaultAppName := cf.InstanceID + "_" + getVerifiedCodeVersion()
+	defaultAppName := cf.InstanceID + "_" + getVerifiedCodeVersion(ctx)
 	cf.ParseCommandArguments()
 
 	// Setup logging
 
 	logLevel, err := log.StringToLogLevel(cf.LogLevel)
 	if err != nil {
-		logger.Fatalf("Cannot setup logging, %s", err)
+		logger.Fatalf(ctx, "Cannot setup logging, %s", err)
 	}
 
 	// Setup default logger - applies for packages that do not have specific logger set
 	if _, err := log.SetDefaultLogger(log.JSON, logLevel, log.Fields{"instanceId": cf.InstanceID}); err != nil {
-		log.With(log.Fields{"error": err}).Fatal("Cannot setup logging")
+		logger.With(log.Fields{"error": err}).Fatal(ctx, "Cannot setup logging")
 	}
 
 	// Update all loggers (provisioned via init) with a common field
 	if err := log.UpdateAllLoggers(log.Fields{"instanceId": cf.InstanceID}); err != nil {
-		logger.With(log.Fields{"error": err}).Fatal("Cannot setup logging")
+		logger.With(log.Fields{"error": err}).Fatal(ctx, "Cannot setup logging")
 	}
 
 	log.SetAllLogLevel(logLevel)
 
-	realMain() //fatal on httpListen(0,6060) ...
+	realMain(ctx) //fatal on httpListen(0,6060) ...
 
 	defer func() {
 		_ = log.CleanUp()
@@ -515,30 +518,34 @@
 		printVersion(defaultAppName)
 		return
 	}
-	logger.Infow("config", log.Fields{"StartName": defaultAppName})
-	logger.Infow("config", log.Fields{"BuildVersion": version.VersionInfo.String("  ")})
-	logger.Infow("config", log.Fields{"Arguments": os.Args[1:]})
+	logger.Infow(ctx, "config", log.Fields{"StartName": defaultAppName})
+	logger.Infow(ctx, "config", log.Fields{"BuildVersion": version.VersionInfo.String("  ")})
+	logger.Infow(ctx, "config", log.Fields{"Arguments": os.Args[1:]})
 
 	// Print banner if specified
 	if cf.Banner {
 		printBanner()
 	}
 
-	logger.Infow("config", log.Fields{"config": *cf})
-
-	ctx, cancel := context.WithCancel(context.Background())
-	defer cancel()
+	logger.Infow(ctx, "config", log.Fields{"config": *cf})
 
 	ad := newAdapter(cf)
 
 	p := &probe.Probe{}
-	logger.Infow("resources", log.Fields{"Context": ctx, "Adapter": ad.instanceID, "ProbeCoreState": p.GetStatus("register-with-core")})
+	logger.Infow(ctx, "resources", log.Fields{"Context": ctx, "Adapter": ad.instanceID, "ProbeCoreState": p.GetStatus("register-with-core")})
 
-	go p.ListenAndServe(fmt.Sprintf("%s:%d", ad.config.ProbeHost, ad.config.ProbePort))
-	logger.Infow("probeState", log.Fields{"ProbeCoreState": p.GetStatus("register-with-core")})
+	go p.ListenAndServe(ctx, fmt.Sprintf("%s:%d", ad.config.ProbeHost, ad.config.ProbePort))
+	logger.Infow(ctx, "probeState", log.Fields{"ProbeCoreState": p.GetStatus("register-with-core")})
 
 	probeCtx := context.WithValue(ctx, probe.ProbeContextKey, p)
 
+	closer, err := log.GetGlobalLFM().InitTracingAndLogCorrelation(cf.TraceEnabled, cf.TraceAgentAddress, cf.LogCorrelationEnabled)
+	if err != nil {
+		logger.Warnw(ctx, "unable-to-initialize-tracing-and-log-correlation-module", log.Fields{"error": err})
+	} else {
+		defer log.TerminateTracing(closer)
+	}
+
 	go func() {
 		err := ad.start(probeCtx)
 		// If this operation returns an error
@@ -549,12 +556,12 @@
 	}()
 
 	code := waitForExit(ctx)
-	logger.Infow("received-a-closing-signal", log.Fields{"code": code})
+	logger.Infow(ctx, "received-a-closing-signal", log.Fields{"code": code})
 
 	// Cleanup before leaving
 	ad.stop(ctx)
 
 	elapsed := time.Since(start)
-	logger.Infow("run-time", log.Fields{"Name": "openadapter", "time": elapsed / time.Microsecond})
-	//logger.Infow("run-time", log.Fields{"instanceId": ad.config.InstanceID, "time": elapsed / time.Second})
+	logger.Infow(ctx, "run-time", log.Fields{"Name": "openadapter", "time": elapsed / time.Microsecond})
+	//logger.Infow(ctx,"run-time", log.Fields{"instanceId": ad.config.InstanceID, "time": elapsed / time.Second})
 }
diff --git a/cmd/openonu-adapter/release.go b/cmd/openonu-adapter/release.go
index a8fb220..50a286f 100644
--- a/cmd/openonu-adapter/release.go
+++ b/cmd/openonu-adapter/release.go
@@ -19,6 +19,8 @@
 //Package main invokes the application
 package main
 
-func realMain() {
-	logger.Infoln("NOT PROFILING")
+import "context"
+
+func realMain(ctx context.Context) {
+	logger.Infoln(ctx, "NOT PROFILING")
 }
