(2);
+ map.putAll(limitMap);
+ map.put(key, StringUtils.abbreviate(param, PinpointConstants.BODY_LIMIT_LENGTH));
+ return JacksonUtil.toJsonString(map);
+ }
+ return param;
+ }
+
@Override
public void close() {
diff --git a/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/storage/BufferedStorageFactory.java b/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/storage/BufferedStorageFactory.java
index 550227dd286c..f2004c646e0b 100644
--- a/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/storage/BufferedStorageFactory.java
+++ b/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/storage/BufferedStorageFactory.java
@@ -28,15 +28,25 @@ public class BufferedStorageFactory implements StorageFactory {
private final DataSender dataSender;
private final int ioBufferingBufferSize;
- public BufferedStorageFactory(int ioBufferingBufferSize, DataSender dataSender) {
+ /**
+ * 报文异常判断相关
+ */
+ private final boolean responseJudge;
+ private final String responseJudgeSign;
+ private final String responseJudgeCode;
+
+ public BufferedStorageFactory(int ioBufferingBufferSize, DataSender dataSender, boolean responseJudge, String responseJudgeSign, String responseJudgeCode) {
this.dataSender = Assert.requireNonNull(dataSender, "dataSender");
this.ioBufferingBufferSize = ioBufferingBufferSize;
+ this.responseJudge = responseJudge;
+ this.responseJudgeSign = responseJudgeSign;
+ this.responseJudgeCode = responseJudgeCode;
}
@Override
public Storage createStorage(SpanChunkFactory spanChunkFactory) {
- Storage storage = new BufferedStorage(spanChunkFactory, this.dataSender, this.ioBufferingBufferSize);
+ Storage storage = new BufferedStorage(spanChunkFactory, this.dataSender, this.ioBufferingBufferSize, this.responseJudge, this.responseJudgeSign, this.responseJudgeCode);
return storage;
}
diff --git a/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/storage/LogStorageFactory.java b/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/storage/LogStorageFactory.java
index ad4cd09898dc..955dc07d289a 100644
--- a/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/storage/LogStorageFactory.java
+++ b/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/storage/LogStorageFactory.java
@@ -20,6 +20,7 @@
import com.navercorp.pinpoint.profiler.context.SpanChunkFactory;
import com.navercorp.pinpoint.profiler.context.SpanEvent;
+import com.navercorp.pinpoint.profiler.context.WebInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -55,5 +56,11 @@ public void flush() {
@Override
public void close() {
}
+
+ @Override
+ public void sendWebInfo(Span span) {
+
+ }
+
}
}
diff --git a/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/storage/Storage.java b/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/storage/Storage.java
index 569367d16a2e..00d4afbff60b 100644
--- a/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/storage/Storage.java
+++ b/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/storage/Storage.java
@@ -18,6 +18,7 @@
import com.navercorp.pinpoint.profiler.context.Span;
import com.navercorp.pinpoint.profiler.context.SpanEvent;
+import com.navercorp.pinpoint.profiler.context.WebInfo;
/**
* @author emeroad
@@ -40,4 +41,10 @@ public interface Storage {
void flush();
void close();
+
+ /**
+ * 报文发送
+ * @param span
+ */
+ void sendWebInfo(Span span);
}
diff --git a/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/storage/TraceLogDelegateStorage.java b/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/storage/TraceLogDelegateStorage.java
index 647a4f0c6c29..2a68677a9d82 100644
--- a/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/storage/TraceLogDelegateStorage.java
+++ b/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/storage/TraceLogDelegateStorage.java
@@ -20,6 +20,7 @@
import com.navercorp.pinpoint.profiler.context.DefaultTrace;
import com.navercorp.pinpoint.profiler.context.Span;
import com.navercorp.pinpoint.profiler.context.SpanEvent;
+import com.navercorp.pinpoint.profiler.context.WebInfo;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -63,4 +64,10 @@ public void flush() {
public void close() {
this.delegate.close();
}
+
+ @Override
+ public void sendWebInfo(Span span) {
+
+ }
+
}
diff --git a/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/thrift/SpanThriftMessageConverter.java b/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/thrift/SpanThriftMessageConverter.java
index 215cfd486302..f4e5c7d1f35f 100644
--- a/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/thrift/SpanThriftMessageConverter.java
+++ b/profiler/src/main/java/com/navercorp/pinpoint/profiler/context/thrift/SpanThriftMessageConverter.java
@@ -21,24 +21,12 @@
import com.navercorp.pinpoint.common.util.Assert;
import com.navercorp.pinpoint.common.util.CollectionUtils;
import com.navercorp.pinpoint.common.util.IntStringValue;
-import com.navercorp.pinpoint.profiler.context.Annotation;
-import com.navercorp.pinpoint.profiler.context.AsyncId;
-import com.navercorp.pinpoint.profiler.context.AsyncSpanChunk;
-import com.navercorp.pinpoint.profiler.context.LocalAsyncId;
-import com.navercorp.pinpoint.profiler.context.Span;
-import com.navercorp.pinpoint.profiler.context.SpanChunk;
-import com.navercorp.pinpoint.profiler.context.SpanEvent;
+import com.navercorp.pinpoint.profiler.context.*;
import com.navercorp.pinpoint.profiler.context.compress.SpanProcessor;
import com.navercorp.pinpoint.profiler.context.id.Shared;
import com.navercorp.pinpoint.profiler.context.id.TraceRoot;
import com.navercorp.pinpoint.profiler.context.id.TransactionIdEncoder;
-import com.navercorp.pinpoint.thrift.dto.TAnnotation;
-import com.navercorp.pinpoint.thrift.dto.TAnnotationValue;
-import com.navercorp.pinpoint.thrift.dto.TIntStringValue;
-import com.navercorp.pinpoint.thrift.dto.TLocalAsyncId;
-import com.navercorp.pinpoint.thrift.dto.TSpan;
-import com.navercorp.pinpoint.thrift.dto.TSpanChunk;
-import com.navercorp.pinpoint.thrift.dto.TSpanEvent;
+import com.navercorp.pinpoint.thrift.dto.*;
import org.apache.thrift.TBase;
import java.nio.ByteBuffer;
@@ -79,9 +67,41 @@ public SpanThriftMessageConverter(String applicationName, String agentId, long a
final Span span = (Span) message;
return buildTSpan(span);
}
+ if (message instanceof SpanWebInfo) {
+ final SpanWebInfo spanWebInfo = (SpanWebInfo) message;
+ return buildTSpanWebInfo(spanWebInfo);
+ }
return null;
}
+ private TBase, ?> buildTSpanWebInfo(SpanWebInfo spanWebInfo) {
+ final TSpanWebInfo tSpanWebInfo = new TSpanWebInfo();
+
+ tSpanWebInfo.setApplicationName(applicationName);
+ tSpanWebInfo.setAgentId(agentId);
+ tSpanWebInfo.setAgentStartTime(agentStartTime);
+
+ final TraceRoot traceRoot = spanWebInfo.getTraceRoot();
+ final TraceId traceId = traceRoot.getTraceId();
+ final ByteBuffer transactionId = transactionIdEncoder.encodeTransactionId(traceId);
+ tSpanWebInfo.setTransactionId(transactionId);
+ tSpanWebInfo.setSpanId(traceId.getSpanId());
+ tSpanWebInfo.setParentSpanId(traceId.getParentSpanId());
+ WebInfo webInfo = spanWebInfo.getWebInfo();
+ tSpanWebInfo.setRequestBody(webInfo.getRequestBody().toString());
+ tSpanWebInfo.setRequestHeader(webInfo.getRequestHeader().toString());
+ tSpanWebInfo.setResponseBody(webInfo.getResponseBody().toString());
+ tSpanWebInfo.setResponseHeader(webInfo.getResponseHeader().toString());
+ tSpanWebInfo.setRequestUrl(webInfo.getRequestUrl());
+ tSpanWebInfo.setStatus(webInfo.getStatus());
+ tSpanWebInfo.setWebBodyStrategy(webInfo.getWebBodyStrategy());
+ tSpanWebInfo.setRequestMethod(webInfo.getRequestMethod());
+ tSpanWebInfo.setStatusCode(webInfo.getStatusCode());
+ tSpanWebInfo.setElapsedTime(webInfo.getElapsedTime());
+ tSpanWebInfo.setParentApplicationName(webInfo.getParentApplicationName());
+ return tSpanWebInfo;
+ }
+
@VisibleForTesting
TSpan buildTSpan(Span span) {
diff --git a/profiler/src/main/java/com/navercorp/pinpoint/profiler/util/JacksonUtil.java b/profiler/src/main/java/com/navercorp/pinpoint/profiler/util/JacksonUtil.java
new file mode 100644
index 000000000000..b7907b241f4f
--- /dev/null
+++ b/profiler/src/main/java/com/navercorp/pinpoint/profiler/util/JacksonUtil.java
@@ -0,0 +1,36 @@
+package com.navercorp.pinpoint.profiler.util;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.navercorp.pinpoint.common.PinpointConstants;
+
+import java.util.Map;
+
+/**
+ * @Author: wangj881
+ * @Description:
+ * @Date: create in 2022/12/4 9:18
+ */
+public class JacksonUtil {
+
+ private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
+
+ private JacksonUtil() {
+ }
+
+ public static String toJsonString(Object object) throws JsonProcessingException {
+ if (null == object) {
+ return PinpointConstants.EMPTY_STRING;
+ }
+ return OBJECT_MAPPER.writeValueAsString(object);
+
+ }
+
+ public static Map parseObjectToMap(Object object) {
+ if (null == object) {
+ return null;
+ }
+ return OBJECT_MAPPER.convertValue(object, Map.class);
+ }
+
+}
diff --git a/profiler/src/test/java/com/navercorp/pinpoint/profiler/context/storage/BufferedStorageTest.java b/profiler/src/test/java/com/navercorp/pinpoint/profiler/context/storage/BufferedStorageTest.java
index ae96f0f6d7f4..7b0316f5c839 100644
--- a/profiler/src/test/java/com/navercorp/pinpoint/profiler/context/storage/BufferedStorageTest.java
+++ b/profiler/src/test/java/com/navercorp/pinpoint/profiler/context/storage/BufferedStorageTest.java
@@ -130,6 +130,6 @@ public void testStore_manual_flush() throws Exception {
private BufferedStorage newBufferedStorage(int bufferSize) {
SpanChunkFactory spanChunkFactory = new DefaultSpanChunkFactory(internalTraceId);
- return new BufferedStorage(spanChunkFactory, countingDataSender, bufferSize);
+ return new BufferedStorage(spanChunkFactory, countingDataSender, bufferSize, false, "status", "0000");
}
}
\ No newline at end of file
diff --git a/thrift/src/main/java/com/navercorp/pinpoint/thrift/dto/TSpanWebInfo.java b/thrift/src/main/java/com/navercorp/pinpoint/thrift/dto/TSpanWebInfo.java
new file mode 100644
index 000000000000..a414016de0dd
--- /dev/null
+++ b/thrift/src/main/java/com/navercorp/pinpoint/thrift/dto/TSpanWebInfo.java
@@ -0,0 +1,2138 @@
+/**
+ * Autogenerated by Thrift Compiler (0.12.0)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *
+ * @generated
+ */
+package com.navercorp.pinpoint.thrift.dto;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2022-12-22")
+public class TSpanWebInfo implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TSpanWebInfo");
+
+ private static final org.apache.thrift.protocol.TField VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("version", org.apache.thrift.protocol.TType.BYTE, (short) 1);
+ private static final org.apache.thrift.protocol.TField AGENT_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("agentId", org.apache.thrift.protocol.TType.STRING, (short) 2);
+ private static final org.apache.thrift.protocol.TField APPLICATION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("applicationName", org.apache.thrift.protocol.TType.STRING, (short) 3);
+ private static final org.apache.thrift.protocol.TField AGENT_START_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("agentStartTime", org.apache.thrift.protocol.TType.I64, (short) 4);
+ private static final org.apache.thrift.protocol.TField TRANSACTION_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("transactionId", org.apache.thrift.protocol.TType.STRING, (short) 5);
+ private static final org.apache.thrift.protocol.TField SPAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("spanId", org.apache.thrift.protocol.TType.I64, (short) 6);
+ private static final org.apache.thrift.protocol.TField REQUEST_BODY_FIELD_DESC = new org.apache.thrift.protocol.TField("requestBody", org.apache.thrift.protocol.TType.STRING, (short) 7);
+ private static final org.apache.thrift.protocol.TField REQUEST_URL_FIELD_DESC = new org.apache.thrift.protocol.TField("requestUrl", org.apache.thrift.protocol.TType.STRING, (short) 8);
+ private static final org.apache.thrift.protocol.TField REQUEST_HEADER_FIELD_DESC = new org.apache.thrift.protocol.TField("requestHeader", org.apache.thrift.protocol.TType.STRING, (short) 9);
+ private static final org.apache.thrift.protocol.TField RESPONSE_BODY_FIELD_DESC = new org.apache.thrift.protocol.TField("responseBody", org.apache.thrift.protocol.TType.STRING, (short) 10);
+ private static final org.apache.thrift.protocol.TField RESPONSE_HEADER_FIELD_DESC = new org.apache.thrift.protocol.TField("responseHeader", org.apache.thrift.protocol.TType.STRING, (short) 11);
+ private static final org.apache.thrift.protocol.TField PARENT_SPAN_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("parentSpanId", org.apache.thrift.protocol.TType.I64, (short) 12);
+ private static final org.apache.thrift.protocol.TField STATUS_FIELD_DESC = new org.apache.thrift.protocol.TField("status", org.apache.thrift.protocol.TType.BYTE, (short) 13);
+ private static final org.apache.thrift.protocol.TField WEB_BODY_STRATEGY_FIELD_DESC = new org.apache.thrift.protocol.TField("webBodyStrategy", org.apache.thrift.protocol.TType.BYTE, (short) 14);
+ private static final org.apache.thrift.protocol.TField REQUEST_METHOD_FIELD_DESC = new org.apache.thrift.protocol.TField("requestMethod", org.apache.thrift.protocol.TType.STRING, (short) 15);
+ private static final org.apache.thrift.protocol.TField STATUS_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("statusCode", org.apache.thrift.protocol.TType.I32, (short) 16);
+ private static final org.apache.thrift.protocol.TField ELAPSED_TIME_FIELD_DESC = new org.apache.thrift.protocol.TField("elapsedTime", org.apache.thrift.protocol.TType.I32, (short) 17);
+ private static final org.apache.thrift.protocol.TField PARENT_APPLICATION_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("parentApplicationName", org.apache.thrift.protocol.TType.STRING, (short) 18);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new TSpanWebInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new TSpanWebInfoTupleSchemeFactory();
+
+ public byte version; // optional
+ public @org.apache.thrift.annotation.Nullable
+ String agentId; // required
+ public @org.apache.thrift.annotation.Nullable
+ String applicationName; // required
+ public long agentStartTime; // required
+ public @org.apache.thrift.annotation.Nullable
+ java.nio.ByteBuffer transactionId; // required
+ public long spanId; // required
+ public @org.apache.thrift.annotation.Nullable
+ String requestBody; // required
+ public @org.apache.thrift.annotation.Nullable
+ String requestUrl; // required
+ public @org.apache.thrift.annotation.Nullable
+ String requestHeader; // required
+ public @org.apache.thrift.annotation.Nullable
+ String responseBody; // required
+ public @org.apache.thrift.annotation.Nullable
+ String responseHeader; // required
+ public long parentSpanId; // optional
+ public byte status; // optional
+ public byte webBodyStrategy; // optional
+ public @org.apache.thrift.annotation.Nullable
+ String requestMethod; // required
+ public int statusCode; // required
+ public int elapsedTime; // required
+ public @org.apache.thrift.annotation.Nullable
+ String parentApplicationName; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ VERSION((short) 1, "version"),
+ AGENT_ID((short) 2, "agentId"),
+ APPLICATION_NAME((short) 3, "applicationName"),
+ AGENT_START_TIME((short) 4, "agentStartTime"),
+ TRANSACTION_ID((short) 5, "transactionId"),
+ SPAN_ID((short) 6, "spanId"),
+ REQUEST_BODY((short) 7, "requestBody"),
+ REQUEST_URL((short) 8, "requestUrl"),
+ REQUEST_HEADER((short) 9, "requestHeader"),
+ RESPONSE_BODY((short) 10, "responseBody"),
+ RESPONSE_HEADER((short) 11, "responseHeader"),
+ PARENT_SPAN_ID((short) 12, "parentSpanId"),
+ STATUS((short) 13, "status"),
+ WEB_BODY_STRATEGY((short) 14, "webBodyStrategy"),
+ REQUEST_METHOD((short) 15, "requestMethod"),
+ STATUS_CODE((short) 16, "statusCode"),
+ ELAPSED_TIME((short) 17, "elapsedTime"),
+ PARENT_APPLICATION_NAME((short) 18, "parentApplicationName");
+
+ private static final java.util.Map byName = new java.util.HashMap();
+
+ static {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByThriftId(int fieldId) {
+ switch (fieldId) {
+ case 1: // VERSION
+ return VERSION;
+ case 2: // AGENT_ID
+ return AGENT_ID;
+ case 3: // APPLICATION_NAME
+ return APPLICATION_NAME;
+ case 4: // AGENT_START_TIME
+ return AGENT_START_TIME;
+ case 5: // TRANSACTION_ID
+ return TRANSACTION_ID;
+ case 6: // SPAN_ID
+ return SPAN_ID;
+ case 7: // REQUEST_BODY
+ return REQUEST_BODY;
+ case 8: // REQUEST_URL
+ return REQUEST_URL;
+ case 9: // REQUEST_HEADER
+ return REQUEST_HEADER;
+ case 10: // RESPONSE_BODY
+ return RESPONSE_BODY;
+ case 11: // RESPONSE_HEADER
+ return RESPONSE_HEADER;
+ case 12: // PARENT_SPAN_ID
+ return PARENT_SPAN_ID;
+ case 13: // STATUS
+ return STATUS;
+ case 14: // WEB_BODY_STRATEGY
+ return WEB_BODY_STRATEGY;
+ case 15: // REQUEST_METHOD
+ return REQUEST_METHOD;
+ case 16: // STATUS_CODE
+ return STATUS_CODE;
+ case 17: // ELAPSED_TIME
+ return ELAPSED_TIME;
+ case 18: // PARENT_APPLICATION_NAME
+ return PARENT_APPLICATION_NAME;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __VERSION_ISSET_ID = 0;
+ private static final int __AGENTSTARTTIME_ISSET_ID = 1;
+ private static final int __SPANID_ISSET_ID = 2;
+ private static final int __PARENTSPANID_ISSET_ID = 3;
+ private static final int __STATUS_ISSET_ID = 4;
+ private static final int __WEBBODYSTRATEGY_ISSET_ID = 5;
+ private static final int __STATUSCODE_ISSET_ID = 6;
+ private static final int __ELAPSEDTIME_ISSET_ID = 7;
+ private byte __isset_bitfield = 0;
+ private static final _Fields optionals[] = {_Fields.VERSION, _Fields.PARENT_SPAN_ID, _Fields.STATUS, _Fields.WEB_BODY_STRATEGY};
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+
+ static {
+ java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.VERSION, new org.apache.thrift.meta_data.FieldMetaData("version", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)));
+ tmpMap.put(_Fields.AGENT_ID, new org.apache.thrift.meta_data.FieldMetaData("agentId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.APPLICATION_NAME, new org.apache.thrift.meta_data.FieldMetaData("applicationName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.AGENT_START_TIME, new org.apache.thrift.meta_data.FieldMetaData("agentStartTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.TRANSACTION_ID, new org.apache.thrift.meta_data.FieldMetaData("transactionId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING, true)));
+ tmpMap.put(_Fields.SPAN_ID, new org.apache.thrift.meta_data.FieldMetaData("spanId", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.REQUEST_BODY, new org.apache.thrift.meta_data.FieldMetaData("requestBody", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.REQUEST_URL, new org.apache.thrift.meta_data.FieldMetaData("requestUrl", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.REQUEST_HEADER, new org.apache.thrift.meta_data.FieldMetaData("requestHeader", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.RESPONSE_BODY, new org.apache.thrift.meta_data.FieldMetaData("responseBody", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.RESPONSE_HEADER, new org.apache.thrift.meta_data.FieldMetaData("responseHeader", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.PARENT_SPAN_ID, new org.apache.thrift.meta_data.FieldMetaData("parentSpanId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.STATUS, new org.apache.thrift.meta_data.FieldMetaData("status", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)));
+ tmpMap.put(_Fields.WEB_BODY_STRATEGY, new org.apache.thrift.meta_data.FieldMetaData("webBodyStrategy", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)));
+ tmpMap.put(_Fields.REQUEST_METHOD, new org.apache.thrift.meta_data.FieldMetaData("requestMethod", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.STATUS_CODE, new org.apache.thrift.meta_data.FieldMetaData("statusCode", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.ELAPSED_TIME, new org.apache.thrift.meta_data.FieldMetaData("elapsedTime", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.PARENT_APPLICATION_NAME, new org.apache.thrift.meta_data.FieldMetaData("parentApplicationName", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TSpanWebInfo.class, metaDataMap);
+ }
+
+ public TSpanWebInfo() {
+ this.version = (byte) 1;
+
+ this.parentSpanId = -1L;
+
+ this.status = (byte) 2;
+
+ this.webBodyStrategy = (byte) 2;
+
+ }
+
+ public TSpanWebInfo(
+ String agentId,
+ String applicationName,
+ long agentStartTime,
+ java.nio.ByteBuffer transactionId,
+ long spanId,
+ String requestBody,
+ String requestUrl,
+ String requestHeader,
+ String responseBody,
+ String responseHeader,
+ String requestMethod,
+ int statusCode,
+ int elapsedTime,
+ String parentApplicationName) {
+ this();
+ this.agentId = agentId;
+ this.applicationName = applicationName;
+ this.agentStartTime = agentStartTime;
+ setAgentStartTimeIsSet(true);
+ this.transactionId = org.apache.thrift.TBaseHelper.copyBinary(transactionId);
+ this.spanId = spanId;
+ setSpanIdIsSet(true);
+ this.requestBody = requestBody;
+ this.requestUrl = requestUrl;
+ this.requestHeader = requestHeader;
+ this.responseBody = responseBody;
+ this.responseHeader = responseHeader;
+ this.requestMethod = requestMethod;
+ this.statusCode = statusCode;
+ setStatusCodeIsSet(true);
+ this.elapsedTime = elapsedTime;
+ setElapsedTimeIsSet(true);
+ this.parentApplicationName = parentApplicationName;
+ }
+
+ /**
+ * Performs a deep copy on other.
+ */
+ public TSpanWebInfo(TSpanWebInfo other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.version = other.version;
+ if (other.isSetAgentId()) {
+ this.agentId = other.agentId;
+ }
+ if (other.isSetApplicationName()) {
+ this.applicationName = other.applicationName;
+ }
+ this.agentStartTime = other.agentStartTime;
+ if (other.isSetTransactionId()) {
+ this.transactionId = org.apache.thrift.TBaseHelper.copyBinary(other.transactionId);
+ }
+ this.spanId = other.spanId;
+ if (other.isSetRequestBody()) {
+ this.requestBody = other.requestBody;
+ }
+ if (other.isSetRequestUrl()) {
+ this.requestUrl = other.requestUrl;
+ }
+ if (other.isSetRequestHeader()) {
+ this.requestHeader = other.requestHeader;
+ }
+ if (other.isSetResponseBody()) {
+ this.responseBody = other.responseBody;
+ }
+ if (other.isSetResponseHeader()) {
+ this.responseHeader = other.responseHeader;
+ }
+ this.parentSpanId = other.parentSpanId;
+ this.status = other.status;
+ this.webBodyStrategy = other.webBodyStrategy;
+ if (other.isSetRequestMethod()) {
+ this.requestMethod = other.requestMethod;
+ }
+ this.statusCode = other.statusCode;
+ this.elapsedTime = other.elapsedTime;
+ if (other.isSetParentApplicationName()) {
+ this.parentApplicationName = other.parentApplicationName;
+ }
+ }
+
+ public TSpanWebInfo deepCopy() {
+ return new TSpanWebInfo(this);
+ }
+
+ @Override
+ public void clear() {
+ this.version = (byte) 1;
+
+ this.agentId = null;
+ this.applicationName = null;
+ setAgentStartTimeIsSet(false);
+ this.agentStartTime = 0;
+ this.transactionId = null;
+ setSpanIdIsSet(false);
+ this.spanId = 0;
+ this.requestBody = null;
+ this.requestUrl = null;
+ this.requestHeader = null;
+ this.responseBody = null;
+ this.responseHeader = null;
+ this.parentSpanId = -1L;
+
+ this.status = (byte) 2;
+
+ this.webBodyStrategy = (byte) 2;
+
+ this.requestMethod = null;
+ setStatusCodeIsSet(false);
+ this.statusCode = 0;
+ setElapsedTimeIsSet(false);
+ this.elapsedTime = 0;
+ this.parentApplicationName = null;
+ }
+
+ public byte getVersion() {
+ return this.version;
+ }
+
+ public TSpanWebInfo setVersion(byte version) {
+ this.version = version;
+ setVersionIsSet(true);
+ return this;
+ }
+
+ public void unsetVersion() {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __VERSION_ISSET_ID);
+ }
+
+ /** Returns true if field version is set (has been assigned a value) and false otherwise */
+ public boolean isSetVersion() {
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __VERSION_ISSET_ID);
+ }
+
+ public void setVersionIsSet(boolean value) {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __VERSION_ISSET_ID, value);
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public String getAgentId() {
+ return this.agentId;
+ }
+
+ public TSpanWebInfo setAgentId(@org.apache.thrift.annotation.Nullable String agentId) {
+ this.agentId = agentId;
+ return this;
+ }
+
+ public void unsetAgentId() {
+ this.agentId = null;
+ }
+
+ /** Returns true if field agentId is set (has been assigned a value) and false otherwise */
+ public boolean isSetAgentId() {
+ return this.agentId != null;
+ }
+
+ public void setAgentIdIsSet(boolean value) {
+ if (!value) {
+ this.agentId = null;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public String getApplicationName() {
+ return this.applicationName;
+ }
+
+ public TSpanWebInfo setApplicationName(@org.apache.thrift.annotation.Nullable String applicationName) {
+ this.applicationName = applicationName;
+ return this;
+ }
+
+ public void unsetApplicationName() {
+ this.applicationName = null;
+ }
+
+ /** Returns true if field applicationName is set (has been assigned a value) and false otherwise */
+ public boolean isSetApplicationName() {
+ return this.applicationName != null;
+ }
+
+ public void setApplicationNameIsSet(boolean value) {
+ if (!value) {
+ this.applicationName = null;
+ }
+ }
+
+ public long getAgentStartTime() {
+ return this.agentStartTime;
+ }
+
+ public TSpanWebInfo setAgentStartTime(long agentStartTime) {
+ this.agentStartTime = agentStartTime;
+ setAgentStartTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetAgentStartTime() {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __AGENTSTARTTIME_ISSET_ID);
+ }
+
+ /** Returns true if field agentStartTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetAgentStartTime() {
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __AGENTSTARTTIME_ISSET_ID);
+ }
+
+ public void setAgentStartTimeIsSet(boolean value) {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __AGENTSTARTTIME_ISSET_ID, value);
+ }
+
+ public byte[] getTransactionId() {
+ setTransactionId(org.apache.thrift.TBaseHelper.rightSize(transactionId));
+ return transactionId == null ? null : transactionId.array();
+ }
+
+ public java.nio.ByteBuffer bufferForTransactionId() {
+ return org.apache.thrift.TBaseHelper.copyBinary(transactionId);
+ }
+
+ public TSpanWebInfo setTransactionId(byte[] transactionId) {
+ this.transactionId = transactionId == null ? (java.nio.ByteBuffer) null : java.nio.ByteBuffer.wrap(transactionId.clone());
+ return this;
+ }
+
+ public TSpanWebInfo setTransactionId(@org.apache.thrift.annotation.Nullable java.nio.ByteBuffer transactionId) {
+ this.transactionId = org.apache.thrift.TBaseHelper.copyBinary(transactionId);
+ return this;
+ }
+
+ public void unsetTransactionId() {
+ this.transactionId = null;
+ }
+
+ /** Returns true if field transactionId is set (has been assigned a value) and false otherwise */
+ public boolean isSetTransactionId() {
+ return this.transactionId != null;
+ }
+
+ public void setTransactionIdIsSet(boolean value) {
+ if (!value) {
+ this.transactionId = null;
+ }
+ }
+
+ public long getSpanId() {
+ return this.spanId;
+ }
+
+ public TSpanWebInfo setSpanId(long spanId) {
+ this.spanId = spanId;
+ setSpanIdIsSet(true);
+ return this;
+ }
+
+ public void unsetSpanId() {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __SPANID_ISSET_ID);
+ }
+
+ /** Returns true if field spanId is set (has been assigned a value) and false otherwise */
+ public boolean isSetSpanId() {
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __SPANID_ISSET_ID);
+ }
+
+ public void setSpanIdIsSet(boolean value) {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __SPANID_ISSET_ID, value);
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public String getRequestBody() {
+ return this.requestBody;
+ }
+
+ public TSpanWebInfo setRequestBody(@org.apache.thrift.annotation.Nullable String requestBody) {
+ this.requestBody = requestBody;
+ return this;
+ }
+
+ public void unsetRequestBody() {
+ this.requestBody = null;
+ }
+
+ /** Returns true if field requestBody is set (has been assigned a value) and false otherwise */
+ public boolean isSetRequestBody() {
+ return this.requestBody != null;
+ }
+
+ public void setRequestBodyIsSet(boolean value) {
+ if (!value) {
+ this.requestBody = null;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public String getRequestUrl() {
+ return this.requestUrl;
+ }
+
+ public TSpanWebInfo setRequestUrl(@org.apache.thrift.annotation.Nullable String requestUrl) {
+ this.requestUrl = requestUrl;
+ return this;
+ }
+
+ public void unsetRequestUrl() {
+ this.requestUrl = null;
+ }
+
+ /** Returns true if field requestUrl is set (has been assigned a value) and false otherwise */
+ public boolean isSetRequestUrl() {
+ return this.requestUrl != null;
+ }
+
+ public void setRequestUrlIsSet(boolean value) {
+ if (!value) {
+ this.requestUrl = null;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public String getRequestHeader() {
+ return this.requestHeader;
+ }
+
+ public TSpanWebInfo setRequestHeader(@org.apache.thrift.annotation.Nullable String requestHeader) {
+ this.requestHeader = requestHeader;
+ return this;
+ }
+
+ public void unsetRequestHeader() {
+ this.requestHeader = null;
+ }
+
+ /** Returns true if field requestHeader is set (has been assigned a value) and false otherwise */
+ public boolean isSetRequestHeader() {
+ return this.requestHeader != null;
+ }
+
+ public void setRequestHeaderIsSet(boolean value) {
+ if (!value) {
+ this.requestHeader = null;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public String getResponseBody() {
+ return this.responseBody;
+ }
+
+ public TSpanWebInfo setResponseBody(@org.apache.thrift.annotation.Nullable String responseBody) {
+ this.responseBody = responseBody;
+ return this;
+ }
+
+ public void unsetResponseBody() {
+ this.responseBody = null;
+ }
+
+ /** Returns true if field responseBody is set (has been assigned a value) and false otherwise */
+ public boolean isSetResponseBody() {
+ return this.responseBody != null;
+ }
+
+ public void setResponseBodyIsSet(boolean value) {
+ if (!value) {
+ this.responseBody = null;
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public String getResponseHeader() {
+ return this.responseHeader;
+ }
+
+ public TSpanWebInfo setResponseHeader(@org.apache.thrift.annotation.Nullable String responseHeader) {
+ this.responseHeader = responseHeader;
+ return this;
+ }
+
+ public void unsetResponseHeader() {
+ this.responseHeader = null;
+ }
+
+ /** Returns true if field responseHeader is set (has been assigned a value) and false otherwise */
+ public boolean isSetResponseHeader() {
+ return this.responseHeader != null;
+ }
+
+ public void setResponseHeaderIsSet(boolean value) {
+ if (!value) {
+ this.responseHeader = null;
+ }
+ }
+
+ public long getParentSpanId() {
+ return this.parentSpanId;
+ }
+
+ public TSpanWebInfo setParentSpanId(long parentSpanId) {
+ this.parentSpanId = parentSpanId;
+ setParentSpanIdIsSet(true);
+ return this;
+ }
+
+ public void unsetParentSpanId() {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __PARENTSPANID_ISSET_ID);
+ }
+
+ /** Returns true if field parentSpanId is set (has been assigned a value) and false otherwise */
+ public boolean isSetParentSpanId() {
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __PARENTSPANID_ISSET_ID);
+ }
+
+ public void setParentSpanIdIsSet(boolean value) {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __PARENTSPANID_ISSET_ID, value);
+ }
+
+ public byte getStatus() {
+ return this.status;
+ }
+
+ public TSpanWebInfo setStatus(byte status) {
+ this.status = status;
+ setStatusIsSet(true);
+ return this;
+ }
+
+ public void unsetStatus() {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATUS_ISSET_ID);
+ }
+
+ /** Returns true if field status is set (has been assigned a value) and false otherwise */
+ public boolean isSetStatus() {
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATUS_ISSET_ID);
+ }
+
+ public void setStatusIsSet(boolean value) {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATUS_ISSET_ID, value);
+ }
+
+ public byte getWebBodyStrategy() {
+ return this.webBodyStrategy;
+ }
+
+ public TSpanWebInfo setWebBodyStrategy(byte webBodyStrategy) {
+ this.webBodyStrategy = webBodyStrategy;
+ setWebBodyStrategyIsSet(true);
+ return this;
+ }
+
+ public void unsetWebBodyStrategy() {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __WEBBODYSTRATEGY_ISSET_ID);
+ }
+
+ /** Returns true if field webBodyStrategy is set (has been assigned a value) and false otherwise */
+ public boolean isSetWebBodyStrategy() {
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __WEBBODYSTRATEGY_ISSET_ID);
+ }
+
+ public void setWebBodyStrategyIsSet(boolean value) {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __WEBBODYSTRATEGY_ISSET_ID, value);
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public String getRequestMethod() {
+ return this.requestMethod;
+ }
+
+ public TSpanWebInfo setRequestMethod(@org.apache.thrift.annotation.Nullable String requestMethod) {
+ this.requestMethod = requestMethod;
+ return this;
+ }
+
+ public void unsetRequestMethod() {
+ this.requestMethod = null;
+ }
+
+ /** Returns true if field requestMethod is set (has been assigned a value) and false otherwise */
+ public boolean isSetRequestMethod() {
+ return this.requestMethod != null;
+ }
+
+ public void setRequestMethodIsSet(boolean value) {
+ if (!value) {
+ this.requestMethod = null;
+ }
+ }
+
+ public int getStatusCode() {
+ return this.statusCode;
+ }
+
+ public TSpanWebInfo setStatusCode(int statusCode) {
+ this.statusCode = statusCode;
+ setStatusCodeIsSet(true);
+ return this;
+ }
+
+ public void unsetStatusCode() {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __STATUSCODE_ISSET_ID);
+ }
+
+ /** Returns true if field statusCode is set (has been assigned a value) and false otherwise */
+ public boolean isSetStatusCode() {
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __STATUSCODE_ISSET_ID);
+ }
+
+ public void setStatusCodeIsSet(boolean value) {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __STATUSCODE_ISSET_ID, value);
+ }
+
+ public int getElapsedTime() {
+ return this.elapsedTime;
+ }
+
+ public TSpanWebInfo setElapsedTime(int elapsedTime) {
+ this.elapsedTime = elapsedTime;
+ setElapsedTimeIsSet(true);
+ return this;
+ }
+
+ public void unsetElapsedTime() {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ELAPSEDTIME_ISSET_ID);
+ }
+
+ /** Returns true if field elapsedTime is set (has been assigned a value) and false otherwise */
+ public boolean isSetElapsedTime() {
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ELAPSEDTIME_ISSET_ID);
+ }
+
+ public void setElapsedTimeIsSet(boolean value) {
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ELAPSEDTIME_ISSET_ID, value);
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public String getParentApplicationName() {
+ return this.parentApplicationName;
+ }
+
+ public TSpanWebInfo setParentApplicationName(@org.apache.thrift.annotation.Nullable String parentApplicationName) {
+ this.parentApplicationName = parentApplicationName;
+ return this;
+ }
+
+ public void unsetParentApplicationName() {
+ this.parentApplicationName = null;
+ }
+
+ /** Returns true if field parentApplicationName is set (has been assigned a value) and false otherwise */
+ public boolean isSetParentApplicationName() {
+ return this.parentApplicationName != null;
+ }
+
+ public void setParentApplicationNameIsSet(boolean value) {
+ if (!value) {
+ this.parentApplicationName = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable Object value) {
+ switch (field) {
+ case VERSION:
+ if (value == null) {
+ unsetVersion();
+ } else {
+ setVersion((Byte) value);
+ }
+ break;
+
+ case AGENT_ID:
+ if (value == null) {
+ unsetAgentId();
+ } else {
+ setAgentId((String) value);
+ }
+ break;
+
+ case APPLICATION_NAME:
+ if (value == null) {
+ unsetApplicationName();
+ } else {
+ setApplicationName((String) value);
+ }
+ break;
+
+ case AGENT_START_TIME:
+ if (value == null) {
+ unsetAgentStartTime();
+ } else {
+ setAgentStartTime((Long) value);
+ }
+ break;
+
+ case TRANSACTION_ID:
+ if (value == null) {
+ unsetTransactionId();
+ } else {
+ if (value instanceof byte[]) {
+ setTransactionId((byte[]) value);
+ } else {
+ setTransactionId((java.nio.ByteBuffer) value);
+ }
+ }
+ break;
+
+ case SPAN_ID:
+ if (value == null) {
+ unsetSpanId();
+ } else {
+ setSpanId((Long) value);
+ }
+ break;
+
+ case REQUEST_BODY:
+ if (value == null) {
+ unsetRequestBody();
+ } else {
+ setRequestBody((String) value);
+ }
+ break;
+
+ case REQUEST_URL:
+ if (value == null) {
+ unsetRequestUrl();
+ } else {
+ setRequestUrl((String) value);
+ }
+ break;
+
+ case REQUEST_HEADER:
+ if (value == null) {
+ unsetRequestHeader();
+ } else {
+ setRequestHeader((String) value);
+ }
+ break;
+
+ case RESPONSE_BODY:
+ if (value == null) {
+ unsetResponseBody();
+ } else {
+ setResponseBody((String) value);
+ }
+ break;
+
+ case RESPONSE_HEADER:
+ if (value == null) {
+ unsetResponseHeader();
+ } else {
+ setResponseHeader((String) value);
+ }
+ break;
+
+ case PARENT_SPAN_ID:
+ if (value == null) {
+ unsetParentSpanId();
+ } else {
+ setParentSpanId((Long) value);
+ }
+ break;
+
+ case STATUS:
+ if (value == null) {
+ unsetStatus();
+ } else {
+ setStatus((Byte) value);
+ }
+ break;
+
+ case WEB_BODY_STRATEGY:
+ if (value == null) {
+ unsetWebBodyStrategy();
+ } else {
+ setWebBodyStrategy((Byte) value);
+ }
+ break;
+
+ case REQUEST_METHOD:
+ if (value == null) {
+ unsetRequestMethod();
+ } else {
+ setRequestMethod((String) value);
+ }
+ break;
+
+ case STATUS_CODE:
+ if (value == null) {
+ unsetStatusCode();
+ } else {
+ setStatusCode((Integer) value);
+ }
+ break;
+
+ case ELAPSED_TIME:
+ if (value == null) {
+ unsetElapsedTime();
+ } else {
+ setElapsedTime((Integer) value);
+ }
+ break;
+
+ case PARENT_APPLICATION_NAME:
+ if (value == null) {
+ unsetParentApplicationName();
+ } else {
+ setParentApplicationName((String) value);
+ }
+ break;
+
+ }
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case VERSION:
+ return getVersion();
+
+ case AGENT_ID:
+ return getAgentId();
+
+ case APPLICATION_NAME:
+ return getApplicationName();
+
+ case AGENT_START_TIME:
+ return getAgentStartTime();
+
+ case TRANSACTION_ID:
+ return getTransactionId();
+
+ case SPAN_ID:
+ return getSpanId();
+
+ case REQUEST_BODY:
+ return getRequestBody();
+
+ case REQUEST_URL:
+ return getRequestUrl();
+
+ case REQUEST_HEADER:
+ return getRequestHeader();
+
+ case RESPONSE_BODY:
+ return getResponseBody();
+
+ case RESPONSE_HEADER:
+ return getResponseHeader();
+
+ case PARENT_SPAN_ID:
+ return getParentSpanId();
+
+ case STATUS:
+ return getStatus();
+
+ case WEB_BODY_STRATEGY:
+ return getWebBodyStrategy();
+
+ case REQUEST_METHOD:
+ return getRequestMethod();
+
+ case STATUS_CODE:
+ return getStatusCode();
+
+ case ELAPSED_TIME:
+ return getElapsedTime();
+
+ case PARENT_APPLICATION_NAME:
+ return getParentApplicationName();
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case VERSION:
+ return isSetVersion();
+ case AGENT_ID:
+ return isSetAgentId();
+ case APPLICATION_NAME:
+ return isSetApplicationName();
+ case AGENT_START_TIME:
+ return isSetAgentStartTime();
+ case TRANSACTION_ID:
+ return isSetTransactionId();
+ case SPAN_ID:
+ return isSetSpanId();
+ case REQUEST_BODY:
+ return isSetRequestBody();
+ case REQUEST_URL:
+ return isSetRequestUrl();
+ case REQUEST_HEADER:
+ return isSetRequestHeader();
+ case RESPONSE_BODY:
+ return isSetResponseBody();
+ case RESPONSE_HEADER:
+ return isSetResponseHeader();
+ case PARENT_SPAN_ID:
+ return isSetParentSpanId();
+ case STATUS:
+ return isSetStatus();
+ case WEB_BODY_STRATEGY:
+ return isSetWebBodyStrategy();
+ case REQUEST_METHOD:
+ return isSetRequestMethod();
+ case STATUS_CODE:
+ return isSetStatusCode();
+ case ELAPSED_TIME:
+ return isSetElapsedTime();
+ case PARENT_APPLICATION_NAME:
+ return isSetParentApplicationName();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof TSpanWebInfo)
+ return this.equals((TSpanWebInfo) that);
+ return false;
+ }
+
+ public boolean equals(TSpanWebInfo that) {
+ if (that == null)
+ return false;
+ if (this == that)
+ return true;
+
+ boolean this_present_version = true && this.isSetVersion();
+ boolean that_present_version = true && that.isSetVersion();
+ if (this_present_version || that_present_version) {
+ if (!(this_present_version && that_present_version))
+ return false;
+ if (this.version != that.version)
+ return false;
+ }
+
+ boolean this_present_agentId = true && this.isSetAgentId();
+ boolean that_present_agentId = true && that.isSetAgentId();
+ if (this_present_agentId || that_present_agentId) {
+ if (!(this_present_agentId && that_present_agentId))
+ return false;
+ if (!this.agentId.equals(that.agentId))
+ return false;
+ }
+
+ boolean this_present_applicationName = true && this.isSetApplicationName();
+ boolean that_present_applicationName = true && that.isSetApplicationName();
+ if (this_present_applicationName || that_present_applicationName) {
+ if (!(this_present_applicationName && that_present_applicationName))
+ return false;
+ if (!this.applicationName.equals(that.applicationName))
+ return false;
+ }
+
+ boolean this_present_agentStartTime = true;
+ boolean that_present_agentStartTime = true;
+ if (this_present_agentStartTime || that_present_agentStartTime) {
+ if (!(this_present_agentStartTime && that_present_agentStartTime))
+ return false;
+ if (this.agentStartTime != that.agentStartTime)
+ return false;
+ }
+
+ boolean this_present_transactionId = true && this.isSetTransactionId();
+ boolean that_present_transactionId = true && that.isSetTransactionId();
+ if (this_present_transactionId || that_present_transactionId) {
+ if (!(this_present_transactionId && that_present_transactionId))
+ return false;
+ if (!this.transactionId.equals(that.transactionId))
+ return false;
+ }
+
+ boolean this_present_spanId = true;
+ boolean that_present_spanId = true;
+ if (this_present_spanId || that_present_spanId) {
+ if (!(this_present_spanId && that_present_spanId))
+ return false;
+ if (this.spanId != that.spanId)
+ return false;
+ }
+
+ boolean this_present_requestBody = true && this.isSetRequestBody();
+ boolean that_present_requestBody = true && that.isSetRequestBody();
+ if (this_present_requestBody || that_present_requestBody) {
+ if (!(this_present_requestBody && that_present_requestBody))
+ return false;
+ if (!this.requestBody.equals(that.requestBody))
+ return false;
+ }
+
+ boolean this_present_requestUrl = true && this.isSetRequestUrl();
+ boolean that_present_requestUrl = true && that.isSetRequestUrl();
+ if (this_present_requestUrl || that_present_requestUrl) {
+ if (!(this_present_requestUrl && that_present_requestUrl))
+ return false;
+ if (!this.requestUrl.equals(that.requestUrl))
+ return false;
+ }
+
+ boolean this_present_requestHeader = true && this.isSetRequestHeader();
+ boolean that_present_requestHeader = true && that.isSetRequestHeader();
+ if (this_present_requestHeader || that_present_requestHeader) {
+ if (!(this_present_requestHeader && that_present_requestHeader))
+ return false;
+ if (!this.requestHeader.equals(that.requestHeader))
+ return false;
+ }
+
+ boolean this_present_responseBody = true && this.isSetResponseBody();
+ boolean that_present_responseBody = true && that.isSetResponseBody();
+ if (this_present_responseBody || that_present_responseBody) {
+ if (!(this_present_responseBody && that_present_responseBody))
+ return false;
+ if (!this.responseBody.equals(that.responseBody))
+ return false;
+ }
+
+ boolean this_present_responseHeader = true && this.isSetResponseHeader();
+ boolean that_present_responseHeader = true && that.isSetResponseHeader();
+ if (this_present_responseHeader || that_present_responseHeader) {
+ if (!(this_present_responseHeader && that_present_responseHeader))
+ return false;
+ if (!this.responseHeader.equals(that.responseHeader))
+ return false;
+ }
+
+ boolean this_present_parentSpanId = true && this.isSetParentSpanId();
+ boolean that_present_parentSpanId = true && that.isSetParentSpanId();
+ if (this_present_parentSpanId || that_present_parentSpanId) {
+ if (!(this_present_parentSpanId && that_present_parentSpanId))
+ return false;
+ if (this.parentSpanId != that.parentSpanId)
+ return false;
+ }
+
+ boolean this_present_status = true && this.isSetStatus();
+ boolean that_present_status = true && that.isSetStatus();
+ if (this_present_status || that_present_status) {
+ if (!(this_present_status && that_present_status))
+ return false;
+ if (this.status != that.status)
+ return false;
+ }
+
+ boolean this_present_webBodyStrategy = true && this.isSetWebBodyStrategy();
+ boolean that_present_webBodyStrategy = true && that.isSetWebBodyStrategy();
+ if (this_present_webBodyStrategy || that_present_webBodyStrategy) {
+ if (!(this_present_webBodyStrategy && that_present_webBodyStrategy))
+ return false;
+ if (this.webBodyStrategy != that.webBodyStrategy)
+ return false;
+ }
+
+ boolean this_present_requestMethod = true && this.isSetRequestMethod();
+ boolean that_present_requestMethod = true && that.isSetRequestMethod();
+ if (this_present_requestMethod || that_present_requestMethod) {
+ if (!(this_present_requestMethod && that_present_requestMethod))
+ return false;
+ if (!this.requestMethod.equals(that.requestMethod))
+ return false;
+ }
+
+ boolean this_present_statusCode = true;
+ boolean that_present_statusCode = true;
+ if (this_present_statusCode || that_present_statusCode) {
+ if (!(this_present_statusCode && that_present_statusCode))
+ return false;
+ if (this.statusCode != that.statusCode)
+ return false;
+ }
+
+ boolean this_present_elapsedTime = true;
+ boolean that_present_elapsedTime = true;
+ if (this_present_elapsedTime || that_present_elapsedTime) {
+ if (!(this_present_elapsedTime && that_present_elapsedTime))
+ return false;
+ if (this.elapsedTime != that.elapsedTime)
+ return false;
+ }
+
+ boolean this_present_parentApplicationName = true && this.isSetParentApplicationName();
+ boolean that_present_parentApplicationName = true && that.isSetParentApplicationName();
+ if (this_present_parentApplicationName || that_present_parentApplicationName) {
+ if (!(this_present_parentApplicationName && that_present_parentApplicationName))
+ return false;
+ if (!this.parentApplicationName.equals(that.parentApplicationName))
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int hashCode = 1;
+
+ hashCode = hashCode * 8191 + ((isSetVersion()) ? 131071 : 524287);
+ if (isSetVersion())
+ hashCode = hashCode * 8191 + (int) (version);
+
+ hashCode = hashCode * 8191 + ((isSetAgentId()) ? 131071 : 524287);
+ if (isSetAgentId())
+ hashCode = hashCode * 8191 + agentId.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetApplicationName()) ? 131071 : 524287);
+ if (isSetApplicationName())
+ hashCode = hashCode * 8191 + applicationName.hashCode();
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(agentStartTime);
+
+ hashCode = hashCode * 8191 + ((isSetTransactionId()) ? 131071 : 524287);
+ if (isSetTransactionId())
+ hashCode = hashCode * 8191 + transactionId.hashCode();
+
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(spanId);
+
+ hashCode = hashCode * 8191 + ((isSetRequestBody()) ? 131071 : 524287);
+ if (isSetRequestBody())
+ hashCode = hashCode * 8191 + requestBody.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetRequestUrl()) ? 131071 : 524287);
+ if (isSetRequestUrl())
+ hashCode = hashCode * 8191 + requestUrl.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetRequestHeader()) ? 131071 : 524287);
+ if (isSetRequestHeader())
+ hashCode = hashCode * 8191 + requestHeader.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetResponseBody()) ? 131071 : 524287);
+ if (isSetResponseBody())
+ hashCode = hashCode * 8191 + responseBody.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetResponseHeader()) ? 131071 : 524287);
+ if (isSetResponseHeader())
+ hashCode = hashCode * 8191 + responseHeader.hashCode();
+
+ hashCode = hashCode * 8191 + ((isSetParentSpanId()) ? 131071 : 524287);
+ if (isSetParentSpanId())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(parentSpanId);
+
+ hashCode = hashCode * 8191 + ((isSetStatus()) ? 131071 : 524287);
+ if (isSetStatus())
+ hashCode = hashCode * 8191 + (int) (status);
+
+ hashCode = hashCode * 8191 + ((isSetWebBodyStrategy()) ? 131071 : 524287);
+ if (isSetWebBodyStrategy())
+ hashCode = hashCode * 8191 + (int) (webBodyStrategy);
+
+ hashCode = hashCode * 8191 + ((isSetRequestMethod()) ? 131071 : 524287);
+ if (isSetRequestMethod())
+ hashCode = hashCode * 8191 + requestMethod.hashCode();
+
+ hashCode = hashCode * 8191 + statusCode;
+
+ hashCode = hashCode * 8191 + elapsedTime;
+
+ hashCode = hashCode * 8191 + ((isSetParentApplicationName()) ? 131071 : 524287);
+ if (isSetParentApplicationName())
+ hashCode = hashCode * 8191 + parentApplicationName.hashCode();
+
+ return hashCode;
+ }
+
+ @Override
+ public int compareTo(TSpanWebInfo other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+
+ lastComparison = Boolean.valueOf(isSetVersion()).compareTo(other.isSetVersion());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetVersion()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.version, other.version);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAgentId()).compareTo(other.isSetAgentId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAgentId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentId, other.agentId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetApplicationName()).compareTo(other.isSetApplicationName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetApplicationName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.applicationName, other.applicationName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetAgentStartTime()).compareTo(other.isSetAgentStartTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetAgentStartTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.agentStartTime, other.agentStartTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(other.isSetTransactionId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetTransactionId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.transactionId, other.transactionId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetSpanId()).compareTo(other.isSetSpanId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetSpanId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spanId, other.spanId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetRequestBody()).compareTo(other.isSetRequestBody());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRequestBody()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestBody, other.requestBody);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetRequestUrl()).compareTo(other.isSetRequestUrl());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRequestUrl()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestUrl, other.requestUrl);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetRequestHeader()).compareTo(other.isSetRequestHeader());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRequestHeader()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestHeader, other.requestHeader);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetResponseBody()).compareTo(other.isSetResponseBody());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetResponseBody()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.responseBody, other.responseBody);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetResponseHeader()).compareTo(other.isSetResponseHeader());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetResponseHeader()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.responseHeader, other.responseHeader);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetParentSpanId()).compareTo(other.isSetParentSpanId());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetParentSpanId()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentSpanId, other.parentSpanId);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetStatus()).compareTo(other.isSetStatus());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStatus()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.status, other.status);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetWebBodyStrategy()).compareTo(other.isSetWebBodyStrategy());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetWebBodyStrategy()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.webBodyStrategy, other.webBodyStrategy);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetRequestMethod()).compareTo(other.isSetRequestMethod());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRequestMethod()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.requestMethod, other.requestMethod);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetStatusCode()).compareTo(other.isSetStatusCode());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetStatusCode()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.statusCode, other.statusCode);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetElapsedTime()).compareTo(other.isSetElapsedTime());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetElapsedTime()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.elapsedTime, other.elapsedTime);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetParentApplicationName()).compareTo(other.isSetParentApplicationName());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetParentApplicationName()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.parentApplicationName, other.parentApplicationName);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("TSpanWebInfo(");
+ boolean first = true;
+
+ if (isSetVersion()) {
+ sb.append("version:");
+ sb.append(this.version);
+ first = false;
+ }
+ if (!first) sb.append(", ");
+ sb.append("agentId:");
+ if (this.agentId == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.agentId);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("applicationName:");
+ if (this.applicationName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.applicationName);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("agentStartTime:");
+ sb.append(this.agentStartTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("transactionId:");
+ if (this.transactionId == null) {
+ sb.append("null");
+ } else {
+ org.apache.thrift.TBaseHelper.toString(this.transactionId, sb);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("spanId:");
+ sb.append(this.spanId);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("requestBody:");
+ if (this.requestBody == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.requestBody);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("requestUrl:");
+ if (this.requestUrl == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.requestUrl);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("requestHeader:");
+ if (this.requestHeader == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.requestHeader);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("responseBody:");
+ if (this.responseBody == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.responseBody);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("responseHeader:");
+ if (this.responseHeader == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.responseHeader);
+ }
+ first = false;
+ if (isSetParentSpanId()) {
+ if (!first) sb.append(", ");
+ sb.append("parentSpanId:");
+ sb.append(this.parentSpanId);
+ first = false;
+ }
+ if (isSetStatus()) {
+ if (!first) sb.append(", ");
+ sb.append("status:");
+ sb.append(this.status);
+ first = false;
+ }
+ if (isSetWebBodyStrategy()) {
+ if (!first) sb.append(", ");
+ sb.append("webBodyStrategy:");
+ sb.append(this.webBodyStrategy);
+ first = false;
+ }
+ if (!first) sb.append(", ");
+ sb.append("requestMethod:");
+ if (this.requestMethod == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.requestMethod);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("statusCode:");
+ sb.append(this.statusCode);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("elapsedTime:");
+ sb.append(this.elapsedTime);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("parentApplicationName:");
+ if (this.parentApplicationName == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.parentApplicationName);
+ }
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class TSpanWebInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ public TSpanWebInfoStandardScheme getScheme() {
+ return new TSpanWebInfoStandardScheme();
+ }
+ }
+
+ private static class TSpanWebInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, TSpanWebInfo struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true) {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // VERSION
+ if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) {
+ struct.version = iprot.readByte();
+ struct.setVersionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // AGENT_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.agentId = iprot.readString();
+ struct.setAgentIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // APPLICATION_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.applicationName = iprot.readString();
+ struct.setApplicationNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 4: // AGENT_START_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.agentStartTime = iprot.readI64();
+ struct.setAgentStartTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 5: // TRANSACTION_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.transactionId = iprot.readBinary();
+ struct.setTransactionIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 6: // SPAN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.spanId = iprot.readI64();
+ struct.setSpanIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 7: // REQUEST_BODY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.requestBody = iprot.readString();
+ struct.setRequestBodyIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 8: // REQUEST_URL
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.requestUrl = iprot.readString();
+ struct.setRequestUrlIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 9: // REQUEST_HEADER
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.requestHeader = iprot.readString();
+ struct.setRequestHeaderIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 10: // RESPONSE_BODY
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.responseBody = iprot.readString();
+ struct.setResponseBodyIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 11: // RESPONSE_HEADER
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.responseHeader = iprot.readString();
+ struct.setResponseHeaderIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 12: // PARENT_SPAN_ID
+ if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
+ struct.parentSpanId = iprot.readI64();
+ struct.setParentSpanIdIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 13: // STATUS
+ if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) {
+ struct.status = iprot.readByte();
+ struct.setStatusIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 14: // WEB_BODY_STRATEGY
+ if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) {
+ struct.webBodyStrategy = iprot.readByte();
+ struct.setWebBodyStrategyIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 15: // REQUEST_METHOD
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.requestMethod = iprot.readString();
+ struct.setRequestMethodIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 16: // STATUS_CODE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.statusCode = iprot.readI32();
+ struct.setStatusCodeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 17: // ELAPSED_TIME
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.elapsedTime = iprot.readI32();
+ struct.setElapsedTimeIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 18: // PARENT_APPLICATION_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct.parentApplicationName = iprot.readString();
+ struct.setParentApplicationNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, TSpanWebInfo struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ if (struct.isSetVersion()) {
+ oprot.writeFieldBegin(VERSION_FIELD_DESC);
+ oprot.writeByte(struct.version);
+ oprot.writeFieldEnd();
+ }
+ if (struct.agentId != null) {
+ oprot.writeFieldBegin(AGENT_ID_FIELD_DESC);
+ oprot.writeString(struct.agentId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.applicationName != null) {
+ oprot.writeFieldBegin(APPLICATION_NAME_FIELD_DESC);
+ oprot.writeString(struct.applicationName);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(AGENT_START_TIME_FIELD_DESC);
+ oprot.writeI64(struct.agentStartTime);
+ oprot.writeFieldEnd();
+ if (struct.transactionId != null) {
+ oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
+ oprot.writeBinary(struct.transactionId);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(SPAN_ID_FIELD_DESC);
+ oprot.writeI64(struct.spanId);
+ oprot.writeFieldEnd();
+ if (struct.requestBody != null) {
+ oprot.writeFieldBegin(REQUEST_BODY_FIELD_DESC);
+ oprot.writeString(struct.requestBody);
+ oprot.writeFieldEnd();
+ }
+ if (struct.requestUrl != null) {
+ oprot.writeFieldBegin(REQUEST_URL_FIELD_DESC);
+ oprot.writeString(struct.requestUrl);
+ oprot.writeFieldEnd();
+ }
+ if (struct.requestHeader != null) {
+ oprot.writeFieldBegin(REQUEST_HEADER_FIELD_DESC);
+ oprot.writeString(struct.requestHeader);
+ oprot.writeFieldEnd();
+ }
+ if (struct.responseBody != null) {
+ oprot.writeFieldBegin(RESPONSE_BODY_FIELD_DESC);
+ oprot.writeString(struct.responseBody);
+ oprot.writeFieldEnd();
+ }
+ if (struct.responseHeader != null) {
+ oprot.writeFieldBegin(RESPONSE_HEADER_FIELD_DESC);
+ oprot.writeString(struct.responseHeader);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetParentSpanId()) {
+ oprot.writeFieldBegin(PARENT_SPAN_ID_FIELD_DESC);
+ oprot.writeI64(struct.parentSpanId);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetStatus()) {
+ oprot.writeFieldBegin(STATUS_FIELD_DESC);
+ oprot.writeByte(struct.status);
+ oprot.writeFieldEnd();
+ }
+ if (struct.isSetWebBodyStrategy()) {
+ oprot.writeFieldBegin(WEB_BODY_STRATEGY_FIELD_DESC);
+ oprot.writeByte(struct.webBodyStrategy);
+ oprot.writeFieldEnd();
+ }
+ if (struct.requestMethod != null) {
+ oprot.writeFieldBegin(REQUEST_METHOD_FIELD_DESC);
+ oprot.writeString(struct.requestMethod);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(STATUS_CODE_FIELD_DESC);
+ oprot.writeI32(struct.statusCode);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(ELAPSED_TIME_FIELD_DESC);
+ oprot.writeI32(struct.elapsedTime);
+ oprot.writeFieldEnd();
+ if (struct.parentApplicationName != null) {
+ oprot.writeFieldBegin(PARENT_APPLICATION_NAME_FIELD_DESC);
+ oprot.writeString(struct.parentApplicationName);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class TSpanWebInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
+ public TSpanWebInfoTupleScheme getScheme() {
+ return new TSpanWebInfoTupleScheme();
+ }
+ }
+
+ private static class TSpanWebInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, TSpanWebInfo struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
+ if (struct.isSetVersion()) {
+ optionals.set(0);
+ }
+ if (struct.isSetAgentId()) {
+ optionals.set(1);
+ }
+ if (struct.isSetApplicationName()) {
+ optionals.set(2);
+ }
+ if (struct.isSetAgentStartTime()) {
+ optionals.set(3);
+ }
+ if (struct.isSetTransactionId()) {
+ optionals.set(4);
+ }
+ if (struct.isSetSpanId()) {
+ optionals.set(5);
+ }
+ if (struct.isSetRequestBody()) {
+ optionals.set(6);
+ }
+ if (struct.isSetRequestUrl()) {
+ optionals.set(7);
+ }
+ if (struct.isSetRequestHeader()) {
+ optionals.set(8);
+ }
+ if (struct.isSetResponseBody()) {
+ optionals.set(9);
+ }
+ if (struct.isSetResponseHeader()) {
+ optionals.set(10);
+ }
+ if (struct.isSetParentSpanId()) {
+ optionals.set(11);
+ }
+ if (struct.isSetStatus()) {
+ optionals.set(12);
+ }
+ if (struct.isSetWebBodyStrategy()) {
+ optionals.set(13);
+ }
+ if (struct.isSetRequestMethod()) {
+ optionals.set(14);
+ }
+ if (struct.isSetStatusCode()) {
+ optionals.set(15);
+ }
+ if (struct.isSetElapsedTime()) {
+ optionals.set(16);
+ }
+ if (struct.isSetParentApplicationName()) {
+ optionals.set(17);
+ }
+ oprot.writeBitSet(optionals, 18);
+ if (struct.isSetVersion()) {
+ oprot.writeByte(struct.version);
+ }
+ if (struct.isSetAgentId()) {
+ oprot.writeString(struct.agentId);
+ }
+ if (struct.isSetApplicationName()) {
+ oprot.writeString(struct.applicationName);
+ }
+ if (struct.isSetAgentStartTime()) {
+ oprot.writeI64(struct.agentStartTime);
+ }
+ if (struct.isSetTransactionId()) {
+ oprot.writeBinary(struct.transactionId);
+ }
+ if (struct.isSetSpanId()) {
+ oprot.writeI64(struct.spanId);
+ }
+ if (struct.isSetRequestBody()) {
+ oprot.writeString(struct.requestBody);
+ }
+ if (struct.isSetRequestUrl()) {
+ oprot.writeString(struct.requestUrl);
+ }
+ if (struct.isSetRequestHeader()) {
+ oprot.writeString(struct.requestHeader);
+ }
+ if (struct.isSetResponseBody()) {
+ oprot.writeString(struct.responseBody);
+ }
+ if (struct.isSetResponseHeader()) {
+ oprot.writeString(struct.responseHeader);
+ }
+ if (struct.isSetParentSpanId()) {
+ oprot.writeI64(struct.parentSpanId);
+ }
+ if (struct.isSetStatus()) {
+ oprot.writeByte(struct.status);
+ }
+ if (struct.isSetWebBodyStrategy()) {
+ oprot.writeByte(struct.webBodyStrategy);
+ }
+ if (struct.isSetRequestMethod()) {
+ oprot.writeString(struct.requestMethod);
+ }
+ if (struct.isSetStatusCode()) {
+ oprot.writeI32(struct.statusCode);
+ }
+ if (struct.isSetElapsedTime()) {
+ oprot.writeI32(struct.elapsedTime);
+ }
+ if (struct.isSetParentApplicationName()) {
+ oprot.writeString(struct.parentApplicationName);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, TSpanWebInfo struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(18);
+ if (incoming.get(0)) {
+ struct.version = iprot.readByte();
+ struct.setVersionIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.agentId = iprot.readString();
+ struct.setAgentIdIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct.applicationName = iprot.readString();
+ struct.setApplicationNameIsSet(true);
+ }
+ if (incoming.get(3)) {
+ struct.agentStartTime = iprot.readI64();
+ struct.setAgentStartTimeIsSet(true);
+ }
+ if (incoming.get(4)) {
+ struct.transactionId = iprot.readBinary();
+ struct.setTransactionIdIsSet(true);
+ }
+ if (incoming.get(5)) {
+ struct.spanId = iprot.readI64();
+ struct.setSpanIdIsSet(true);
+ }
+ if (incoming.get(6)) {
+ struct.requestBody = iprot.readString();
+ struct.setRequestBodyIsSet(true);
+ }
+ if (incoming.get(7)) {
+ struct.requestUrl = iprot.readString();
+ struct.setRequestUrlIsSet(true);
+ }
+ if (incoming.get(8)) {
+ struct.requestHeader = iprot.readString();
+ struct.setRequestHeaderIsSet(true);
+ }
+ if (incoming.get(9)) {
+ struct.responseBody = iprot.readString();
+ struct.setResponseBodyIsSet(true);
+ }
+ if (incoming.get(10)) {
+ struct.responseHeader = iprot.readString();
+ struct.setResponseHeaderIsSet(true);
+ }
+ if (incoming.get(11)) {
+ struct.parentSpanId = iprot.readI64();
+ struct.setParentSpanIdIsSet(true);
+ }
+ if (incoming.get(12)) {
+ struct.status = iprot.readByte();
+ struct.setStatusIsSet(true);
+ }
+ if (incoming.get(13)) {
+ struct.webBodyStrategy = iprot.readByte();
+ struct.setWebBodyStrategyIsSet(true);
+ }
+ if (incoming.get(14)) {
+ struct.requestMethod = iprot.readString();
+ struct.setRequestMethodIsSet(true);
+ }
+ if (incoming.get(15)) {
+ struct.statusCode = iprot.readI32();
+ struct.setStatusCodeIsSet(true);
+ }
+ if (incoming.get(16)) {
+ struct.elapsedTime = iprot.readI32();
+ struct.setElapsedTimeIsSet(true);
+ }
+ if (incoming.get(17)) {
+ struct.parentApplicationName = iprot.readString();
+ struct.setParentApplicationNameIsSet(true);
+ }
+ }
+ }
+
+ private static S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
+}
+
diff --git a/thrift/src/main/java/com/navercorp/pinpoint/thrift/io/DefaultTBaseLocator.java b/thrift/src/main/java/com/navercorp/pinpoint/thrift/io/DefaultTBaseLocator.java
index e82f50ca8426..61e74d416bda 100644
--- a/thrift/src/main/java/com/navercorp/pinpoint/thrift/io/DefaultTBaseLocator.java
+++ b/thrift/src/main/java/com/navercorp/pinpoint/thrift/io/DefaultTBaseLocator.java
@@ -19,16 +19,7 @@
import com.navercorp.pinpoint.io.util.BodyFactory;
import com.navercorp.pinpoint.io.util.TypeLocator;
import com.navercorp.pinpoint.io.util.TypeLocatorBuilder;
-import com.navercorp.pinpoint.thrift.dto.TAgentInfo;
-import com.navercorp.pinpoint.thrift.dto.TAgentStat;
-import com.navercorp.pinpoint.thrift.dto.TAgentStatBatch;
-import com.navercorp.pinpoint.thrift.dto.TApiMetaData;
-import com.navercorp.pinpoint.thrift.dto.TResult;
-import com.navercorp.pinpoint.thrift.dto.TSpan;
-import com.navercorp.pinpoint.thrift.dto.TSpanChunk;
-import com.navercorp.pinpoint.thrift.dto.TSpanEvent;
-import com.navercorp.pinpoint.thrift.dto.TSqlMetaData;
-import com.navercorp.pinpoint.thrift.dto.TStringMetaData;
+import com.navercorp.pinpoint.thrift.dto.*;
import org.apache.thrift.TBase;
@@ -69,6 +60,8 @@ public class DefaultTBaseLocator {
public static final short CHUNK = 400;
+ public static final short SPAN_WEB_INFO = 410;
+
private static final TypeLocator> typeLocator = build();
public static TypeLocator>build() {
@@ -86,6 +79,13 @@ public static void addBodyFactory(TypeLocatorBuilder> builder) {
}
});
+ builder.addBodyFactory(SPAN_WEB_INFO, new BodyFactory>() {
+ @Override
+ public TBase, ?> getObject() {
+ return new TSpanWebInfo();
+ }
+ });
+
builder.addBodyFactory(AGENT_INFO, new BodyFactory>() {
@Override
public TBase, ?> getObject() {