diff options
Diffstat (limited to 'participant')
2 files changed, 8 insertions, 4 deletions
diff --git a/participant/participant-impl/participant-impl-kserve/src/main/java/org/onap/policy/clamp/acm/participant/kserve/handler/AutomationCompositionElementHandler.java b/participant/participant-impl/participant-impl-kserve/src/main/java/org/onap/policy/clamp/acm/participant/kserve/handler/AutomationCompositionElementHandler.java index 23d469615..417b60978 100644 --- a/participant/participant-impl/participant-impl-kserve/src/main/java/org/onap/policy/clamp/acm/participant/kserve/handler/AutomationCompositionElementHandler.java +++ b/participant/participant-impl/participant-impl-kserve/src/main/java/org/onap/policy/clamp/acm/participant/kserve/handler/AutomationCompositionElementHandler.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. @@ -21,6 +21,7 @@ package org.onap.policy.clamp.acm.participant.kserve.handler; import io.kubernetes.client.openapi.ApiException; +import io.opentelemetry.context.Context; import jakarta.validation.Validation; import jakarta.validation.ValidationException; import java.io.IOException; @@ -70,7 +71,8 @@ public class AutomationCompositionElementHandler implements AutomationCompositio private static final Logger LOGGER = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - private ExecutorService executor = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors()); + private ExecutorService executor = Context.taskWrapping( + Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors())); private final ParticipantIntermediaryApi intermediaryApi; 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. |