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-impl/participant-impl-kserve/src/main/java | |
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-impl/participant-impl-kserve/src/main/java')
-rw-r--r-- | participant/participant-impl/participant-impl-kserve/src/main/java/org/onap/policy/clamp/acm/participant/kserve/handler/AutomationCompositionElementHandler.java | 6 |
1 files changed, 4 insertions, 2 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; |