diff options
author | saul.gill <saul.gill@est.tech> | 2024-02-01 16:51:26 +0000 |
---|---|---|
committer | saul.gill <saul.gill@est.tech> | 2024-02-07 13:19:28 +0000 |
commit | d0ed457d63e22c83e730c7929c7422b6780ad5d1 (patch) | |
tree | a21d988694c5045f9045aaaa2a3ff63b0238a95a /participant/participant-intermediary/src/main/java/org/onap | |
parent | eb40ca7e9f01769ade8f1d3f3fbe262d85b8f8ef (diff) |
Share tracing context in all threads
Issue-ID: POLICY-4922
Change-Id: I8f5e99b597c989a26777233ef58ef5c4f9db4215
Signed-off-by: saul.gill <saul.gill@est.tech>
Diffstat (limited to 'participant/participant-intermediary/src/main/java/org/onap')
-rw-r--r-- | participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ThreadHandler.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ThreadHandler.java b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ThreadHandler.java index e29562a6e..0aed919e5 100644 --- a/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ThreadHandler.java +++ b/participant/participant-intermediary/src/main/java/org/onap/policy/clamp/acm/participant/intermediary/handler/ThreadHandler.java @@ -1,6 +1,6 @@ /*- * ============LICENSE_START======================================================= - * Copyright (C) 2023 Nordix Foundation. + * Copyright (C) 2023-2024 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,6 +20,7 @@ package org.onap.policy.clamp.acm.participant.intermediary.handler; +import io.opentelemetry.context.Context; import java.io.Closeable; import java.io.IOException; import java.util.HashMap; @@ -57,7 +58,8 @@ public class ThreadHandler implements Closeable { private final Map<UUID, Future> executionMap = new ConcurrentHashMap<>(); - private final ExecutorService executor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()); + private final ExecutorService executor = + Context.taskWrapping(Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors())); /** * Handle an update on a automation composition element. |