diff --git a/dfsclient/src/main/java/org/hpccsystems/dfs/client/HPCCRemoteFileWriter.java b/dfsclient/src/main/java/org/hpccsystems/dfs/client/HPCCRemoteFileWriter.java
index 1cd3f09de..cef414a16 100644
--- a/dfsclient/src/main/java/org/hpccsystems/dfs/client/HPCCRemoteFileWriter.java
+++ b/dfsclient/src/main/java/org/hpccsystems/dfs/client/HPCCRemoteFileWriter.java
@@ -15,14 +15,10 @@
import org.hpccsystems.commons.ecl.FieldDef;
import org.hpccsystems.commons.ecl.RecordDefinitionTranslator;
-import org.hpccsystems.dfs.client.RowServiceOutputStream;
-import org.hpccsystems.dfs.client.Utils;
-
import io.opentelemetry.api.common.AttributeKey;
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.api.trace.StatusCode;
-import io.opentelemetry.semconv.ServerAttributes;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
diff --git a/dfsclient/src/main/java/org/hpccsystems/dfs/client/HpccRemoteFileReader.java b/dfsclient/src/main/java/org/hpccsystems/dfs/client/HpccRemoteFileReader.java
index 4192349bb..87d32980e 100644
--- a/dfsclient/src/main/java/org/hpccsystems/dfs/client/HpccRemoteFileReader.java
+++ b/dfsclient/src/main/java/org/hpccsystems/dfs/client/HpccRemoteFileReader.java
@@ -12,8 +12,6 @@
*******************************************************************************/
package org.hpccsystems.dfs.client;
-import org.hpccsystems.dfs.client.Utils;
-
import org.hpccsystems.commons.ecl.FieldDef;
import org.hpccsystems.commons.ecl.RecordDefinitionTranslator;
import org.hpccsystems.commons.errors.HpccFileException;
@@ -22,7 +20,6 @@
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.api.trace.StatusCode;
-import io.opentelemetry.semconv.ServerAttributes;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.LogManager;
diff --git a/dfsclient/src/main/java/org/hpccsystems/dfs/client/RowServiceInputStream.java b/dfsclient/src/main/java/org/hpccsystems/dfs/client/RowServiceInputStream.java
index 62fc8e593..1013b91e6 100644
--- a/dfsclient/src/main/java/org/hpccsystems/dfs/client/RowServiceInputStream.java
+++ b/dfsclient/src/main/java/org/hpccsystems/dfs/client/RowServiceInputStream.java
@@ -47,9 +47,7 @@
import io.opentelemetry.api.common.Attributes;
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.api.trace.StatusCode;
-import io.opentelemetry.context.Context;
import io.opentelemetry.semconv.ExceptionAttributes;
-import io.opentelemetry.semconv.ServerAttributes;
import io.opentelemetry.semconv.ServiceAttributes;
/**
diff --git a/pom.xml b/pom.xml
index 76111f10a..01821f244 100644
--- a/pom.xml
+++ b/pom.xml
@@ -135,6 +135,12 @@
io.opentelemetry
opentelemetry-exporter-otlp
+
+
+ io.opentelemetry.instrumentation
+ opentelemetry-instrumentation-annotations
+ 2.6.0
+
io.opentelemetry.semconv
@@ -190,29 +196,29 @@
pom
- org.apache.axis2
- axis2-kernel
- ${axis2.version}
-
-
- org.apache.axis2
- axis2-transport-http
- ${axis2.version}
-
-
- org.apache.axis2
- axis2-transport-local
- ${axis2.version}
-
-
- org.apache.axis2
- axis2-adb
- ${axis2.version}
-
-
- org.apache.axis2
- axis2-jaxws
- ${axis2.version}
+ org.apache.axis2
+ axis2-kernel
+ ${axis2.version}
+
+
+ org.apache.axis2
+ axis2-transport-http
+ ${axis2.version}
+
+
+ org.apache.axis2
+ axis2-transport-local
+ ${axis2.version}
+
+
+ org.apache.axis2
+ axis2-adb
+ ${axis2.version}
+
+
+ org.apache.axis2
+ axis2-jaxws
+ ${axis2.version}
diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/BaseHPCCWsClient.java b/wsclient/src/main/java/org/hpccsystems/ws/client/BaseHPCCWsClient.java
index 2ee1461a9..cca907b2b 100644
--- a/wsclient/src/main/java/org/hpccsystems/ws/client/BaseHPCCWsClient.java
+++ b/wsclient/src/main/java/org/hpccsystems/ws/client/BaseHPCCWsClient.java
@@ -1,7 +1,6 @@
package org.hpccsystems.ws.client;
import java.io.ByteArrayInputStream;
-import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.nio.charset.StandardCharsets;
@@ -43,14 +42,12 @@
import io.opentelemetry.api.GlobalOpenTelemetry;
import io.opentelemetry.api.OpenTelemetry;
-import io.opentelemetry.api.trace.Span;
import io.opentelemetry.api.trace.SpanBuilder;
import io.opentelemetry.api.trace.SpanKind;
-import io.opentelemetry.api.trace.StatusCode;
import io.opentelemetry.api.trace.Tracer;
import io.opentelemetry.api.trace.propagation.W3CTraceContextPropagator;
import io.opentelemetry.context.Context;
-import io.opentelemetry.context.Scope;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
import io.opentelemetry.semconv.HttpAttributes;
import io.opentelemetry.semconv.ServerAttributes;
@@ -91,6 +88,7 @@ public boolean isTargetHPCCContainerized() throws Exception
return targetsContainerizedHPCC;
}
+ @WithSpan
private boolean getTargetHPCCIsContainerized(Connection conn) throws Exception
{
if (wsconn == null)
@@ -155,6 +153,7 @@ public Version getTargetHPCCBuildVersion()
return targetHPCCBuildVersion;
}
+ @WithSpan
private String getTargetHPCCBuildVersionString() throws Exception
{
if (wsconn == null)
@@ -266,47 +265,29 @@ protected boolean initBaseWsClient(Connection connection, boolean fetchVersionAn
if (fetchVersionAndContainerMode)
{
- Span fetchHPCCVerSpan = getWsClientSpanBuilder("FetchHPCCVersion").setSpanKind(SpanKind.INTERNAL).startSpan();
- try (Scope scope = fetchHPCCVerSpan.makeCurrent())
+ try
{
- try
- {
- targetHPCCBuildVersion = new Version(getTargetHPCCBuildVersionString());
- }
- catch (Exception e)
- {
- initErrMessage = "BaseHPCCWsClient: Could not stablish target HPCC bulid version, review all HPCC connection values";
- if (!e.getLocalizedMessage().isEmpty())
- initErrMessage = initErrMessage + "\n" + e.getLocalizedMessage();
- success = false;
- }
+ targetHPCCBuildVersion = new Version(getTargetHPCCBuildVersionString());
}
- finally
+ catch (Exception e)
{
- fetchHPCCVerSpan.setStatus(success ? StatusCode.OK : StatusCode.ERROR, initErrMessage);
- fetchHPCCVerSpan.end();
+ initErrMessage = "BaseHPCCWsClient: Could not stablish target HPCC bulid version, review all HPCC connection values";
+ if (!e.getLocalizedMessage().isEmpty())
+ initErrMessage = initErrMessage + "\n" + e.getLocalizedMessage();
+ success = false;
}
- Span fetchHPCCContainerMode = getWsClientSpanBuilder("FetchHPCCContainerMode").startSpan();
- try (Scope scope = fetchHPCCContainerMode.makeCurrent())
+ try
{
- try
- {
- targetsContainerizedHPCC = getTargetHPCCIsContainerized(wsconn);
- }
- catch (Exception e)
- {
- initErrMessage = initErrMessage + "\nBaseHPCCWsClient: Could not determine target HPCC Containerization mode, review all HPCC connection values";
- if (!e.getLocalizedMessage().isEmpty())
- initErrMessage = initErrMessage + "\n" + e.getLocalizedMessage();
-
- success = false;
- }
+ targetsContainerizedHPCC = getTargetHPCCIsContainerized(wsconn);
}
- finally
+ catch (Exception e)
{
- fetchHPCCContainerMode.setStatus(success ? StatusCode.OK : StatusCode.ERROR, initErrMessage);
- fetchHPCCContainerMode.end();
+ initErrMessage = initErrMessage + "\nBaseHPCCWsClient: Could not determine target HPCC Containerization mode, review all HPCC connection values";
+ if (!e.getLocalizedMessage().isEmpty())
+ initErrMessage = initErrMessage + "\n" + e.getLocalizedMessage();
+
+ success = false;
}
}
if (!initErrMessage.isEmpty())
diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCFileSprayClient.java b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCFileSprayClient.java
index f59fe29fc..799506cb6 100644
--- a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCFileSprayClient.java
+++ b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCFileSprayClient.java
@@ -89,6 +89,9 @@
import org.hpccsystems.ws.client.wrappers.gen.filespray.ProgressResponseWrapper;
import org.w3c.dom.Document;
+import io.opentelemetry.instrumentation.annotations.SpanAttribute;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
/**
* Facilitates File Spray related activities.
* This includes listing available dropzones, uploading files to dropzone, listing files in a dropzone,
@@ -356,7 +359,6 @@ private void initWsFileSprayStub(Connection connection)
{
initErrMessage += "\nCould not initialize FileSprayStub - Review all HPCC connection values";
}
-
}
/**
@@ -421,6 +423,7 @@ public void setFileUploadReadBufferLength(int length)
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
+ @WithSpan
public boolean handleSprayResponse(ProgressResponseWrapper progressResponseWrapper, int maxRetries, int milliesBetweenRetry)
throws Exception, org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
{
@@ -560,7 +563,8 @@ public List fetchLocalDropZones() throws Exception, ArrayOfEspE
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public List fetchDropZones(String dropzoneNetAddress) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public List fetchDropZones(@SpanAttribute String dropzoneNetAddress) throws Exception, ArrayOfEspExceptionWrapper
{
verifyStub();
@@ -621,7 +625,8 @@ public List fetchDropZones(String dropzoneNetAddress) throws Ex
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public String copyFile(String from, String to, boolean overwrite) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public String copyFile(@SpanAttribute String from, @SpanAttribute String to, @SpanAttribute boolean overwrite) throws Exception, ArrayOfEspExceptionWrapper
{
verifyStub();
Copy cp = new Copy();
@@ -671,7 +676,8 @@ public String copyFile(String from, String to, boolean overwrite) throws Excepti
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public DropZoneFilesResponseWrapper fetchDropZones(String dzname, String netaddress, String os, String path, String subfolder, boolean dironly,
+ @WithSpan
+ public DropZoneFilesResponseWrapper fetchDropZones(@SpanAttribute String dzname, @SpanAttribute String netaddress, @SpanAttribute String os, @SpanAttribute String path, String subfolder, boolean dironly,
boolean watchvisibleonely) throws Exception, ArrayOfEspExceptionWrapper
{
verifyStub();
@@ -699,6 +705,7 @@ public DropZoneFilesResponseWrapper fetchDropZones(String dzname, String netaddr
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
+ @WithSpan
public DropZoneFilesResponseWrapper fetchDropZones(DropZoneFilesRequestWrapper szrequest) throws Exception, ArrayOfEspExceptionWrapper
{
if (szrequest == null) throw new Exception("DropZoneFilesRequestWrapper null detected");
@@ -740,7 +747,8 @@ public DropZoneFilesResponseWrapper fetchDropZones(DropZoneFilesRequestWrapper s
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public PhysicalFileStruct[] dzFileSearch(String dzname, String netaddr, String namefilter) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public PhysicalFileStruct[] dzFileSearch(@SpanAttribute String dzname, @SpanAttribute String netaddr, @SpanAttribute String namefilter) throws Exception, ArrayOfEspExceptionWrapper
{
verifyStub();
@@ -788,7 +796,8 @@ public PhysicalFileStruct[] dzFileSearch(String dzname, String netaddr, String n
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public List listFiles(String netAddress, String path, String OS) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public List listFiles(@SpanAttribute String netAddress, @SpanAttribute String path, @SpanAttribute String OS) throws Exception, ArrayOfEspExceptionWrapper
{
verifyStub();
@@ -994,8 +1003,9 @@ public ProgressResponseWrapper sprayVariable(DelimitedDataOptions options, DropZ
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public ProgressResponseWrapper sprayVariable(DelimitedDataOptions options, DropZoneWrapper targetDropZone, String sourceFileName,
- String targetFileName, String prefix, String destGroup, boolean overwrite, SprayVariableFormat format, Integer sourceMaxRecordSize,
+ @WithSpan
+ public ProgressResponseWrapper sprayVariable(@SpanAttribute DelimitedDataOptions options, @SpanAttribute DropZoneWrapper targetDropZone, @SpanAttribute String sourceFileName,
+ @SpanAttribute String targetFileName, String prefix, String destGroup, boolean overwrite, SprayVariableFormat format, Integer sourceMaxRecordSize,
Integer maxConnections, Boolean compress, Boolean replicate, Boolean failIfNoSourceFile, Boolean recordStructurePresent,
Integer expireDays) throws Exception, ArrayOfEspExceptionWrapper
{
@@ -1149,8 +1159,9 @@ public ProgressResponseWrapper sprayLocalXML(String sourceFileName, String targe
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public ProgressResponseWrapper sprayXML(DropZoneWrapper targetDropZone, String sourceFileName, String targetFileName, String prefix,
- String destGroup, String rowtag, boolean overwrite, SprayVariableFormat format, Integer maxrecsize, Integer maxConnections,
+ @WithSpan
+ public ProgressResponseWrapper sprayXML(@SpanAttribute DropZoneWrapper targetDropZone,@SpanAttribute String sourceFileName,@SpanAttribute String targetFileName, String prefix,
+ @SpanAttribute String destGroup, String rowtag, boolean overwrite, SprayVariableFormat format, Integer maxrecsize, Integer maxConnections,
Boolean replicate, Boolean compress, Boolean failIfNoSourceFile, Integer expireDays) throws Exception, ArrayOfEspExceptionWrapper
{
verifyStub();
@@ -1303,7 +1314,8 @@ public ProgressResponseWrapper sprayFixedLocalDropZone(String sourceFileName, in
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public ProgressResponseWrapper sprayFixed(DropZoneWrapper targetDropZone, String sourceFileName, int recordSize, String targetFileLabel,
+ @WithSpan
+ public ProgressResponseWrapper sprayFixed(@SpanAttribute DropZoneWrapper targetDropZone, @SpanAttribute String sourceFileName, int recordSize, String targetFileLabel,
String prefix, String destGroup, boolean overwrite, Integer maxConnections, Boolean compress, Boolean replicate,
Boolean failIfNoSourceFile, Integer expireDays, String decryptKey, String encryptKey, Boolean nosplit, Boolean recordStructurePresent,
Integer transferBufferSize, Boolean wrap) throws Exception, ArrayOfEspExceptionWrapper
@@ -1364,7 +1376,8 @@ public ProgressResponseWrapper sprayFixed(DropZoneWrapper targetDropZone, String
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public ProgressResponseWrapper getDfuProgress(String dfuwuid) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public ProgressResponseWrapper getDfuProgress(@SpanAttribute String dfuwuid) throws Exception, ArrayOfEspExceptionWrapper
{
verifyStub();
@@ -1411,7 +1424,8 @@ public ProgressResponseWrapper getDfuProgress(String dfuwuid) throws Exception,
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public boolean uploadFile(File file, String targetDropzoneAddress) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public boolean uploadFile(@SpanAttribute File file, @SpanAttribute String targetDropzoneAddress) throws Exception, ArrayOfEspExceptionWrapper
{
List dropZones = fetchDropZones(targetDropzoneAddress);
if (dropZones == null || dropZones.size() <= 0) throw new Exception("Could not fetch target dropzone information");
@@ -1469,7 +1483,8 @@ static protected void setupUploadResultParser() throws XPathExpressionException,
* - The target dropzone
* @return - Boolean, success
*/
- public boolean uploadLargeFile(File uploadFile, DropZoneWrapper dropZone)
+ @WithSpan
+ public boolean uploadLargeFile(@SpanAttribute File uploadFile, @SpanAttribute DropZoneWrapper dropZone)
{
if (uploadFile == null || dropZone == null)
{
@@ -1619,7 +1634,8 @@ public boolean uploadLargeFile(File uploadFile, DropZoneWrapper dropZone)
* @throws Exception
* the exception
*/
- private boolean uploadFile(File file, DropZoneWrapper dropZone) throws Exception
+ @WithSpan
+ private boolean uploadFile(@SpanAttribute File file, @SpanAttribute DropZoneWrapper dropZone) throws Exception
{
if (file == null) return false;
String filename = file.getName();
diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsClient.java b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsClient.java
index 0979c8d85..8ea3ede37 100644
--- a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsClient.java
+++ b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsClient.java
@@ -22,6 +22,8 @@
import org.hpccsystems.ws.client.wrappers.gen.wstopology.TpGroupWrapper;
import org.hpccsystems.ws.client.wrappers.wsworkunits.WorkunitWrapper;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
/**
*
* Convenient interface which exposes most common HPCC-centric activities.
@@ -286,6 +288,7 @@ protected Connection getConnection()
* @throws java.lang.Exception
* the exception
*/
+ @WithSpan
public synchronized boolean pingServer() throws Exception
{
HPCCWsWorkUnitsClient wsWorkunitsClient = getWsWorkunitsClient();
@@ -307,6 +310,7 @@ public synchronized boolean pingServer() throws Exception
*
* @return a boolean.
*/
+ @WithSpan
public boolean isContainerized()
{
HPCCWsSMCClient wsSMCClient = getWsSMCClient();
@@ -331,6 +335,7 @@ public boolean isContainerized()
* @throws HpccContainerizedUnsupportedException if unsupported HPCC deployment encountered
* @throws Exception a {@link java.lang.Exception} object.
*/
+ @WithSpan
public List getTopologyGroups(TopologyGroupQueryKind kind) throws HpccContainerizedUnsupportedException, Exception
{
HPCCWsTopologyClient wsTopologyClient = getWsTopologyClient();
@@ -672,6 +677,7 @@ public HPCCWsWorkUnitsClient getWsWorkunitsClient()
* @throws java.lang.Exception
* the exception
*/
+ @WithSpan
public String[] getAvailableClusterGroups() throws Exception
{
HPCCWsTopologyClient hpccWsTopologyClient = HPCCWsTopologyClient.get(connection);
@@ -706,6 +712,7 @@ public String[] getAvailableClusterGroups() throws Exception
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
+ @WithSpan
public String[] getAvailableClusterNames(String clusterGroupType) throws Exception, org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
{
HPCCWsTopologyClient wsTopologyClient = HPCCWsTopologyClient.get(connection);
@@ -725,6 +732,7 @@ public String[] getAvailableClusterNames(String clusterGroupType) throws Excepti
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
+ @WithSpan
public List getAvailableTargetClusterNames() throws Exception, org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
{
HPCCWsTopologyClient wsTopologyClient = HPCCWsTopologyClient.get(connection);
@@ -750,6 +758,7 @@ public List getAvailableTargetClusterNames() throws Exception, org.hpccs
* - Boolean, overwrite possibly sprayed file of same name
* @return - Boolean, success.
*/
+ @WithSpan
public boolean sprayFlatHPCCFile(String fileName, String targetFileLabel, int recordSize, String targetCluster, boolean overwritesprayedfile)
{
boolean success = true;
@@ -802,6 +811,7 @@ public boolean sprayFlatHPCCFile(String fileName, String targetFileLabel, int re
* - SprayVariableFormat
* @return - Boolean, success.
*/
+ @WithSpan
public boolean sprayCustomCSVHPCCFile(String fileName, String targetFileLabel, String targetCluster, String escapedEscapeSequence,
String escapedFieldDelim, String escapedQuote, String escapedRecTerminator, boolean overwritesprayedfile, SprayVariableFormat format)
{
@@ -835,6 +845,7 @@ public boolean sprayCustomCSVHPCCFile(String fileName, String targetFileLabel, S
* - Boolean, overwrite possibly sprayed file of same name
* @return - Boolean, success.
*/
+ @WithSpan
public boolean sprayDefaultCSVHPCCFile(String fileName, String targetFileLabel, String targetCluster, boolean overwritesprayedfile)
{
boolean success = false;
@@ -871,6 +882,7 @@ public boolean sprayDefaultCSVHPCCFile(String fileName, String targetFileLabel,
* - SprayVariableFormat
* @return - Boolean, success.
*/
+ @WithSpan
public boolean sprayVariableHPCCFile(String fileName, String targetFileLabel, String targetCluster, DelimitedDataOptions options,
boolean overwritesprayedfile, SprayVariableFormat format)
{
@@ -935,6 +947,7 @@ public boolean handleSprayResponse(ProgressResponseWrapper progressResponseWrapp
* Target machine user account password
* @return true, if successful
*/
+ @WithSpan
public boolean uploadFileToHPCC(String localFileName, String targetFilename, String machineLoginUser, String password)
{
try
@@ -963,6 +976,7 @@ public boolean uploadFileToHPCC(String localFileName, String targetFilename, Str
* Fully qualified local file name to be uploaded
* @return true, if successful
*/
+ @WithSpan
public boolean httpUploadFileToFirstHPCCLandingZone(String localFileName)
{
try
@@ -990,6 +1004,7 @@ public boolean httpUploadFileToFirstHPCCLandingZone(String localFileName)
* @throws java.lang.Exception
* the exception
*/
+ @WithSpan
public String submitECLandGetResults(WorkunitWrapper wu) throws Exception
{
String results = null;
@@ -1024,6 +1039,7 @@ public String submitECLandGetResults(WorkunitWrapper wu) throws Exception
* @throws java.lang.Exception
* the exception
*/
+ @WithSpan
public List> submitECLandGetResultsList(WorkunitWrapper wu) throws Exception
{
List> resultsList;
@@ -1039,6 +1055,7 @@ public List> submitECLandGetResultsList(WorkunitWrapper wu) throws
* - The workunit info to be submitted
* @return - If successful, the resulting WUID, which can be used to query info, including results
*/
+ @WithSpan
public String submitECLandGetWUID(WorkunitWrapper wu)
{
String WUID = null;
diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsClientPool.java b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsClientPool.java
index a3a6e4654..7c75a3467 100644
--- a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsClientPool.java
+++ b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsClientPool.java
@@ -3,6 +3,8 @@
import org.hpccsystems.ws.client.utils.Connection;
import org.hpccsystems.ws.client.utils.ObjectPool;
+//import io.opentelemetry.instrumentation.annotations.WithSpan;
+
/**
* HPCCWsClientPool class.
*
@@ -76,6 +78,7 @@ public HPCCWsClientPool(Connection connection)
* @param timeout
* the timeout
*/
+ //@WithSpan
public HPCCWsClientPool(Connection connection, long timeout)
{
super(timeout);
@@ -89,6 +92,7 @@ public HPCCWsClientPool(Connection connection, long timeout)
*/
/** {@inheritDoc} */
@Override
+ //@WithSpan
protected HPCCWsClient create()
{
return (new HPCCWsClient(m_connection));
diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsCloudClient.java b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsCloudClient.java
index bd174a34f..c31e25c59 100644
--- a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsCloudClient.java
+++ b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsCloudClient.java
@@ -32,6 +32,8 @@ HPCC SYSTEMS software Copyright (C) 2022 HPCC Systems®.
import org.hpccsystems.ws.client.gen.axis2.wscloud.latest.WsCloudStub;
import org.hpccsystems.ws.client.utils.Connection;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
/**
* Provides Containerized HPCC cluster information.
*/
@@ -216,6 +218,7 @@ protected void initWsCloudClientStub(Connection conn)
* @return a JSON formatted list of available pods - in raw k8s format.
* @throws java.lang.Exception if any.
*/
+ @WithSpan
public String getPods() throws Exception
{
verifyStub();
diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsCodeSignClient.java b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsCodeSignClient.java
index f65c698a9..d77d2ae37 100644
--- a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsCodeSignClient.java
+++ b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsCodeSignClient.java
@@ -40,6 +40,8 @@ HPCC SYSTEMS software Copyright (C) 2021 HPCC Systems®.
import org.hpccsystems.ws.client.wrappers.gen.wscodesign.VerifyRequestWrapper;
import org.hpccsystems.ws.client.wrappers.gen.wscodesign.VerifyResponseWrapper;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
/**
* Facilitates ECL Code signing and verification related activities.
*/
@@ -220,6 +222,7 @@ protected void initWsResourcesClientStub(Connection conn)
* @return a {@link org.hpccsystems.ws.client.wrappers.gen.wscodesign.ListUserIDsResponseWrapper} object.
* @throws java.lang.Exception if any.
*/
+ @WithSpan
public ListUserIDsResponseWrapper listUserIDs(ListUserIDsRequestWrapper req) throws Exception
{
if (req == null)
@@ -254,6 +257,7 @@ public ListUserIDsResponseWrapper listUserIDs(ListUserIDsRequestWrapper req) thr
* @return a {@link org.hpccsystems.ws.client.wrappers.gen.wscodesign.SignResponseWrapper} object.
* @throws java.lang.Exception if any.
*/
+ @WithSpan
public SignResponseWrapper sign(SignRequestWrapper req) throws Exception
{
if (req == null)
@@ -288,6 +292,7 @@ public SignResponseWrapper sign(SignRequestWrapper req) throws Exception
* @return a {@link org.hpccsystems.ws.client.wrappers.gen.wscodesign.VerifyResponseWrapper} object.
* @throws java.lang.Exception if any.
*/
+ @WithSpan
public VerifyResponseWrapper verify(VerifyRequestWrapper req) throws Exception
{
if (req == null)
diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsDFUClient.java b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsDFUClient.java
index d7c612dea..8d1cd05d3 100644
--- a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsDFUClient.java
+++ b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsDFUClient.java
@@ -78,6 +78,9 @@
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
+import io.opentelemetry.instrumentation.annotations.SpanAttribute;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
/**
* Facilitates Logical File System actions on target HPCC Systems instance.
*
@@ -583,6 +586,7 @@ public AddtoSuperfileResponseWrapper createSuperfile(String superfilename, Strin
* @throws java.lang.Exception general exception
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper array of esp exception wrapper
*/
+ @WithSpan
public AddtoSuperfileResponseWrapper addToSuperFile(AddtoSuperfileRequestWrapper request) throws Exception, ArrayOfEspExceptionWrapper
{
if (request == null)
@@ -1816,8 +1820,9 @@ public DFUCreateFileWrapper createFile(String fileName, String cluster, String e
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public DFUCreateFileWrapper createFileAndAcquireAccess(String fileName, String cluster, String eclRecordDefinition, int expirySeconds,
- Boolean compressed, DFUFileTypeWrapper type, String requestId) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public DFUCreateFileWrapper createFileAndAcquireAccess(@SpanAttribute String fileName, @SpanAttribute String cluster, @SpanAttribute String eclRecordDefinition, @SpanAttribute int expirySeconds,
+ @SpanAttribute Boolean compressed, DFUFileTypeWrapper type, @SpanAttribute String requestId) throws Exception, ArrayOfEspExceptionWrapper
{
if (targetHPCCBuildVersion == null || stub == null)
throw new Exception("WSDFU client not available" + (hasInitError() ? " - " + initErrMessage : ""));
@@ -1921,7 +1926,8 @@ public void publishFile(String fileId, String eclRecordDefinition, long totalRec
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public void publishFile(String fileId, String eclRecordDefinition, long totalRecords, long fileSize, Boolean overwrite)
+ @WithSpan
+ public void publishFile(@SpanAttribute String fileId, @SpanAttribute String eclRecordDefinition, @SpanAttribute long totalRecords,@SpanAttribute long fileSize, @SpanAttribute Boolean overwrite)
throws Exception, ArrayOfEspExceptionWrapper
{
verifyStub(); // Throws exception if stub failed
@@ -1988,7 +1994,8 @@ public DFUFileDetailWrapper getFileDetails(String logicalname, String clusternam
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public DFUFileDetailWrapper getFileDetails(String logicalname, String clustername, boolean jsonTypeInfo, boolean binTypeInfo)
+ @WithSpan
+ public DFUFileDetailWrapper getFileDetails(@SpanAttribute String logicalname, @SpanAttribute String clustername, @SpanAttribute boolean jsonTypeInfo, @SpanAttribute boolean binTypeInfo)
throws Exception, ArrayOfEspExceptionWrapper
{
// try drea?
diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsDFUXRefClient.java b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsDFUXRefClient.java
index 72a0163b0..329de4de6 100644
--- a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsDFUXRefClient.java
+++ b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsDFUXRefClient.java
@@ -59,6 +59,9 @@ HPCC SYSTEMS software Copyright (C) 2021 HPCC Systems®.
import org.hpccsystems.ws.client.wrappers.ArrayOfXRefNodeWrapper;
import org.hpccsystems.ws.client.wrappers.gen.wsdfuxref.DFUXRefUnusedFilesResponseWrapper;
+import io.opentelemetry.instrumentation.annotations.SpanAttribute;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
/**
* Facilitates XRef Logical File System actions on target HPCC instance.
*
@@ -429,7 +432,8 @@ public ArrayOfXRefDirectoryWrapper directories(String cluster) throws Exception
* @throws Exception a {@link java.lang.Exception} object.
* @return a {@link java.lang.String} object.
*/
- public String action(String cluster, String action, String type, EspStringArray xrefFilesArray) throws Exception
+ @WithSpan
+ public String action(@SpanAttribute String cluster,@SpanAttribute String action,@SpanAttribute String type, EspStringArray xrefFilesArray) throws Exception
{
if (isTargetHPCCContainerized())
throw new HpccContainerizedUnsupportedException("HPCCWsDFUXRefClient.action not supported in CONTAINERIZED mode");
@@ -463,6 +467,7 @@ public String action(String cluster, String action, String type, EspStringArray
* @param cluster a {@link java.lang.String} object.
* @throws Exception a {@link java.lang.Exception} object.
*/
+ @WithSpan
public void cleanDirectories(String cluster) throws Exception
{
if (isTargetHPCCContainerized())
@@ -497,6 +502,7 @@ public void cleanDirectories(String cluster) throws Exception
* @throws Exception a {@link java.lang.Exception} object.
* @return a {@link java.lang.String} object.
*/
+ @WithSpan
public String buildCancel() throws Exception
{
if (isTargetHPCCContainerized())
@@ -526,7 +532,8 @@ public String buildCancel() throws Exception
* @throws Exception a {@link java.lang.Exception} object.
* @return a {@link java.lang.String} object.
*/
- public String build(String cluster) throws Exception
+ @WithSpan
+ public String build(@SpanAttribute String cluster) throws Exception
{
if (isTargetHPCCContainerized())
throw new HpccContainerizedUnsupportedException("HPCCWsDFUXRefClient.build not supported in CONTAINERIZED mode");
@@ -556,7 +563,8 @@ public String build(String cluster) throws Exception
* @throws Exception a {@link java.lang.Exception} object.
* @return a {@link org.hpccsystems.ws.client.wrappers.ArrayOfXRefFileWrapper} object.
*/
- public ArrayOfXRefFileWrapper foundFiles(String cluster) throws Exception
+ @WithSpan
+ public ArrayOfXRefFileWrapper foundFiles(@SpanAttribute String cluster) throws Exception
{
if (isTargetHPCCContainerized())
throw new HpccContainerizedUnsupportedException("HPCCWsDFUXRefClient.foundFiles not supported in CONTAINERIZED mode");
@@ -587,7 +595,8 @@ public ArrayOfXRefFileWrapper foundFiles(String cluster) throws Exception
* @throws Exception a {@link java.lang.Exception} object.
* @return a {@link org.hpccsystems.ws.client.wrappers.ArrayOfXRefMessageWrapper} object.
*/
- public ArrayOfXRefMessageWrapper messages(String cluster) throws Exception
+ @WithSpan
+ public ArrayOfXRefMessageWrapper messages(@SpanAttribute String cluster) throws Exception
{
if (isTargetHPCCContainerized())
throw new HpccContainerizedUnsupportedException("HPCCWsDFUXRefClient.messages not supported in CONTAINERIZED mode");
@@ -617,6 +626,7 @@ public ArrayOfXRefMessageWrapper messages(String cluster) throws Exception
* @throws Exception a {@link java.lang.Exception} object.
* @return a {@link org.hpccsystems.ws.client.wrappers.ArrayOfXRefNodeWrapper} object.
*/
+ @WithSpan
public ArrayOfXRefNodeWrapper list() throws Exception
{
if (isTargetHPCCContainerized())
diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsFileIOClient.java b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsFileIOClient.java
index 62282ae58..93fae496b 100644
--- a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsFileIOClient.java
+++ b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsFileIOClient.java
@@ -26,6 +26,9 @@
import org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper;
import org.hpccsystems.ws.client.wrappers.EspSoapFaultWrapper;
+import io.opentelemetry.instrumentation.annotations.SpanAttribute;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
/**
* Facilitates File I/O actions on target HPCC instance.
*
@@ -270,7 +273,8 @@ public boolean createHPCCFile(String fileName, String targetLandingZone, boolean
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public boolean createHPCCFile(String fileName, String targetLandingZone, boolean overwritefile, String lzAddress) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public boolean createHPCCFile(@SpanAttribute String fileName, @SpanAttribute String targetLandingZone, boolean overwritefile,@SpanAttribute String lzAddress) throws Exception, ArrayOfEspExceptionWrapper
{
boolean success = false;
log.debug("Attempting to create HPCC File: " + fileName);
@@ -338,7 +342,9 @@ public boolean createHPCCFile(String fileName, String targetLandingZone, boolean
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public boolean writeHPCCFileData(byte[] data, String fileName, String targetLandingZone, boolean append, long offset, int uploadchunksize, String lzAddress)
+ @WithSpan
+ public boolean writeHPCCFileData(byte[] data, @SpanAttribute String fileName, @SpanAttribute String targetLandingZone,
+ @SpanAttribute boolean append, @SpanAttribute long offset, @SpanAttribute int uploadchunksize, @SpanAttribute String lzAddress)
throws Exception, ArrayOfEspExceptionWrapper
{
boolean success = true;
@@ -452,7 +458,9 @@ public boolean writeHPCCFileData(byte[] data, String fileName, String targetLand
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public String readFileData(String dropzone, String fileName, long datasize, long offset, String dropzoneAddress) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public String readFileData(@SpanAttribute String dropzone,@SpanAttribute String fileName,@SpanAttribute long datasize,
+ @SpanAttribute long offset, @SpanAttribute String dropzoneAddress) throws Exception, ArrayOfEspExceptionWrapper
{
ReadFileDataRequest readFileDataRequest = new ReadFileDataRequest();
readFileDataRequest.setDestDropZone(dropzone);
diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsPackageProcessClient.java b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsPackageProcessClient.java
index 6ce867401..99fb0a26f 100644
--- a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsPackageProcessClient.java
+++ b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsPackageProcessClient.java
@@ -36,6 +36,9 @@
import org.hpccsystems.ws.client.wrappers.gen.wspackageprocess.BasePackageStatusWrapper;
import org.hpccsystems.ws.client.wrappers.gen.wspackageprocess.DeletePackageRequestWrapper;
import org.hpccsystems.ws.client.wrappers.gen.wspackageprocess.PackageListMapDataWrapper;
+
+import io.opentelemetry.instrumentation.annotations.SpanAttribute;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
/**
* Use as soap client for HPCC wsPackageProcess web service.
* This includes creating a new file, and appending data to a file in the given SHPCC System.
@@ -575,7 +578,8 @@ public String getPackageMapById(String packageMapName) throws Exception, ArrayOf
* @throws ArrayOfEspExceptionWrapper a {@link org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper} object.
* the array of esp exception wrapper
*/
- public BasePackageStatusWrapper activatePackage(boolean globalScope, String packageMapName, String process, String target)
+ @WithSpan
+ public BasePackageStatusWrapper activatePackage(@SpanAttribute boolean globalScope, @SpanAttribute String packageMapName, @SpanAttribute String process, @SpanAttribute String target)
throws Exception, ArrayOfEspExceptionWrapper
{
log.debug("Attempting to activate package: " + packageMapName);
@@ -626,7 +630,8 @@ public BasePackageStatusWrapper activatePackage(boolean globalScope, String pack
* @throws ArrayOfEspExceptionWrapper a {@link org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper} object.
* the array of esp exception wrapper
*/
- public BasePackageStatusWrapper getPackage(String process, String target) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public BasePackageStatusWrapper getPackage(@SpanAttribute String process, @SpanAttribute String target) throws Exception, ArrayOfEspExceptionWrapper
{
log.debug("Attempting to fetch package process: " + process + " target: " + target);
@@ -677,7 +682,8 @@ public BasePackageStatusWrapper getPackage(String process, String target) throws
* @throws Exception a {@link java.lang.Exception} object.
* - Caller should handle exception in case of errors
*/
- public BasePackageStatusWrapper removePartFromPackageMap(final boolean globalScope, final String partName, final String target, final String packageMap)
+ @WithSpan
+ public BasePackageStatusWrapper removePartFromPackageMap(@SpanAttribute final boolean globalScope, final String partName, final String target, final String packageMap)
throws Exception
{
log.debug("Attempting to remove package part.");
diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsResourcesClient.java b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsResourcesClient.java
index 0056a23f3..c81067630 100644
--- a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsResourcesClient.java
+++ b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsResourcesClient.java
@@ -40,6 +40,8 @@ HPCC SYSTEMS software Copyright (C) 2021 HPCC Systems®.
import org.hpccsystems.ws.client.wrappers.gen.wsresources.WebLinksQueryRequestWrapper;
import org.hpccsystems.ws.client.wrappers.gen.wsresources.WebLinksQueryResponseWrapper;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
/**
* Facilitates discovery of containerized HPCC Systems resources.
@@ -235,6 +237,7 @@ protected void initWsResourcesClientStub(Connection conn)
* {@link org.hpccsystems.ws.client.wrappers.gen.wsresources.ServiceQueryResponseWrapper}
* object.
*/
+ @WithSpan
public ServiceQueryResponseWrapper serviceQuery(ServiceQueryRequestWrapper req) throws Exception
{
if (req == null)
@@ -273,6 +276,7 @@ public ServiceQueryResponseWrapper serviceQuery(ServiceQueryRequestWrapper req)
* {@link org.hpccsystems.ws.client.wrappers.gen.wsresources.TargetQueryResponseWrapper}
* object.
*/
+ @WithSpan
public TargetQueryResponseWrapper targetQuery(TargetQueryRequestWrapper req) throws Exception
{
if (req == null)
@@ -311,6 +315,7 @@ public TargetQueryResponseWrapper targetQuery(TargetQueryRequestWrapper req) thr
* {@link org.hpccsystems.ws.client.wrappers.gen.wsresources.WebLinksQueryResponseWrapper}
* object.
*/
+ @WithSpan
public WebLinksQueryResponseWrapper webLinks(WebLinksQueryRequestWrapper req) throws Exception
{
if (req == null)
diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsSMCClient.java b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsSMCClient.java
index 777f4f80d..7b52e0189 100644
--- a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsSMCClient.java
+++ b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsSMCClient.java
@@ -35,6 +35,8 @@ HPCC SYSTEMS software Copyright (C) 2021 HPCC Systems®.
import org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper;
import org.hpccsystems.ws.client.wrappers.gen.wssmc.GetBuildInfoResponseWrapper;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
/**
* Use as soap client for HPCC WsSMC web service, also known as eclwatch
*/
@@ -209,6 +211,7 @@ private void initWsSMCSoapProxy(Connection conn)
* @throws java.lang.Exception
* the exception
*/
+ @WithSpan
public String getHPCCBuild() throws Exception
{
String build = null;
@@ -252,6 +255,7 @@ public String getHPCCBuild() throws Exception
* @throws java.lang.Exception
* the exception
*/
+ @WithSpan
public boolean isContainerized() throws Exception
{
verifyStub();
@@ -297,6 +301,7 @@ public boolean isContainerized() throws Exception
* @throws java.lang.Exception
* the exception
*/
+ @WithSpan
public GetBuildInfoResponseWrapper getBuildInfo() throws Exception
{
verifyStub();
diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsSQLClient.java b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsSQLClient.java
index 832f03ad7..a226c8d0a 100644
--- a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsSQLClient.java
+++ b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsSQLClient.java
@@ -44,6 +44,9 @@
import org.hpccsystems.ws.client.wrappers.gen.wssql.HPCCTableWrapper;
import org.hpccsystems.ws.client.wrappers.gen.wssql.NamedValueWrapper;
+import io.opentelemetry.instrumentation.annotations.SpanAttribute;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
/**
* Facilitates SQL based action onto target HPCC Systems instance.
*
@@ -274,7 +277,8 @@ public boolean isWsSQLReachable()
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public String[] getTargetClusters(String filter) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public String[] getTargetClusters(@SpanAttribute String filter) throws Exception, ArrayOfEspExceptionWrapper
{
verifyStub();
@@ -314,7 +318,8 @@ public String[] getTargetClusters(String filter) throws Exception, ArrayOfEspExc
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public HPCCTableWrapper[] getTables(String filter) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public HPCCTableWrapper[] getTables(@SpanAttribute String filter) throws Exception, ArrayOfEspExceptionWrapper
{
verifyStub();
@@ -368,7 +373,8 @@ public HPCCTableWrapper[] getTables(String filter) throws Exception, ArrayOfEspE
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public HPCCQuerySetWrapper[] getStoredProcedures(String querysetname) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public HPCCQuerySetWrapper[] getStoredProcedures(@SpanAttribute String querysetname) throws Exception, ArrayOfEspExceptionWrapper
{
verifyStub();
@@ -529,7 +535,8 @@ public String executeSQLWUIDResponse(String sqlText, String targetCluster, Strin
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfECLExceptionWrapper
* the array of ECL exception wrapper
*/
- public ExecuteSQLResponseWrapper executeSQLFullResponse(String sqlText, String targetCluster, String targetQuerySet, Integer resultLimit,
+ @WithSpan
+ public ExecuteSQLResponseWrapper executeSQLFullResponse(String sqlText,@SpanAttribute String targetCluster,@SpanAttribute String targetQuerySet, Integer resultLimit,
Integer resultWindowCount, Integer resultWindowStart, Boolean suppressResults, Boolean suppressXmlSchema, String userName, Integer wait)
throws Exception, ArrayOfEspExceptionWrapper, ArrayOfECLExceptionWrapper
{
@@ -664,7 +671,8 @@ public List> getResults(String wuid, Integer resultWindowStart, Int
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfECLExceptionWrapper
* the array of ECL exception wrapper
*/
- public GetResultsResponseWrapper getResultResponse(String wuid, Integer resultWindowStart, Integer resultWindowCount, Boolean suppressXmlSchema)
+ @WithSpan
+ public GetResultsResponseWrapper getResultResponse(@SpanAttribute String wuid, Integer resultWindowStart, Integer resultWindowCount, Boolean suppressXmlSchema)
throws Exception, ArrayOfEspExceptionWrapper, ArrayOfECLExceptionWrapper
{
verifyStub();
@@ -763,7 +771,8 @@ public List> getResultSchema(String wuid) throws Exception, ArrayOf
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfECLExceptionWrapper
* the array of ECL exception wrapper
*/
- public ECLWorkunitWrapper prepareSQL(String sqlText, String targetCluster, String targetQuerySet, Integer wait)
+ @WithSpan
+ public ECLWorkunitWrapper prepareSQL(String sqlText, @SpanAttribute String targetCluster, @SpanAttribute String targetQuerySet, Integer wait)
throws Exception, ArrayOfEspExceptionWrapper, ArrayOfECLExceptionWrapper
{
verifyStub();
@@ -900,7 +909,8 @@ public List> executePreparedSQL(String wuid, String targetCluster,
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfECLExceptionWrapper
* the array of ECL exception wrapper
*/
- public ExecutePreparedSQLResponseWrapper executePreparedSQL(String wuid, String targetCluster, NamedValueWrapper [] variables, Integer wait,
+ @WithSpan
+ public ExecutePreparedSQLResponseWrapper executePreparedSQL(@SpanAttribute String wuid, @SpanAttribute String targetCluster, NamedValueWrapper [] variables, Integer wait,
Integer resultLimit, Integer resultWindowStart, Integer resultWindowCount, String userName, Boolean suppressXmlSchema,
Boolean suppressResults) throws Exception, ArrayOfEspExceptionWrapper, ArrayOfECLExceptionWrapper
{
diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsStoreClient.java b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsStoreClient.java
index c110c99e2..b2f671efa 100644
--- a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsStoreClient.java
+++ b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsStoreClient.java
@@ -39,6 +39,11 @@
import org.hpccsystems.ws.client.utils.Connection;
import org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper;
+import io.opentelemetry.instrumentation.annotations.SpanAttribute;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
+//import io.opentelemetry.instrumentation.annotations.WithSpan;
+
/**
* Facilitates access to HPCC Systems key/value based Storage.
*
@@ -249,7 +254,8 @@ public boolean ping() throws Exception
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public String[] listNamespaces(String storename, boolean global) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public String[] listNamespaces(@SpanAttribute String storename,@SpanAttribute boolean global) throws Exception, ArrayOfEspExceptionWrapper
{
String namespaces[] = null;
ListNamespacesRequest request = new ListNamespacesRequest();
@@ -293,7 +299,8 @@ public String[] listNamespaces(String storename, boolean global) throws Exceptio
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public String[] listNSKeys(String storename, String namespace, boolean global) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public String[] listNSKeys(@SpanAttribute String storename, @SpanAttribute String namespace,@SpanAttribute boolean global) throws Exception, ArrayOfEspExceptionWrapper
{
String keyset[] = null;
ListKeysRequest request = new ListKeysRequest();
@@ -340,7 +347,8 @@ public String[] listNSKeys(String storename, String namespace, boolean global) t
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public String fetchValue(String storename, String namespace, String key, boolean global) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public String fetchValue(@SpanAttribute String storename,@SpanAttribute String namespace,@SpanAttribute String key,@SpanAttribute boolean global) throws Exception, ArrayOfEspExceptionWrapper
{
String value = null;
@@ -391,7 +399,8 @@ public String fetchValue(String storename, String namespace, String key, boolean
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public String fetchValueEncrypted(String storename, String namespace, String key, boolean global, Cipher cipher)
+ @WithSpan
+ public String fetchValueEncrypted(@SpanAttribute String storename,@SpanAttribute String namespace,@SpanAttribute String key, boolean global, Cipher cipher)
throws Exception, ArrayOfEspExceptionWrapper
{
String value = fetchValue(storename, namespace, key, global);
@@ -450,7 +459,8 @@ public String fetchValueEncrypted(String storename, String namespace, String key
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public Properties fetchKeyMetaData(String storename, String namespace, String key, boolean global) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public Properties fetchKeyMetaData(@SpanAttribute String storename, @SpanAttribute String namespace, @SpanAttribute String key, @SpanAttribute boolean global) throws Exception, ArrayOfEspExceptionWrapper
{
Properties props = new Properties();
@@ -503,7 +513,8 @@ public Properties fetchKeyMetaData(String storename, String namespace, String ke
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public Properties fetchAllNSKeys(String storename, String namespace, boolean global) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public Properties fetchAllNSKeys(@SpanAttribute String storename, @SpanAttribute String namespace, @SpanAttribute boolean global) throws Exception, ArrayOfEspExceptionWrapper
{
Properties props = new Properties();
@@ -560,7 +571,8 @@ public Properties fetchAllNSKeys(String storename, String namespace, boolean glo
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public boolean setValue(String storename, String namespace, String key, String value, boolean global) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public boolean setValue(@SpanAttribute String storename, @SpanAttribute String namespace, @SpanAttribute String key, String value, @SpanAttribute boolean global) throws Exception, ArrayOfEspExceptionWrapper
{
SetRequest request = new SetRequest();
request.setStoreName(storename);
@@ -660,7 +672,8 @@ public boolean setValueEncrypted(String storename, String namespace, String key,
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public boolean deleteValue(String storename, String namespace, String key, boolean global) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public boolean deleteValue(@SpanAttribute String storename, @SpanAttribute String namespace, @SpanAttribute String key, @SpanAttribute boolean global) throws Exception, ArrayOfEspExceptionWrapper
{
DeleteRequest request = new DeleteRequest();
request.setStoreName(storename);
@@ -705,7 +718,8 @@ public boolean deleteValue(String storename, String namespace, String key, boole
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public boolean deleteNamespace(String storename, String namespace, boolean global, String targetuser) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public boolean deleteNamespace(@SpanAttribute String storename, @SpanAttribute String namespace, @SpanAttribute boolean global, @SpanAttribute String targetuser) throws Exception, ArrayOfEspExceptionWrapper
{
DeleteNamespaceRequest request = new DeleteNamespaceRequest();
request.setStoreName(storename);
@@ -749,7 +763,8 @@ public boolean deleteNamespace(String storename, String namespace, boolean globa
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public boolean createStore(String storename, String description, String type) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public boolean createStore(@SpanAttribute String storename, @SpanAttribute String description, @SpanAttribute String type) throws Exception, ArrayOfEspExceptionWrapper
{
CreateStoreRequest request = new CreateStoreRequest();
request.setName(storename);
diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsTopologyClient.java b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsTopologyClient.java
index f01883489..8b6a3bfef 100644
--- a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsTopologyClient.java
+++ b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsTopologyClient.java
@@ -47,6 +47,9 @@
import org.hpccsystems.ws.client.wrappers.gen.wstopology.TpServicesWrapper;
import org.hpccsystems.ws.client.wrappers.gen.wstopology.TpTargetClusterWrapper;
+import io.opentelemetry.instrumentation.annotations.SpanAttribute;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
/**
* Facilitates accessing HPCC Systems instance topology information.
*
@@ -297,7 +300,8 @@ public List getTopologyGroups(TopologyGroupQueryKind kind) throw
* @throws HpccContainerizedUnsupportedException if kind not provided while targeting baremetal HPCC environment
* @throws Exception if error encountered
*/
- public List getTopologyGroups(String kind) throws HpccContainerizedUnsupportedException, Exception
+ @WithSpan
+ public List getTopologyGroups(@SpanAttribute String kind) throws HpccContainerizedUnsupportedException, Exception
{
if (kind == null || kind.isEmpty())
{
@@ -350,6 +354,7 @@ public List getTopologyGroups(String kind) throws HpccContaineri
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
+ @WithSpan
public boolean printValidTargetClusters(PrintStream stream) throws Exception, ArrayOfEspExceptionWrapper
{
boolean success = false;
@@ -408,6 +413,7 @@ public boolean printValidTargetClusters(PrintStream stream) throws Exception, Ar
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
+ @WithSpan
public List getValidTargetGroups() throws Exception, ArrayOfEspExceptionWrapper
{
List tpTargetClusters = null;
@@ -449,6 +455,7 @@ public List getValidTargetGroups() throws Exception, Arr
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
+ @WithSpan
public String[] getValidTargetGroupNames() throws Exception, ArrayOfEspExceptionWrapper
{
if (isTargetHPCCContainerized())
@@ -519,7 +526,8 @@ public TpDropZoneWrapper queryDropzone(String name) throws Exception, ArrayOfEsp
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public List queryDropzones(String namefilter) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public List queryDropzones(@SpanAttribute String namefilter) throws Exception, ArrayOfEspExceptionWrapper
{
verifyStub(); // Throws exception if stub failed
@@ -573,7 +581,8 @@ public List queryDropzoneMachines(String name) throws Exceptio
* @throws Exception
* the exception
*/
- private String[] extractClusterNames(String clusterGroupType, boolean targetClusterNamesOnly) throws Exception
+ @WithSpan
+ private String[] extractClusterNames(@SpanAttribute String clusterGroupType, @SpanAttribute boolean targetClusterNamesOnly) throws Exception
{
List tpClusterNames = new ArrayList();
@@ -712,6 +721,7 @@ public List getValidTargetClusterNames() throws Exception, ArrayOfEspExc
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
+ @WithSpan
public TpServicesWrapper getServices() throws Exception, ArrayOfEspExceptionWrapper
{
if (isTargetHPCCContainerized())
@@ -751,7 +761,8 @@ public TpServicesWrapper getServices() throws Exception, ArrayOfEspExceptionWrap
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public TpClusterInfoResponseWrapper getClusterInfo(String clusterName) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public TpClusterInfoResponseWrapper getClusterInfo(@SpanAttribute String clusterName) throws Exception, ArrayOfEspExceptionWrapper
{
if (isTargetHPCCContainerized())
throw new HpccContainerizedUnsupportedException("getClusterInfo: WsTopology.tpClusterInfo() not supported in CONTAINERIZED mode");
@@ -788,6 +799,7 @@ public TpClusterInfoResponseWrapper getClusterInfo(String clusterName) throws Ex
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
+ @WithSpan
public List getLogicalClusters() throws Exception, ArrayOfEspExceptionWrapper
{
verifyStub(); // Throws exception if stub failed
diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsWorkUnitsClient.java b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsWorkUnitsClient.java
index 92a27d690..90e4686bc 100644
--- a/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsWorkUnitsClient.java
+++ b/wsclient/src/main/java/org/hpccsystems/ws/client/HPCCWsWorkUnitsClient.java
@@ -102,7 +102,10 @@
import io.opentelemetry.api.trace.Span;
import io.opentelemetry.api.trace.StatusCode;
+import io.opentelemetry.context.Context;
import io.opentelemetry.context.Scope;
+import io.opentelemetry.instrumentation.annotations.SpanAttribute;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
/**
* Facilitates ECL WorkUnit related actions.
@@ -717,6 +720,7 @@ public WUPublishWorkunitResponse publishWU(WorkunitWrapper wu) throws Exception,
return publishWUWrapped(wu).getRaw();
}
+ @WithSpan
public WUPublishWorkunitResponseWrapper publishWUWrapped(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper
{
WUPublishWorkunitResponse publishWUResp = null;
@@ -753,6 +757,7 @@ public WUPublishWorkunitResponseWrapper publishWUWrapped(WorkunitWrapper wu) thr
* @throws java.lang.Exception
* the exception
*/
+ @WithSpan
public void publishWU(String wuid) throws Exception
{
if (wuid == null || wuid.isEmpty())
@@ -798,6 +803,7 @@ public void publishWU(String wuid) throws Exception
* @throws ArrayOfEspExceptionWrapper a {@link org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper} object.
* the array of esp exception wrapper
*/
+ @WithSpan
public WorkunitWrapper getWUInfo(WUInfoRequestWrapper wuinfodetailsparams) throws Exception, ArrayOfEspExceptionWrapper
{
WorkunitWrapper workunit = null;
@@ -863,6 +869,7 @@ public WorkunitWrapper getWUInfo(String wuid) throws Exception, ArrayOfEspExcept
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
+ @WithSpan
public WorkunitWrapper getWUInfo(String wuid, boolean unarchive) throws Exception, ArrayOfEspExceptionWrapper
{
WUInfoRequestWrapper wuinfodetailsparams = new WUInfoRequestWrapper();
@@ -1066,6 +1073,7 @@ public boolean testWUQuery() throws Exception
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
+ @WithSpan
public List workUnitUQuery(String wuid, String jobname, String cluster, Boolean archived, WUQueryWrapper.SortBy sortby,
WUState state, Date endDate, Date startDate, Long pageStartFrom, Long pageSize, String owner,
List applicationValues) throws Exception, ArrayOfEspExceptionWrapper
@@ -1101,6 +1109,7 @@ public List workUnitUQuery(String wuid, String jobname, String
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
+ @WithSpan
public List workUnitUQuery(WUQueryWrapper info) throws Exception, ArrayOfEspExceptionWrapper
{
verifyStub(); // Throws exception if stub failed
@@ -1220,6 +1229,7 @@ public boolean doesWUContainErrors(String wuid) throws Exception, ArrayOfEspExce
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
+ @WithSpan
public WorkunitWrapper createWUFromECL(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper
{
WorkunitWrapper createdWU = null;
@@ -1307,6 +1317,7 @@ public WorkunitWrapper createWUFromECL(String archiveOrEcl, int resultLimit, Lis
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
+ @WithSpan
public List getWorkunits(String jobName, String owner, String ecl, Boolean archived, String wuid, String cluster, WUState state)
throws Exception, ArrayOfEspExceptionWrapper
{
@@ -1351,6 +1362,7 @@ public List getWorkunits(WUQueryWrapper params) throws Exceptio
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfECLExceptionWrapper
* the array of ECL exception wrapper
*/
+ @WithSpan
public WorkunitWrapper compileWUFromECL(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper, ArrayOfECLExceptionWrapper
{
Integer sleeptime = wu.getSleepMillis();
@@ -1394,6 +1406,7 @@ public WorkunitWrapper compileWUFromECL(WorkunitWrapper wu) throws Exception, Ar
* @param wusubmitwrapper a {@link org.hpccsystems.ws.client.wrappers.wsworkunits.WUSubmitWrapper} object.
* @throws Exception a {@link java.lang.Exception} object.
*/
+ @WithSpan
public void submitWU(WUSubmitWrapper wusubmitwrapper) throws Exception
{
if (wusubmitwrapper == null)
@@ -1446,6 +1459,7 @@ public void submitWU(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWr
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
+ @WithSpan
public void submitWU(String wuid, String cluster) throws Exception, ArrayOfEspExceptionWrapper
{
verifyStub(); // Throws exception if stub failed
@@ -1488,6 +1502,7 @@ public void submitWU(String wuid, String cluster) throws Exception, ArrayOfEspEx
* the array of ECL exception wrapper
* @deprecated use createAndRunWUFromECLWrapped
*/
+ @WithSpan
public WURunResponse createAndRunWUFromECL(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper, ArrayOfECLExceptionWrapper
{
return createAndRunWUFromECLWrapped(wu).getRaw();
@@ -1506,6 +1521,7 @@ public WURunResponse createAndRunWUFromECL(WorkunitWrapper wu) throws Exception,
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfECLExceptionWrapper
* the array of ECL exception wrapper
*/
+ @WithSpan
public WURunResponseWrapper createAndRunWUFromECLWrapped(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper, ArrayOfECLExceptionWrapper
{
WURunResponse wuRunResponse = null;
@@ -1565,6 +1581,7 @@ public WURunResponseWrapper createAndRunWUFromECLWrapped(WorkunitWrapper wu) thr
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfECLExceptionWrapper
* the array of ECL exception wrapper
*/
+ @WithSpan
public String createAndRunWUFromECLAndGetResults(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper, ArrayOfECLExceptionWrapper
{
WURunResponse createAndRunWUFromECL = createAndRunWUFromECL(wu);
@@ -1585,6 +1602,7 @@ public String createAndRunWUFromECLAndGetResults(WorkunitWrapper wu) throws Exce
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfECLExceptionWrapper
* the array of ECL exception wrapper
*/
+ @WithSpan
public String createAndRunWUFromECLAndGetWUID(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper, ArrayOfECLExceptionWrapper
{
WURunResponse createAndRunWUFromECL = createAndRunWUFromECL(wu);
@@ -1612,6 +1630,7 @@ public String createAndRunWUFromECLAndGetWUID(WorkunitWrapper wu) throws Excepti
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
+ @WithSpan
public String fetchResultsFromLogicalName(String logicalName, int sequence, String cluster, boolean suppressXMLShema, long resultOffset,
int resultCount) throws Exception, ArrayOfEspExceptionWrapper
{
@@ -1644,6 +1663,7 @@ public String fetchResultsFromLogicalName(String logicalName, int sequence, Stri
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
+ @WithSpan
public String fetchResults(String wuid, int sequence, String cluster, boolean suppressXMLShema, long resultOffset, int resultCount)
throws Exception, ArrayOfEspExceptionWrapper
{
@@ -1676,6 +1696,7 @@ public String fetchResults(String wuid, int sequence, String cluster, boolean su
* @throws java.lang.Exception
* the exception
*/
+ @WithSpan
public WUResultResponse fetchRawResults(String wuidorlogicalname, boolean useWuid, int sequence, String cluster, boolean suppressXMLShema,
long resultOffset, int resultCount) throws Exception
{
@@ -1735,6 +1756,7 @@ public static boolean looksLikeAWuid(String wuid)
* @throws java.lang.Exception
* the exception
*/
+ @WithSpan
public WUResultResponse fetchRawResults(WUResult parameters) throws Exception
{
verifyStub(); // Throws exception if stub failed
@@ -1776,6 +1798,7 @@ private void refreshWU(boolean full, WorkunitWrapper wu) throws Exception, Array
* @throws ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
+ @WithSpan
private void monitorWUToCompletion(WorkunitWrapper wu) throws Exception, ArrayOfEspExceptionWrapper
{
int timerTickCount = 0;
@@ -1837,6 +1860,7 @@ else if (timerTickCount < 120 && timerTickCount % 30 == 0)
* @throws java.lang.Exception
* the exception
*/
+ @WithSpan
public ArrayOfECLExceptionWrapper syntaxCheckECL(String ecl, String cluster, Integer timeout) throws Exception
{
verifyStub(); // Throws exception if stub failed
@@ -1868,6 +1892,7 @@ public ArrayOfECLExceptionWrapper syntaxCheckECL(String ecl, String cluster, Int
* @throws java.lang.Exception
* the exception
*/
+ @WithSpan
public WUQuerySetDetailsResponse getQueriesDetail(String querySetName, String clusterName, String filter) throws Exception
{
verifyStub(); // Throws exception if stub failed
@@ -1888,7 +1913,8 @@ public WUQuerySetDetailsResponse getQueriesDetail(String querySetName, String cl
* @throws java.lang.Exception
* the exception
*/
- public void abortWU(String wuid) throws Exception
+ @WithSpan
+ public void abortWU(@SpanAttribute String wuid) throws Exception
{
verifyStub(); // Throws exception if stub failed
@@ -1910,7 +1936,8 @@ public void abortWU(String wuid) throws Exception
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public void deleteWU(String wuid) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public void deleteWU(@SpanAttribute String wuid) throws Exception, ArrayOfEspExceptionWrapper
{
verifyStub(); // Throws exception if stub failed
@@ -1937,7 +1964,8 @@ public void deleteWU(String wuid) throws Exception, ArrayOfEspExceptionWrapper
* @throws java.lang.Exception
* the exception
*/
- public void resubmitWU(String wuid, boolean restart, boolean clone) throws Exception
+ @WithSpan
+ public void resubmitWU(@SpanAttribute String wuid, @SpanAttribute boolean restart, @SpanAttribute boolean clone) throws Exception
{
verifyStub(); // Throws exception if stub failed
@@ -1958,6 +1986,7 @@ public void resubmitWU(String wuid, boolean restart, boolean clone) throws Excep
* @throws java.lang.Exception
* the exception
*/
+ @WithSpan
public QuerySet[] getQuerySets() throws Exception
{
verifyStub(); // Throws exception if stub failed
@@ -2002,7 +2031,8 @@ public WUResultResponse getWorkunitResult(WUResult wur) throws Exception, ArrayO
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public String getWorkunitResult(String wuid, String resultname) throws Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public String getWorkunitResult(@SpanAttribute String wuid, @SpanAttribute String resultname) throws Exception, ArrayOfEspExceptionWrapper
{
WUResult params = new WUResult();
params.setWuid(wuid);
@@ -2033,6 +2063,7 @@ public String getWorkunitResult(String wuid, String resultname) throws Exception
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
+ @WithSpan
public WUResultResponse getWorkunitResult(WUResult wur, boolean unarchive) throws Exception, ArrayOfEspExceptionWrapper
{
// get the object first to make sure it's not archived
@@ -2061,7 +2092,8 @@ public WUResultResponse getWorkunitResult(WUResult wur, boolean unarchive) throw
* @throws org.hpccsystems.ws.client.wrappers.ArrayOfEspExceptionWrapper
* the array of esp exception wrapper
*/
- public boolean doWorkunitAction(String wuid, ECLWUActions action) throws RemoteException, Exception, ArrayOfEspExceptionWrapper
+ @WithSpan
+ public boolean doWorkunitAction(@SpanAttribute String wuid, @SpanAttribute ECLWUActions action) throws RemoteException, Exception, ArrayOfEspExceptionWrapper
{
verifyStub(); // Throws exception if stub failed
@@ -2139,6 +2171,7 @@ private String getEclWatchUrl() throws Exception
* @throws java.lang.Exception
* the exception
*/
+ @WithSpan
public WorkunitWrapper createWorkunit() throws Exception
{
WUCreateRequestWrapper params = new WUCreateRequestWrapper();
@@ -2159,6 +2192,7 @@ public WorkunitWrapper createWorkunit() throws Exception
* @throws java.lang.Exception
* the exception
*/
+ @WithSpan
public WorkunitWrapper protectWorkunit(String wuid) throws Exception
{
final WUUpdateRequestWrapper params = new WUUpdateRequestWrapper();
@@ -2191,7 +2225,8 @@ public WorkunitWrapper protectWorkunit(String wuid) throws Exception
* @throws java.lang.Exception
* the exception
*/
- public WULogFileWrapper getWorkunitFile(String wuid, String filename, WUFileType filetype, String description, String ipaddr, boolean entirefile)
+ @WithSpan
+ public WULogFileWrapper getWorkunitFile(@SpanAttribute String wuid, @SpanAttribute String filename, WUFileType filetype, String description, String ipaddr, boolean entirefile)
throws Exception
{
WUFile file = new WUFile();
@@ -2230,8 +2265,9 @@ public WULogFileWrapper getWorkunitFile(String wuid, String filename, WUFileType
* @throws java.lang.Exception
* the exception
*/
- public WorkunitWrapper runWorkunit(String wuid, HashMap namedvalues, HashMap appvalues, Integer timeout,
- Boolean cloneWorkunit, String appsource) throws Exception
+ @WithSpan
+ public WorkunitWrapper runWorkunit(@SpanAttribute String wuid, HashMap namedvalues, HashMap appvalues, Integer timeout,
+ @SpanAttribute Boolean cloneWorkunit, String appsource) throws Exception
{
WURun params = new WURun();
params.setWuid(wuid);
@@ -2304,7 +2340,8 @@ public WorkunitWrapper runWorkunit(String wuid, HashMap namedval
* @throws java.lang.Exception
* the exception
*/
- public List searchQueries(QuerySetFilterType filtertype, String filtervalue, String querySetName, String clustername)
+ @WithSpan
+ public List searchQueries(QuerySetFilterType filtertype, @SpanAttribute String filtervalue, @SpanAttribute String querySetName, @SpanAttribute String clustername)
throws Exception
{
final WUQuerysetDetails params = new WUQuerysetDetails();
@@ -2362,8 +2399,9 @@ public List searchQueries(QuerySetFilterType filtertype, Str
* @throws java.lang.Exception
* the exception
*/
- public List listQueries(String queryid, String queryname, String clustername, String querysetname, Integer pageSize,
- Integer pageStartFrom, Boolean activated, String filename, Boolean descending) throws Exception
+ @WithSpan
+ public List listQueries(@SpanAttribute String queryid, @SpanAttribute String queryname,@SpanAttribute String clustername, @SpanAttribute String querysetname,@SpanAttribute Integer pageSize,
+ @SpanAttribute Integer pageStartFrom, @SpanAttribute Boolean activated, @SpanAttribute String filename, @SpanAttribute Boolean descending) throws Exception
{
final WUListQueries params = new WUListQueries();
if (pageSize != null)
@@ -2425,7 +2463,8 @@ public List listQueries(String queryid, String queryname, St
* @throws java.lang.Exception
* the exception
*/
- public List getQueryFiles(String queryname, String cluster) throws Exception
+ @WithSpan
+ public List getQueryFiles(@SpanAttribute String queryname, @SpanAttribute String cluster) throws Exception
{
final WUQueryFiles request = new WUQueryFiles();
request.setTarget(cluster);
@@ -2462,7 +2501,8 @@ public List getQueryFiles(String queryname, String cluster) th
* @throws java.lang.Exception
* the exception
*/
- public QueryResultWrapper activateQuery(String queryId, String cluster) throws Exception
+ @WithSpan
+ public QueryResultWrapper activateQuery(@SpanAttribute String queryId, @SpanAttribute String cluster) throws Exception
{
final WUQuerysetQueryAction queryAction = new WUQuerysetQueryAction();
queryAction.setAction(QuerySetQueryActionTypes.Activate);
@@ -2505,7 +2545,8 @@ public QueryResultWrapper activateQuery(String queryId, String cluster) throws E
* @throws java.lang.Exception
* the exception
*/
- public List deleteQueries(Set querynames, String cluster) throws Exception
+ @WithSpan
+ public List deleteQueries(@SpanAttribute Set querynames, @SpanAttribute String cluster) throws Exception
{
verifyStub(); // Throws exception if stub failed
@@ -2553,29 +2594,20 @@ public List deleteQueries(Set querynames, String clu
* @throws java.lang.Exception
* the exception
*/
+ @WithSpan
public boolean ping() throws Exception
{
- Span span = getWsClientSpanBuilder("WsWUClient_Ping").startSpan();
- try (Scope scope = span.makeCurrent())
- {
- verifyStub(); // must be called within span scope for proper context propagation
+ verifyStub(); // must be called within span scope for proper context propagation
- Ping request = new Ping();
- try
- {
- ((WsWorkunitsStub) stub).ping(request);
- span.setStatus(StatusCode.OK);
- }
- catch (Exception e)
- {
- span.recordException(e);
- log.error(e.getLocalizedMessage());
- return false;
- }
+ Ping request = new Ping();
+ try
+ {
+ ((WsWorkunitsStub) stub).ping(request);
}
- finally
+ catch (Exception e)
{
- span.end();
+ log.error(e.getLocalizedMessage());
+ return false;
}
return true;
diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/platform/Platform.java b/wsclient/src/main/java/org/hpccsystems/ws/client/platform/Platform.java
index 6a283027d..7373a5d28 100644
--- a/wsclient/src/main/java/org/hpccsystems/ws/client/platform/Platform.java
+++ b/wsclient/src/main/java/org/hpccsystems/ws/client/platform/Platform.java
@@ -50,6 +50,8 @@
import org.hpccsystems.ws.client.wrappers.wsworkunits.WUQueryWrapper;
import org.hpccsystems.ws.client.wrappers.wsworkunits.WorkunitWrapper;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
public class Platform extends DataSingleton
{
public static final String API_ID = "org.hpccsystems.ws.client"; //$NON-NLS-1$
@@ -63,6 +65,7 @@ public class Platform extends DataSingleton
* the conn
* @return the platform
*/
+ @WithSpan
public static Platform get(Connection conn)
{
if (conn == null)
@@ -72,7 +75,7 @@ public static Platform get(Connection conn)
}
/**
- * Gets the.
+ * Gets a representation of the target HPCC Systems platform based on the connection parameter.
*
* @param protocol
* the protocol
@@ -86,6 +89,7 @@ public static Platform get(Connection conn)
* the pass
* @return the platform
*/
+ @WithSpan
public static Platform get(String protocol, String ip, int port, String user, String pass)
{
if (ip == null || ip.isEmpty() || port <= 0)
@@ -208,6 +212,7 @@ private enum SERVER_EXISTS
* @param hpccconn
* the hpccconn
*/
+ @WithSpan
protected Platform(Connection hpccconn)
{
this(hpccconn, HPCCWsClientPool.DEFAULT_EXPIRE_MILLIS);
@@ -221,6 +226,7 @@ protected Platform(Connection hpccconn)
* @param pooltimeoutmillis
* the pooltimeoutmillis
*/
+ @WithSpan
protected Platform(Connection hpccconn, long pooltimeoutmillis)
{
hpccClientPool = new HPCCWsClientPool(hpccconn, pooltimeoutmillis);
diff --git a/wsclient/src/main/java/org/hpccsystems/ws/client/utils/Connection.java b/wsclient/src/main/java/org/hpccsystems/ws/client/utils/Connection.java
index c5acac2e7..ee11305ca 100644
--- a/wsclient/src/main/java/org/hpccsystems/ws/client/utils/Connection.java
+++ b/wsclient/src/main/java/org/hpccsystems/ws/client/utils/Connection.java
@@ -24,6 +24,8 @@
import io.opentelemetry.api.trace.SpanKind;
import io.opentelemetry.api.trace.StatusCode;
import io.opentelemetry.context.Scope;
+import io.opentelemetry.instrumentation.annotations.SpanAttribute;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
import io.opentelemetry.semconv.HttpAttributes;
import io.opentelemetry.semconv.ServerAttributes;
@@ -1055,21 +1057,22 @@ public String sendGetRequest(String uri) throws Exception
* @throws Exception a {@link java.lang.Exception} object.
* @return a {@link java.lang.String} object.
*/
- public String sendHTTPRequest(String uri, String method) throws Exception
+ @WithSpan
+ public String sendHTTPRequest(@SpanAttribute String uri, @SpanAttribute String method) throws Exception
{
if (method == null || method.isEmpty())
throw new Exception ("Must provide valid HTTP method");
URL url = new URL (getBaseUrl() + (uri != null && uri.startsWith("/") ? "" : "/") + uri);
- Span sendHTTPReqSpan = GlobalOpenTelemetry.get().getTracer(BaseHPCCWsClient.PROJECT_NAME)
+ /*Span sendHTTPReqSpan = GlobalOpenTelemetry.get().getTracer(BaseHPCCWsClient.PROJECT_NAME)
.spanBuilder(method.toUpperCase() + " " + url.toExternalForm())
.setAttribute(ServerAttributes.SERVER_ADDRESS, getHost())
.setAttribute(ServerAttributes.SERVER_PORT, Long.getLong(getPort()))
.setAttribute(HttpAttributes.HTTP_REQUEST_METHOD, method)
.setSpanKind(SpanKind.CLIENT)
.startSpan();
-
+*/
HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection(); //throws IOException
Connection.log.info("Sending HTTP " + method + "Request to:" + url.toString());
@@ -1077,20 +1080,20 @@ public String sendHTTPRequest(String uri, String method) throws Exception
if (hasCredentials())
{
httpURLConnection.setRequestProperty("Authorization", getBasicAuthString());
- sendHTTPReqSpan.setAttribute("hasCredentials", true);
- }
- else
- {
- sendHTTPReqSpan.setAttribute("hasCredentials", false);
+ //sendHTTPReqSpan.setAttribute("hasCredentials", true);
}
+ //else
+ //{
+ //sendHTTPReqSpan.setAttribute("hasCredentials", false);
+ //}
- try (Scope scope = sendHTTPReqSpan.makeCurrent())
+ //try (Scope scope = sendHTTPReqSpan.makeCurrent())
{
httpURLConnection.setRequestProperty("traceparent", Utils.getCurrentSpanTraceParentHeader());
httpURLConnection.setRequestMethod(method); //throws ProtocolException
int responseCode = httpURLConnection.getResponseCode(); //throws IOException
- sendHTTPReqSpan.setAttribute("http.response.status_code", responseCode);
+ //sendHTTPReqSpan.setAttribute("http.response.status_code", responseCode);
Connection.log.info("HTTP Response code: " + responseCode);
if (responseCode == HttpURLConnection.HTTP_OK) //success
@@ -1105,18 +1108,18 @@ public String sendHTTPRequest(String uri, String method) throws Exception
}
in.close(); //throws IOException
- sendHTTPReqSpan.setStatus(StatusCode.OK);
+ // sendHTTPReqSpan.setStatus(StatusCode.OK);
return response.toString();
}
else
{
- sendHTTPReqSpan.setStatus(StatusCode.ERROR);
+ //sendHTTPReqSpan.setStatus(StatusCode.ERROR);
throw new IOException("HTTP request failed! Code (" + responseCode + ") " + httpURLConnection.getResponseMessage() );
}
}
- finally
- {
- sendHTTPReqSpan.end();
- }
+ //finally
+ //{
+ // sendHTTPReqSpan.end();
+ //}
}
}
diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/FileSprayClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/FileSprayClientTest.java
index 9b6628878..1923b02c6 100644
--- a/wsclient/src/test/java/org/hpccsystems/ws/client/FileSprayClientTest.java
+++ b/wsclient/src/test/java/org/hpccsystems/ws/client/FileSprayClientTest.java
@@ -28,6 +28,8 @@
import org.junit.Test;
import org.junit.experimental.categories.Category;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
@Category(org.hpccsystems.commons.annotations.RemoteTests.class)
public class FileSprayClientTest extends BaseRemoteTest
{
@@ -133,6 +135,7 @@ public void testBufferLength()
}
@Test
+ @WithSpan
public void testfetchDropZones()
{
try
@@ -173,6 +176,7 @@ public static DropZoneWrapper getDropzone(List dropzones, Strin
}
@Test
+ @WithSpan
public void testUploadFile()
{
File uploadFile = new File("src/test/resources/filespraytest/HPCC4J274deleteDropzoneFileTest.csv");
@@ -194,6 +198,7 @@ public void testUploadFile()
}
@Test
+ @WithSpan
public void testSprayCSV() //invalid if testUploadFile unsuccessful
{
boolean isContainerized = false;
@@ -231,6 +236,7 @@ public void testSprayCSV() //invalid if testUploadFile unsuccessful
}
@Test
+ @WithSpan
public void testDeleteDropZoneFile()
{
testUploadFile();
@@ -267,6 +273,7 @@ public void testDeleteDropZoneFile()
}
@Test
+ @WithSpan
public void testDespray()
{
boolean isContainerized = false;
@@ -300,6 +307,7 @@ public void testDespray()
}
@Test
+ @WithSpan
public void testDeleteDropZoneFileInvalidFile()
{
List badFileName = new ArrayList<>();
@@ -336,6 +344,7 @@ public void testDeleteDropZoneFileInvalidFile()
}
@Test
+ @WithSpan
public void testfetchDropZonesBadURL()
{
try
@@ -366,6 +375,7 @@ public void testESPExceptionArrayLocalMessage()
}
@Test
+ @WithSpan
public void testallparamsdzsearchwithfirstlocaldzfound()
{
try
@@ -396,6 +406,7 @@ public void testallparamsdzsearchwithfirstlocaldzfound()
}
@Test
+ @WithSpan
public void testRenameLogicalFile()
{
assumeNotNull(renameSrcName);
@@ -424,6 +435,7 @@ public void testRenameLogicalFile()
}
@Test
+ @WithSpan
public void ensuredTrailingSlashDZSince7_12_98()
{
try
@@ -449,6 +461,7 @@ public void ensuredTrailingSlashDZSince7_12_98()
}
@Test
+ @WithSpan
public void downLoadFileTest()
{
if (foundLocalDZ == null)
diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WSCloudClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WSCloudClientTest.java
index da4e0c7af..ee01c4c8c 100644
--- a/wsclient/src/test/java/org/hpccsystems/ws/client/WSCloudClientTest.java
+++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WSCloudClientTest.java
@@ -23,11 +23,12 @@ HPCC SYSTEMS software Copyright (C) 2022 HPCC Systems®.
import org.json.JSONArray;
import org.json.JSONObject;
import org.junit.Assert;
-import org.junit.Assume;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class WSCloudClientTest extends BaseRemoteTest
{
@@ -51,6 +52,7 @@ public class WSCloudClientTest extends BaseRemoteTest
@Test
+ @WithSpan
public void getPodsTest()
{
assumeTrue("Target HPCC cluster does not appear to be containerized, invalidating test", isContainerizedTarget);
diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WSCodeSignClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WSCodeSignClientTest.java
index 8965f3ec3..b2d1433e8 100644
--- a/wsclient/src/test/java/org/hpccsystems/ws/client/WSCodeSignClientTest.java
+++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WSCodeSignClientTest.java
@@ -36,6 +36,8 @@ HPCC SYSTEMS software Copyright (C) 2021 HPCC Systems®.
import org.junit.Test;
import org.junit.runners.MethodSorters;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class WSCodeSignClientTest extends BaseRemoteTest
{
@@ -87,6 +89,7 @@ public void listUserIDsTest()
}
@Test
+ @WithSpan
public void signTest()
{
try
@@ -125,6 +128,7 @@ public void signTest()
}
@Test
+ @WithSpan
public void verifyTest()
{
signed = "adsfasdfasdfasdfasdfasdfasdfasdfasdfasdfasd";
diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WSFileIOClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WSFileIOClientTest.java
index 3d5fb5a57..557cbe5d7 100644
--- a/wsclient/src/test/java/org/hpccsystems/ws/client/WSFileIOClientTest.java
+++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WSFileIOClientTest.java
@@ -37,6 +37,8 @@ HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems®.
import org.junit.Test;
import org.junit.runners.MethodSorters;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
import static org.junit.Assume.assumeFalse;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
@@ -75,6 +77,7 @@ public class WSFileIOClientTest extends BaseRemoteTest
}
@Test
+ @WithSpan
public void copyFile() throws Exception
{
String lzfile=System.currentTimeMillis() + "_csvtest.csv";
@@ -158,6 +161,7 @@ public void copyFile() throws Exception
}
@Test
+ @WithSpan
public void AcreateHPCCFile() throws Exception, ArrayOfEspExceptionWrapper
{
if (isContainerized)
@@ -175,6 +179,7 @@ public void AcreateHPCCFile() throws Exception, ArrayOfEspExceptionWrapper
}
@Test
+ @WithSpan
public void BwriteHPCCFile() throws Exception, ArrayOfEspExceptionWrapper
{
System.out.println("Writing data to file: '" + testfilename + "' on LandingZone: '" + targetLZ + "' on HPCC: '" + super.connString +"'");
@@ -190,6 +195,7 @@ public void BwriteHPCCFile() throws Exception, ArrayOfEspExceptionWrapper
}
@Test
+ @WithSpan
public void CreadHPCCFile() throws Exception, ArrayOfEspExceptionWrapper
{
System.out.println("reading data from file: '" + testfilename + "' on LandingZone: '" + targetLZ + "' on HPCC: '" + super.connString +"'");
diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WSPackageProcessTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WSPackageProcessTest.java
index 96849eea1..504ced962 100644
--- a/wsclient/src/test/java/org/hpccsystems/ws/client/WSPackageProcessTest.java
+++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WSPackageProcessTest.java
@@ -37,6 +37,8 @@ HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems®.
import org.junit.Test;
import org.junit.runners.MethodSorters;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class WSPackageProcessTest extends BaseRemoteTest
{
@@ -84,6 +86,7 @@ public void ping() throws Exception
}
@Test
+ @WithSpan
public void BBB1_listPackageTest() throws Exception
{
List packages = client.listPackages("*", targetRoxieName, null);
@@ -110,6 +113,7 @@ public void BBB1_listPackageTest() throws Exception
}
@Test
+ @WithSpan
public void getPackageTest() throws Exception
{
Assume.assumeNotNull(validPackageID);
@@ -121,6 +125,7 @@ public void getPackageTest() throws Exception
}
@Test
+ @WithSpan
public void AAA1addPackageTest() throws Exception
{
System.out.println("WsPackageProcess junittest: AddPackageTest(" + StaticPMName + ") ...");
@@ -147,6 +152,7 @@ public void AAA1addPackageTest() throws Exception
}
@Test
+ @WithSpan
public void AAA1addPackageTestWrapper()
{
System.out.println("WsPackageProcess junittest: addPackageTestWrapper(" + StaticPMName + ") ...");
@@ -187,6 +193,7 @@ public void AAA1addPackageTestWrapper()
}
@Test
+ @WithSpan
public void ZZZ2deletePackageTest() throws Exception
{
DeletePackageResponse delpackageresp = client.deletePackage(StaticPMName, "*");
@@ -196,6 +203,7 @@ public void ZZZ2deletePackageTest() throws Exception
}
@Test
+ @WithSpan
public void ZZZ2deletePackageTestWrapper()
{
System.out.println("WsPackageProcess junittest: deletePackageTestWrapper(" + StaticPMName + ")...");
diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WSResroucesClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WSResroucesClientTest.java
index 94793d0b1..a84220eb9 100644
--- a/wsclient/src/test/java/org/hpccsystems/ws/client/WSResroucesClientTest.java
+++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WSResroucesClientTest.java
@@ -40,6 +40,8 @@ HPCC SYSTEMS software Copyright (C) 2021 HPCC Systems®.
import org.junit.Test;
import org.junit.runners.MethodSorters;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class WSResroucesClientTest extends BaseRemoteTest
{
@@ -66,6 +68,7 @@ public void setup()
}
@Test
+ @WithSpan
public void serviceQueryTest()
{
Assume.assumeTrue("Target HPCC does not seem to be containerized", iscontainerized);
@@ -99,6 +102,7 @@ public void getContainerizedModeTest() throws Exception
}
@Test
+ @WithSpan
public void testTargetQueryNullType() throws Exception
{
// Create a target query request
@@ -125,6 +129,7 @@ public void testTargetQueryNullType() throws Exception
}
@Test
+ @WithSpan
public void testTargetQueryAllType() throws Exception
{
// Create a target query request
@@ -138,6 +143,7 @@ public void testTargetQueryAllType() throws Exception
}
@Test
+ @WithSpan
public void testTargetQueryRoxieType() throws Exception
{
// Create a target query request
@@ -151,6 +157,7 @@ public void testTargetQueryRoxieType() throws Exception
}
@Test
+ @WithSpan
public void testWebLinksQuery() throws Exception
{
// Create a web links query request
diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WSSQLClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WSSQLClientTest.java
index d2a37f1fd..637f63815 100644
--- a/wsclient/src/test/java/org/hpccsystems/ws/client/WSSQLClientTest.java
+++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WSSQLClientTest.java
@@ -17,7 +17,6 @@ HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems®.
package org.hpccsystems.ws.client;
-import static org.junit.Assert.assertNotNull;
import static org.junit.Assume.assumeFalse;
import static org.junit.Assume.assumeNotNull;
@@ -40,11 +39,12 @@ HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems®.
import org.hpccsystems.ws.client.wrappers.gen.wssql.QuerySetQueries_type0Wrapper;
import org.hpccsystems.ws.client.wrappers.gen.wssql.QuerySignatureWrapper;
import org.junit.Assert;
-import org.junit.Assume;
import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.runners.MethodSorters;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class WSSQLClientTest extends BaseRemoteTest
{
@@ -116,6 +116,7 @@ public void ping() throws Exception
}
@Test
+ @WithSpan
public void AAA2testGetTables() throws Exception
{
try
@@ -144,6 +145,7 @@ public void AAA2testGetTables() throws Exception
}
@Test
+ @WithSpan
public void AAA1testGetClusters() throws Exception
{
try
@@ -175,6 +177,7 @@ public void AAA1testGetClusters() throws Exception
}
@Test
+ @WithSpan
public void testInvalidGetTables() throws Exception
{
try
@@ -199,6 +202,7 @@ public void testInvalidGetTables() throws Exception
}
@Test
+ @WithSpan
public void testGetDBVersion() throws Exception
{
try
@@ -216,6 +220,7 @@ public void testGetDBVersion() throws Exception
}
@Test
+ @WithSpan
public void testGetStoreProcs() throws Exception
{
try
@@ -330,6 +335,7 @@ private void getResults(String wuid)
}
@Test
+ @WithSpan
public void testSQLExecution() throws Exception
{
assumeNotNull("Cannot test sql execution - could not find any clusters", validClusterName);
@@ -350,6 +356,7 @@ public void testSQLExecution() throws Exception
}
@Test
+ @WithSpan
public void executeSQLWUIDResponseTest() throws Exception
{
assumeNotNull("Cannot test sql execution - could not find any clusters", validClusterName);
@@ -367,6 +374,7 @@ public void executeSQLWUIDResponseTest() throws Exception
}
@Test
+ @WithSpan
public void executeSQLWUResponseTest() throws Exception
{
assumeNotNull("Cannot test sql execution - could not find any clusters", validClusterName);
@@ -383,6 +391,7 @@ public void executeSQLWUResponseTest() throws Exception
}
@Test
+ @WithSpan
public void executeSQLFullResponseTest() throws Exception
{
assumeNotNull("Cannot test sql execution - could not find any clusters", validClusterName);
@@ -397,6 +406,7 @@ public void executeSQLFullResponseTest() throws Exception
}
@Test
+ @WithSpan
public void preparedSQLTest() throws Exception
{
assumeNotNull("Cannot test sql execution - could not find any clusters", validClusterName);
diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WSStoreClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WSStoreClientTest.java
index 334033488..03bb46db9 100644
--- a/wsclient/src/test/java/org/hpccsystems/ws/client/WSStoreClientTest.java
+++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WSStoreClientTest.java
@@ -38,6 +38,8 @@ HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems®.
import org.junit.Test;
import org.junit.runners.MethodSorters;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class WSStoreClientTest extends BaseRemoteTest
{
@@ -106,21 +108,25 @@ public void printMetaData(int tabs, Properties props)
System.out.println(tabstr);
}
+ @WithSpan
public Properties fetchKeyMetaData(String storename, String namespace, String key, boolean global) throws Exception, ArrayOfEspExceptionWrapper
{
return client.fetchKeyMetaData(storename, namespace, key, global);
}
+ @WithSpan
public String fetchvalue(String storename, String namespace, String key, boolean global) throws Exception, ArrayOfEspExceptionWrapper
{
return client.fetchValue(storename, namespace, key, global);
}
+ @WithSpan
public String fetchvalueEncrypted(String storename, String namespace, String key, boolean global, String secretKey) throws Exception, ArrayOfEspExceptionWrapper
{
return client.fetchValueEncrypted(storename, namespace, key, global, secretKey);
}
+ @WithSpan
public void listNamespaceKeys(String store, String namespace, boolean global) throws Exception, ArrayOfEspExceptionWrapper
{
System.out.println("Listing Namespace Keys for default." + namespace + "...");
@@ -141,6 +147,7 @@ public void getContainerizedModeTest() throws Exception
}
@Test
+ @WithSpan
public void listNamespaces()
{
try
@@ -176,6 +183,7 @@ public void listNamespaces()
}
@Test
+ @WithSpan
public void a3fetchAllNSKeysTest()
{
try
@@ -196,6 +204,7 @@ public void a3fetchAllNSKeysTest()
}
@Test
+ @WithSpan
public void a2setTest() throws Exception, ArrayOfEspExceptionWrapper
{
try
@@ -218,6 +227,7 @@ public void a2setTest() throws Exception, ArrayOfEspExceptionWrapper
}
@Test
+ @WithSpan
public void a3setEncryptedTest() throws Exception, ArrayOfEspExceptionWrapper
{
try
@@ -265,6 +275,7 @@ public void a3setEncryptedTest() throws Exception, ArrayOfEspExceptionWrapper
}
@Test
+ @WithSpan
public void a3setEncryptedCustomTest()
{
//Generating random data as key content, client must keep track of this key in order to decrypt
@@ -342,6 +353,7 @@ public void a3setEncryptedCustomTest()
}
@Test
+ @WithSpan
public void a4deleteTest() throws Exception, ArrayOfEspExceptionWrapper
{
try
@@ -358,6 +370,7 @@ public void a4deleteTest() throws Exception, ArrayOfEspExceptionWrapper
}
@Test
+ @WithSpan
public void a1createStoreTest() throws Exception, ArrayOfEspExceptionWrapper
{
try
@@ -374,6 +387,7 @@ public void a1createStoreTest() throws Exception, ArrayOfEspExceptionWrapper
}
@Test
+ @WithSpan
public void z91deleteNSTest() throws Exception, ArrayOfEspExceptionWrapper
{
try
@@ -388,6 +402,7 @@ public void z91deleteNSTest() throws Exception, ArrayOfEspExceptionWrapper
}
@Test
+ @WithSpan
public void b1createEncodedStoreTest() throws Exception, ArrayOfEspExceptionWrapper
{
Assume.assumeNotNull(encodedUserClient);
@@ -405,6 +420,7 @@ public void b1createEncodedStoreTest() throws Exception, ArrayOfEspExceptionWrap
}
@Test
+ @WithSpan
public void zz91deleteEncodedNSTest() throws Exception, ArrayOfEspExceptionWrapper
{
Assume.assumeNotNull(encodedUserClient);
@@ -420,6 +436,7 @@ public void zz91deleteEncodedNSTest() throws Exception, ArrayOfEspExceptionWrapp
}
@Test
+ @WithSpan
public void a3fetchInvalidKeyTest()
{
try
@@ -440,6 +457,7 @@ public void a3fetchInvalidKeyTest()
}
@Test
+ @WithSpan
public void b4fetchAllEncodedNSKeysTest()
{
Assume.assumeNotNull(encodedUserClient);
@@ -461,6 +479,7 @@ public void b4fetchAllEncodedNSKeysTest()
}
@Test
+ @WithSpan
public void b4fetchEncodedNSKeysAttributesTest()
{
Assume.assumeNotNull(encodedUserClient);
@@ -482,6 +501,7 @@ public void b4fetchEncodedNSKeysAttributesTest()
}
@Test
+ @WithSpan
public void b4fetchEncodedKeyTest()
{
Assume.assumeNotNull(encodedUserClient);
@@ -509,6 +529,7 @@ public void b4fetchEncodedKeyTest()
}
@Test
+ @WithSpan
public void b3setEncodedTest() throws Exception, ArrayOfEspExceptionWrapper
{
Assume.assumeNotNull(encodedUserClient);
@@ -534,6 +555,7 @@ public void b3setEncodedTest() throws Exception, ArrayOfEspExceptionWrapper
}
@Test
+ @WithSpan
public void b4setEncryptedTest() throws Exception, ArrayOfEspExceptionWrapper
{
try
@@ -581,6 +603,7 @@ public void b4setEncryptedTest() throws Exception, ArrayOfEspExceptionWrapper
}
@Test
+ @WithSpan
public void b4setEncryptedCustomTest()
{
//Generating random data as key content, client must keep track of this key in order to decrypt
@@ -658,6 +681,7 @@ public void b4setEncryptedCustomTest()
}
@Test
+ @WithSpan
public void b5deleteTest() throws Exception, ArrayOfEspExceptionWrapper
{
try
diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WSTopologyClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WSTopologyClientTest.java
index fdab4478b..8fed2845e 100644
--- a/wsclient/src/test/java/org/hpccsystems/ws/client/WSTopologyClientTest.java
+++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WSTopologyClientTest.java
@@ -36,12 +36,15 @@ HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems®.
import org.junit.Test;
import org.junit.runners.MethodSorters;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class WSTopologyClientTest extends BaseRemoteTest
{
HPCCWsTopologyClient client = wsclient.getWsTopologyClient();
@Test
+ @WithSpan
public void getContainerizedDataStoragePlanesTest() throws Exception
{
System.out.println("Fetching containerized data storage planes...");
@@ -60,6 +63,7 @@ public void getContainerizedDataStoragePlanesOnBareMetalTest() throws HpccContai
}
@Test
+ @WithSpan
public void getTopologyGroupsOnBareMetalTest() throws HpccContainerizedUnsupportedException, Exception
{
System.out.println("Fetching data storage planes...");
@@ -77,6 +81,7 @@ public void getContainerizedModeTest() throws Exception
}
@Test
+ @WithSpan
public void containerizedInvalidMethodsTest() throws Exception
{
Assume.assumeTrue("Test only valid on containerized HPCC environment", client.isTargetHPCCContainerized());
@@ -113,6 +118,7 @@ public void containerizedInvalidMethodsTest() throws Exception
}
@Test
+ @WithSpan
public void printValidTargetClustersTest() throws Exception, ArrayOfEspExceptionWrapper
{
Assume.assumeFalse("Test not valid on containerized HPCC environment", client.isTargetHPCCContainerized());
@@ -121,6 +127,7 @@ public void printValidTargetClustersTest() throws Exception, ArrayOfEspException
}
@Test
+ @WithSpan
public void getValidTargetGroupsTest() throws Exception, ArrayOfEspExceptionWrapper
{
Assume.assumeFalse("Test not valid on containerized HPCC environment", client.isTargetHPCCContainerized());
@@ -128,6 +135,7 @@ public void getValidTargetGroupsTest() throws Exception, ArrayOfEspExceptionWrap
}
@Test
+ @WithSpan
public void getValidTargetGroupNamesTest() throws Exception, ArrayOfEspExceptionWrapper
{
Assume.assumeFalse("Test not valid on containerized HPCC environment", client.isTargetHPCCContainerized());
@@ -141,6 +149,7 @@ public void getValidTargetGroupNamesTest() throws Exception, ArrayOfEspException
}
@Test
+ @WithSpan
public void queryDropzoneTest() throws Exception, ArrayOfEspExceptionWrapper
{
System.out.println("----------------------Dropzones Test ------------------");
@@ -163,6 +172,7 @@ public void queryDropzoneTest() throws Exception, ArrayOfEspExceptionWrapper
}
@Test
+ @WithSpan
public void getValidThorTargetClusterNamesTest() throws Exception, ArrayOfEspExceptionWrapper
{
System.out.println("----------------------Thor clusters Name Test ------------------");
@@ -175,6 +185,7 @@ public void getValidThorTargetClusterNamesTest() throws Exception, ArrayOfEspExc
}
@Test
+ @WithSpan
public void getValidRoxieTargetClusterNamesTest() throws Exception, ArrayOfEspExceptionWrapper
{
System.out.println("----------------------Roxie clusters Name Test ------------------");
@@ -187,6 +198,7 @@ public void getValidRoxieTargetClusterNamesTest() throws Exception, ArrayOfEspEx
}
@Test
+ @WithSpan
public void getValidTargetClusterNamesTest() throws Exception, ArrayOfEspExceptionWrapper
{
System.out.println("----------------------all cluster types Name Test ------------------");
@@ -199,6 +211,7 @@ public void getValidTargetClusterNamesTest() throws Exception, ArrayOfEspExcepti
}
@Test
+ @WithSpan
public void getClusterInfoTest() throws Exception, ArrayOfEspExceptionWrapper
{
Assume.assumeFalse("getClusterInfoTest not valid on containerized HPCC environment", client.isTargetHPCCContainerized());
@@ -213,6 +226,7 @@ public void getClusterInfoTest() throws Exception, ArrayOfEspExceptionWrapper
}
@Test
+ @WithSpan
public void getInvalidClusterInfoTest() throws Exception
{
Assume.assumeFalse("getInvalidClusterInfoTest not valid on containerized HPCC environment", client.isTargetHPCCContainerized());
@@ -231,6 +245,7 @@ public void getInvalidClusterInfoTest() throws Exception
}
@Test
+ @WithSpan
public void getBlankClusterInfoTest() throws Exception
{
Assume.assumeFalse("getBlankClusterInfoTest not valid on containerized HPCC environment", client.isTargetHPCCContainerized());
@@ -248,6 +263,7 @@ public void getBlankClusterInfoTest() throws Exception
}
@Test
+ @WithSpan
public void getLogicalClustersTest() throws Exception, ArrayOfEspExceptionWrapper
{
System.out.println("----------------------get logical clusterTest ------------------");
diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WSWorkunitsTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WSWorkunitsTest.java
index 5457ba293..c3f46d08a 100644
--- a/wsclient/src/test/java/org/hpccsystems/ws/client/WSWorkunitsTest.java
+++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WSWorkunitsTest.java
@@ -38,10 +38,7 @@ HPCC SYSTEMS software Copyright (C) 2019 HPCC Systems®.
import org.junit.Test;
import org.junit.runners.MethodSorters;
-import io.opentelemetry.api.trace.Span;
-import io.opentelemetry.api.trace.SpanKind;
-import io.opentelemetry.api.trace.StatusCode;
-import io.opentelemetry.context.Scope;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class WSWorkunitsTest extends BaseRemoteTest
@@ -62,8 +59,10 @@ public static void setup() throws Exception
}
@Test
+ @WithSpan
public void testMultipleWsWUInits() throws InterruptedException
{
+
Callable callableTask = () ->
{
HPCCWsWorkUnitsClient wswu = new HPCCWsWorkUnitsClient(wsclient.connection);
@@ -74,6 +73,7 @@ public void testMultipleWsWUInits() throws InterruptedException
}
@Test
+ @WithSpan
public void testSharedWsWUgets() throws InterruptedException
{
Callable callableTask = () -> {
@@ -87,30 +87,18 @@ public void testSharedWsWUgets() throws InterruptedException
@Test
public void stageA_ping() throws Exception
{
- Span pingSpan = getRemoteTestTraceBuilder("WsWUTests-PingTest").setSpanKind(SpanKind.CLIENT).startSpan();
-
- try (Scope innerScope = pingSpan.makeCurrent())
+ try
{
- try
- {
- Assert.assertTrue(client.ping());
- pingSpan.setStatus(StatusCode.OK);
- }
- catch (AxisFault e)
- {
- pingSpan.recordException(e);
- e.printStackTrace();
- Assert.fail();
- }
- catch (Exception e)
- {
- pingSpan.recordException(e);
- Assert.fail(e.toString());
- }
+ Assert.assertTrue(client.ping());
}
- finally
+ catch (AxisFault e)
+ {
+ e.printStackTrace();
+ Assert.fail();
+ }
+ catch (Exception e)
{
- pingSpan.end();
+ Assert.fail(e.toString());
}
}
diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WsClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WsClientTest.java
index 9cff382f7..454f262c9 100644
--- a/wsclient/src/test/java/org/hpccsystems/ws/client/WsClientTest.java
+++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WsClientTest.java
@@ -4,6 +4,8 @@
import org.junit.Assume;
import org.junit.Test;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
public class WsClientTest extends BaseRemoteTest
{
static
@@ -18,6 +20,7 @@ public class WsClientTest extends BaseRemoteTest
}
@Test
+ @WithSpan
public void testAvailableClusterGroups()
{
Assume.assumeFalse("Test not valid on containerized HPCC environment", wsclient.isContainerized());
@@ -39,6 +42,7 @@ public void testAvailableClusterGroups()
}
@Test
+ @WithSpan
public void testGetAvailableClusterNames()
{
try
@@ -58,6 +62,7 @@ public void testGetAvailableClusterNames()
}
@Test
+ @WithSpan
public void testGetAvailableRoxieClusterNames()
{
Assume.assumeFalse("Test not valid on containerized HPCC environment", wsclient.isContainerized());
@@ -84,6 +89,7 @@ public void testGetAvailableRoxieClusterNames()
}
@Test
+ @WithSpan
public void testGetAvailableThorClusterNames()
{
Assume.assumeFalse("Test not valid on containerized HPCC environment", wsclient.isContainerized());
diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WsDFUClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WsDFUClientTest.java
index 77e6fd1c8..9bced1d55 100644
--- a/wsclient/src/test/java/org/hpccsystems/ws/client/WsDFUClientTest.java
+++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WsDFUClientTest.java
@@ -6,11 +6,9 @@
import static org.junit.Assert.assertTrue;
import static org.junit.Assume.assumeNotNull;
-import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
-import java.util.Random;
import java.util.Set;
import java.util.UUID;
@@ -32,6 +30,8 @@
import org.junit.Test;
import org.w3c.dom.NodeList;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
public class WsDFUClientTest extends BaseRemoteTest
{
@@ -54,6 +54,7 @@ public void delayhack()
}
@Test
+ @WithSpan
public void testFileTypeWrapper()
{
@@ -398,6 +399,7 @@ public void searchFileTest() throws Exception
}
@Test
+ @WithSpan
public void getClustersTest() throws Exception
{
DFUFileDetailWrapper fileWrapper = wsdfuclient.getFileDetails(logicalfilename, null);
@@ -407,6 +409,7 @@ public void getClustersTest() throws Exception
}
@Test
+ @WithSpan
public void createSuperFileTest() throws Exception
{
try
@@ -425,6 +428,7 @@ public void createSuperFileTest() throws Exception
}
@Test
+ @WithSpan
public void createNewSuperFileWrapperTest() throws Exception
{
assumeNotNull(testfilename);
@@ -444,6 +448,7 @@ public void createNewSuperFileWrapperTest() throws Exception
}
@Test
+ @WithSpan
public void createNewSuperFileNoSubfilesTest() throws Exception
{
assumeNotNull(testfilename);
diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/WsSMCClientTest.java b/wsclient/src/test/java/org/hpccsystems/ws/client/WsSMCClientTest.java
index 8a22c0d74..a64c6bb47 100644
--- a/wsclient/src/test/java/org/hpccsystems/ws/client/WsSMCClientTest.java
+++ b/wsclient/src/test/java/org/hpccsystems/ws/client/WsSMCClientTest.java
@@ -10,6 +10,8 @@
import org.junit.Assert;
import org.junit.Test;
+import io.opentelemetry.instrumentation.annotations.WithSpan;
+
public class WsSMCClientTest extends BaseRemoteTest
{
private static HPCCWsSMCClient client = wsclient.getWsSMCClient();
@@ -78,6 +80,7 @@ public void testHash()
}
@Test
+ @WithSpan
public void testHPCCBuild()
{
try
diff --git a/wsclient/src/test/java/org/hpccsystems/ws/client/platform/test/PlatformTester.java b/wsclient/src/test/java/org/hpccsystems/ws/client/platform/test/PlatformTester.java
index d9d412152..b098d3b9a 100644
--- a/wsclient/src/test/java/org/hpccsystems/ws/client/platform/test/PlatformTester.java
+++ b/wsclient/src/test/java/org/hpccsystems/ws/client/platform/test/PlatformTester.java
@@ -29,7 +29,6 @@
import org.hpccsystems.ws.client.wrappers.gen.wssql.ExecuteSQLResponseWrapper;
import org.hpccsystems.ws.client.wrappers.wsdfu.DFUDataColumnWrapper;
import org.hpccsystems.ws.client.wrappers.wsdfu.DFUFileAccessInfoWrapper;
-
import org.junit.experimental.categories.Category;
import io.opentelemetry.api.GlobalOpenTelemetry;