@miradorlabs/parallax-web 1.0.6 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -702,22 +702,10 @@ function requireParallax_gateway_pb () {
702
702
  goog.object.extend(proto, google_protobuf_timestamp_pb);
703
703
  var proto_common_v1_status_pb = requireStatus_pb();
704
704
  goog.object.extend(proto, proto_common_v1_status_pb);
705
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanErrorRequest', null, global);
706
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanErrorResponse', null, global);
707
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanEventRequest', null, global);
708
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanEventResponse', null, global);
709
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanHintRequest', null, global);
710
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction', null, global);
711
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanHintRequest.HintTypeCase', null, global);
712
- goog.exportSymbol('proto.gateway.parallax.v1.AddSpanHintResponse', null, global);
713
705
  goog.exportSymbol('proto.gateway.parallax.v1.CreateTraceRequest', null, global);
706
+ goog.exportSymbol('proto.gateway.parallax.v1.CreateTraceRequest.Event', null, global);
707
+ goog.exportSymbol('proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint', null, global);
714
708
  goog.exportSymbol('proto.gateway.parallax.v1.CreateTraceResponse', null, global);
715
- goog.exportSymbol('proto.gateway.parallax.v1.FinishSpanRequest', null, global);
716
- goog.exportSymbol('proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus', null, global);
717
- goog.exportSymbol('proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.StatusCode', null, global);
718
- goog.exportSymbol('proto.gateway.parallax.v1.FinishSpanResponse', null, global);
719
- goog.exportSymbol('proto.gateway.parallax.v1.StartSpanRequest', null, global);
720
- goog.exportSymbol('proto.gateway.parallax.v1.StartSpanResponse', null, global);
721
709
  /**
722
710
  * Generated by JsPbCodeGenerator.
723
711
  * @param {Array=} opt_data Optional initial data array, typically from a
@@ -749,226 +737,16 @@ function requireParallax_gateway_pb () {
749
737
  * @extends {jspb.Message}
750
738
  * @constructor
751
739
  */
752
- proto.gateway.parallax.v1.CreateTraceResponse = function(opt_data) {
753
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
754
- };
755
- goog.inherits(proto.gateway.parallax.v1.CreateTraceResponse, jspb.Message);
756
- if (goog.DEBUG && !COMPILED) {
757
- /**
758
- * @public
759
- * @override
760
- */
761
- proto.gateway.parallax.v1.CreateTraceResponse.displayName = 'proto.gateway.parallax.v1.CreateTraceResponse';
762
- }
763
- /**
764
- * Generated by JsPbCodeGenerator.
765
- * @param {Array=} opt_data Optional initial data array, typically from a
766
- * server response, or constructed directly in Javascript. The array is used
767
- * in place and becomes part of the constructed object. It is not cloned.
768
- * If no data is provided, the constructed object will be empty, but still
769
- * valid.
770
- * @extends {jspb.Message}
771
- * @constructor
772
- */
773
- proto.gateway.parallax.v1.StartSpanRequest = function(opt_data) {
774
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
775
- };
776
- goog.inherits(proto.gateway.parallax.v1.StartSpanRequest, jspb.Message);
777
- if (goog.DEBUG && !COMPILED) {
778
- /**
779
- * @public
780
- * @override
781
- */
782
- proto.gateway.parallax.v1.StartSpanRequest.displayName = 'proto.gateway.parallax.v1.StartSpanRequest';
783
- }
784
- /**
785
- * Generated by JsPbCodeGenerator.
786
- * @param {Array=} opt_data Optional initial data array, typically from a
787
- * server response, or constructed directly in Javascript. The array is used
788
- * in place and becomes part of the constructed object. It is not cloned.
789
- * If no data is provided, the constructed object will be empty, but still
790
- * valid.
791
- * @extends {jspb.Message}
792
- * @constructor
793
- */
794
- proto.gateway.parallax.v1.StartSpanResponse = function(opt_data) {
795
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
796
- };
797
- goog.inherits(proto.gateway.parallax.v1.StartSpanResponse, jspb.Message);
798
- if (goog.DEBUG && !COMPILED) {
799
- /**
800
- * @public
801
- * @override
802
- */
803
- proto.gateway.parallax.v1.StartSpanResponse.displayName = 'proto.gateway.parallax.v1.StartSpanResponse';
804
- }
805
- /**
806
- * Generated by JsPbCodeGenerator.
807
- * @param {Array=} opt_data Optional initial data array, typically from a
808
- * server response, or constructed directly in Javascript. The array is used
809
- * in place and becomes part of the constructed object. It is not cloned.
810
- * If no data is provided, the constructed object will be empty, but still
811
- * valid.
812
- * @extends {jspb.Message}
813
- * @constructor
814
- */
815
- proto.gateway.parallax.v1.FinishSpanRequest = function(opt_data) {
816
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
817
- };
818
- goog.inherits(proto.gateway.parallax.v1.FinishSpanRequest, jspb.Message);
819
- if (goog.DEBUG && !COMPILED) {
820
- /**
821
- * @public
822
- * @override
823
- */
824
- proto.gateway.parallax.v1.FinishSpanRequest.displayName = 'proto.gateway.parallax.v1.FinishSpanRequest';
825
- }
826
- /**
827
- * Generated by JsPbCodeGenerator.
828
- * @param {Array=} opt_data Optional initial data array, typically from a
829
- * server response, or constructed directly in Javascript. The array is used
830
- * in place and becomes part of the constructed object. It is not cloned.
831
- * If no data is provided, the constructed object will be empty, but still
832
- * valid.
833
- * @extends {jspb.Message}
834
- * @constructor
835
- */
836
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus = function(opt_data) {
837
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
838
- };
839
- goog.inherits(proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus, jspb.Message);
840
- if (goog.DEBUG && !COMPILED) {
841
- /**
842
- * @public
843
- * @override
844
- */
845
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.displayName = 'proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus';
846
- }
847
- /**
848
- * Generated by JsPbCodeGenerator.
849
- * @param {Array=} opt_data Optional initial data array, typically from a
850
- * server response, or constructed directly in Javascript. The array is used
851
- * in place and becomes part of the constructed object. It is not cloned.
852
- * If no data is provided, the constructed object will be empty, but still
853
- * valid.
854
- * @extends {jspb.Message}
855
- * @constructor
856
- */
857
- proto.gateway.parallax.v1.FinishSpanResponse = function(opt_data) {
858
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
859
- };
860
- goog.inherits(proto.gateway.parallax.v1.FinishSpanResponse, jspb.Message);
861
- if (goog.DEBUG && !COMPILED) {
862
- /**
863
- * @public
864
- * @override
865
- */
866
- proto.gateway.parallax.v1.FinishSpanResponse.displayName = 'proto.gateway.parallax.v1.FinishSpanResponse';
867
- }
868
- /**
869
- * Generated by JsPbCodeGenerator.
870
- * @param {Array=} opt_data Optional initial data array, typically from a
871
- * server response, or constructed directly in Javascript. The array is used
872
- * in place and becomes part of the constructed object. It is not cloned.
873
- * If no data is provided, the constructed object will be empty, but still
874
- * valid.
875
- * @extends {jspb.Message}
876
- * @constructor
877
- */
878
- proto.gateway.parallax.v1.AddSpanEventRequest = function(opt_data) {
879
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
880
- };
881
- goog.inherits(proto.gateway.parallax.v1.AddSpanEventRequest, jspb.Message);
882
- if (goog.DEBUG && !COMPILED) {
883
- /**
884
- * @public
885
- * @override
886
- */
887
- proto.gateway.parallax.v1.AddSpanEventRequest.displayName = 'proto.gateway.parallax.v1.AddSpanEventRequest';
888
- }
889
- /**
890
- * Generated by JsPbCodeGenerator.
891
- * @param {Array=} opt_data Optional initial data array, typically from a
892
- * server response, or constructed directly in Javascript. The array is used
893
- * in place and becomes part of the constructed object. It is not cloned.
894
- * If no data is provided, the constructed object will be empty, but still
895
- * valid.
896
- * @extends {jspb.Message}
897
- * @constructor
898
- */
899
- proto.gateway.parallax.v1.AddSpanEventResponse = function(opt_data) {
900
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
901
- };
902
- goog.inherits(proto.gateway.parallax.v1.AddSpanEventResponse, jspb.Message);
903
- if (goog.DEBUG && !COMPILED) {
904
- /**
905
- * @public
906
- * @override
907
- */
908
- proto.gateway.parallax.v1.AddSpanEventResponse.displayName = 'proto.gateway.parallax.v1.AddSpanEventResponse';
909
- }
910
- /**
911
- * Generated by JsPbCodeGenerator.
912
- * @param {Array=} opt_data Optional initial data array, typically from a
913
- * server response, or constructed directly in Javascript. The array is used
914
- * in place and becomes part of the constructed object. It is not cloned.
915
- * If no data is provided, the constructed object will be empty, but still
916
- * valid.
917
- * @extends {jspb.Message}
918
- * @constructor
919
- */
920
- proto.gateway.parallax.v1.AddSpanErrorRequest = function(opt_data) {
921
- jspb.Message.initialize(this, opt_data, 0, -1, null, null);
922
- };
923
- goog.inherits(proto.gateway.parallax.v1.AddSpanErrorRequest, jspb.Message);
924
- if (goog.DEBUG && !COMPILED) {
925
- /**
926
- * @public
927
- * @override
928
- */
929
- proto.gateway.parallax.v1.AddSpanErrorRequest.displayName = 'proto.gateway.parallax.v1.AddSpanErrorRequest';
930
- }
931
- /**
932
- * Generated by JsPbCodeGenerator.
933
- * @param {Array=} opt_data Optional initial data array, typically from a
934
- * server response, or constructed directly in Javascript. The array is used
935
- * in place and becomes part of the constructed object. It is not cloned.
936
- * If no data is provided, the constructed object will be empty, but still
937
- * valid.
938
- * @extends {jspb.Message}
939
- * @constructor
940
- */
941
- proto.gateway.parallax.v1.AddSpanErrorResponse = function(opt_data) {
740
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint = function(opt_data) {
942
741
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
943
742
  };
944
- goog.inherits(proto.gateway.parallax.v1.AddSpanErrorResponse, jspb.Message);
945
- if (goog.DEBUG && !COMPILED) {
946
- /**
947
- * @public
948
- * @override
949
- */
950
- proto.gateway.parallax.v1.AddSpanErrorResponse.displayName = 'proto.gateway.parallax.v1.AddSpanErrorResponse';
951
- }
952
- /**
953
- * Generated by JsPbCodeGenerator.
954
- * @param {Array=} opt_data Optional initial data array, typically from a
955
- * server response, or constructed directly in Javascript. The array is used
956
- * in place and becomes part of the constructed object. It is not cloned.
957
- * If no data is provided, the constructed object will be empty, but still
958
- * valid.
959
- * @extends {jspb.Message}
960
- * @constructor
961
- */
962
- proto.gateway.parallax.v1.AddSpanHintRequest = function(opt_data) {
963
- jspb.Message.initialize(this, opt_data, 0, -1, null, proto.gateway.parallax.v1.AddSpanHintRequest.oneofGroups_);
964
- };
965
- goog.inherits(proto.gateway.parallax.v1.AddSpanHintRequest, jspb.Message);
743
+ goog.inherits(proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint, jspb.Message);
966
744
  if (goog.DEBUG && !COMPILED) {
967
745
  /**
968
746
  * @public
969
747
  * @override
970
748
  */
971
- proto.gateway.parallax.v1.AddSpanHintRequest.displayName = 'proto.gateway.parallax.v1.AddSpanHintRequest';
749
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.displayName = 'proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint';
972
750
  }
973
751
  /**
974
752
  * Generated by JsPbCodeGenerator.
@@ -980,16 +758,16 @@ function requireParallax_gateway_pb () {
980
758
  * @extends {jspb.Message}
981
759
  * @constructor
982
760
  */
983
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction = function(opt_data) {
761
+ proto.gateway.parallax.v1.CreateTraceRequest.Event = function(opt_data) {
984
762
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
985
763
  };
986
- goog.inherits(proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction, jspb.Message);
764
+ goog.inherits(proto.gateway.parallax.v1.CreateTraceRequest.Event, jspb.Message);
987
765
  if (goog.DEBUG && !COMPILED) {
988
766
  /**
989
767
  * @public
990
768
  * @override
991
769
  */
992
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.displayName = 'proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction';
770
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.displayName = 'proto.gateway.parallax.v1.CreateTraceRequest.Event';
993
771
  }
994
772
  /**
995
773
  * Generated by JsPbCodeGenerator.
@@ -1001,16 +779,16 @@ function requireParallax_gateway_pb () {
1001
779
  * @extends {jspb.Message}
1002
780
  * @constructor
1003
781
  */
1004
- proto.gateway.parallax.v1.AddSpanHintResponse = function(opt_data) {
782
+ proto.gateway.parallax.v1.CreateTraceResponse = function(opt_data) {
1005
783
  jspb.Message.initialize(this, opt_data, 0, -1, null, null);
1006
784
  };
1007
- goog.inherits(proto.gateway.parallax.v1.AddSpanHintResponse, jspb.Message);
785
+ goog.inherits(proto.gateway.parallax.v1.CreateTraceResponse, jspb.Message);
1008
786
  if (goog.DEBUG && !COMPILED) {
1009
787
  /**
1010
788
  * @public
1011
789
  * @override
1012
790
  */
1013
- proto.gateway.parallax.v1.AddSpanHintResponse.displayName = 'proto.gateway.parallax.v1.AddSpanHintResponse';
791
+ proto.gateway.parallax.v1.CreateTraceResponse.displayName = 'proto.gateway.parallax.v1.CreateTraceResponse';
1014
792
  }
1015
793
 
1016
794
  /**
@@ -1018,7 +796,7 @@ function requireParallax_gateway_pb () {
1018
796
  * @private {!Array<number>}
1019
797
  * @const
1020
798
  */
1021
- proto.gateway.parallax.v1.CreateTraceRequest.repeatedFields_ = [3];
799
+ proto.gateway.parallax.v1.CreateTraceRequest.repeatedFields_ = [3,4];
1022
800
 
1023
801
 
1024
802
 
@@ -1054,7 +832,9 @@ function requireParallax_gateway_pb () {
1054
832
  name: jspb.Message.getFieldWithDefault(msg, 1, ""),
1055
833
  attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [],
1056
834
  tagsList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f,
1057
- startTime: (f = msg.getStartTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
835
+ eventsList: jspb.Message.toObjectList(msg.getEventsList(),
836
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.toObject, includeInstance),
837
+ txHashHint: (f = msg.getTxHashHint()) && proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.toObject(includeInstance, f)
1058
838
  };
1059
839
 
1060
840
  if (includeInstance) {
@@ -1106,9 +886,14 @@ function requireParallax_gateway_pb () {
1106
886
  msg.addTags(value);
1107
887
  break;
1108
888
  case 4:
1109
- var value = new google_protobuf_timestamp_pb.Timestamp;
1110
- reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1111
- msg.setStartTime(value);
889
+ var value = new proto.gateway.parallax.v1.CreateTraceRequest.Event;
890
+ reader.readMessage(value,proto.gateway.parallax.v1.CreateTraceRequest.Event.deserializeBinaryFromReader);
891
+ msg.addEvents(value);
892
+ break;
893
+ case 5:
894
+ var value = new proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint;
895
+ reader.readMessage(value,proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.deserializeBinaryFromReader);
896
+ msg.setTxHashHint(value);
1112
897
  break;
1113
898
  default:
1114
899
  reader.skipField();
@@ -1157,1894 +942,91 @@ function requireParallax_gateway_pb () {
1157
942
  f
1158
943
  );
1159
944
  }
1160
- f = message.getStartTime();
945
+ f = message.getEventsList();
946
+ if (f.length > 0) {
947
+ writer.writeRepeatedMessage(
948
+ 4,
949
+ f,
950
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.serializeBinaryToWriter
951
+ );
952
+ }
953
+ f = message.getTxHashHint();
1161
954
  if (f != null) {
1162
955
  writer.writeMessage(
1163
- 4,
956
+ 5,
1164
957
  f,
1165
- google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
958
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.serializeBinaryToWriter
1166
959
  );
1167
960
  }
1168
961
  };
1169
962
 
1170
963
 
1171
- /**
1172
- * optional string name = 1;
1173
- * @return {string}
1174
- */
1175
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.getName = function() {
1176
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1177
- };
1178
964
 
1179
965
 
966
+
967
+ if (jspb.Message.GENERATE_TO_OBJECT) {
1180
968
  /**
1181
- * @param {string} value
1182
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
969
+ * Creates an object representation of this proto.
970
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
971
+ * Optional fields that are not set will be set to undefined.
972
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
973
+ * For the list of reserved names please see:
974
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
975
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
976
+ * JSPB instance for transitional soy proto support:
977
+ * http://goto/soy-param-migration
978
+ * @return {!Object}
1183
979
  */
1184
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.setName = function(value) {
1185
- return jspb.Message.setProto3StringField(this, 1, value);
980
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.toObject = function(opt_includeInstance) {
981
+ return proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.toObject(opt_includeInstance, this);
1186
982
  };
1187
983
 
1188
984
 
1189
985
  /**
1190
- * map<string, string> attributes = 2;
1191
- * @param {boolean=} opt_noLazyCreate Do not create the map if
1192
- * empty, instead returning `undefined`
1193
- * @return {!jspb.Map<string,string>}
986
+ * Static version of the {@see toObject} method.
987
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
988
+ * the JSPB instance for transitional soy proto support:
989
+ * http://goto/soy-param-migration
990
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} msg The msg instance to transform.
991
+ * @return {!Object}
992
+ * @suppress {unusedLocalVariables} f is only used for nested messages
1194
993
  */
1195
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.getAttributesMap = function(opt_noLazyCreate) {
1196
- return /** @type {!jspb.Map<string,string>} */ (
1197
- jspb.Message.getMapField(this, 2, opt_noLazyCreate,
1198
- null));
994
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.toObject = function(includeInstance, msg) {
995
+ var f, obj = {
996
+ chainId: jspb.Message.getFieldWithDefault(msg, 1, ""),
997
+ txHash: jspb.Message.getFieldWithDefault(msg, 2, ""),
998
+ details: (f = jspb.Message.getField(msg, 3)) == null ? undefined : f,
999
+ timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
1000
+ };
1001
+
1002
+ if (includeInstance) {
1003
+ obj.$jspbMessageInstance = msg;
1004
+ }
1005
+ return obj;
1199
1006
  };
1007
+ }
1200
1008
 
1201
1009
 
1202
1010
  /**
1203
- * Clears values from the map. The map will be non-null.
1204
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1011
+ * Deserializes binary data (in protobuf wire format).
1012
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
1013
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint}
1205
1014
  */
1206
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearAttributesMap = function() {
1207
- this.getAttributesMap().clear();
1208
- return this;
1015
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.deserializeBinary = function(bytes) {
1016
+ var reader = new jspb.BinaryReader(bytes);
1017
+ var msg = new proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint;
1018
+ return proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.deserializeBinaryFromReader(msg, reader);
1209
1019
  };
1210
1020
 
1211
1021
 
1212
1022
  /**
1213
- * repeated string tags = 3;
1214
- * @return {!Array<string>}
1023
+ * Deserializes binary data (in protobuf wire format) from the
1024
+ * given reader into the given message object.
1025
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} msg The message object to deserialize into.
1026
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1027
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint}
1215
1028
  */
1216
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.getTagsList = function() {
1217
- return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
1218
- };
1219
-
1220
-
1221
- /**
1222
- * @param {!Array<string>} value
1223
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1224
- */
1225
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.setTagsList = function(value) {
1226
- return jspb.Message.setField(this, 3, value || []);
1227
- };
1228
-
1229
-
1230
- /**
1231
- * @param {string} value
1232
- * @param {number=} opt_index
1233
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1234
- */
1235
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.addTags = function(value, opt_index) {
1236
- return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
1237
- };
1238
-
1239
-
1240
- /**
1241
- * Clears the list making it empty but non-null.
1242
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1243
- */
1244
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearTagsList = function() {
1245
- return this.setTagsList([]);
1246
- };
1247
-
1248
-
1249
- /**
1250
- * optional google.protobuf.Timestamp start_time = 4;
1251
- * @return {?proto.google.protobuf.Timestamp}
1252
- */
1253
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.getStartTime = function() {
1254
- return /** @type{?proto.google.protobuf.Timestamp} */ (
1255
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
1256
- };
1257
-
1258
-
1259
- /**
1260
- * @param {?proto.google.protobuf.Timestamp|undefined} value
1261
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1262
- */
1263
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.setStartTime = function(value) {
1264
- return jspb.Message.setWrapperField(this, 4, value);
1265
- };
1266
-
1267
-
1268
- /**
1269
- * Clears the message field making it undefined.
1270
- * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
1271
- */
1272
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearStartTime = function() {
1273
- return this.setStartTime(undefined);
1274
- };
1275
-
1276
-
1277
- /**
1278
- * Returns whether this field is set.
1279
- * @return {boolean}
1280
- */
1281
- proto.gateway.parallax.v1.CreateTraceRequest.prototype.hasStartTime = function() {
1282
- return jspb.Message.getField(this, 4) != null;
1283
- };
1284
-
1285
-
1286
-
1287
-
1288
-
1289
- if (jspb.Message.GENERATE_TO_OBJECT) {
1290
- /**
1291
- * Creates an object representation of this proto.
1292
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1293
- * Optional fields that are not set will be set to undefined.
1294
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1295
- * For the list of reserved names please see:
1296
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1297
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1298
- * JSPB instance for transitional soy proto support:
1299
- * http://goto/soy-param-migration
1300
- * @return {!Object}
1301
- */
1302
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.toObject = function(opt_includeInstance) {
1303
- return proto.gateway.parallax.v1.CreateTraceResponse.toObject(opt_includeInstance, this);
1304
- };
1305
-
1306
-
1307
- /**
1308
- * Static version of the {@see toObject} method.
1309
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1310
- * the JSPB instance for transitional soy proto support:
1311
- * http://goto/soy-param-migration
1312
- * @param {!proto.gateway.parallax.v1.CreateTraceResponse} msg The msg instance to transform.
1313
- * @return {!Object}
1314
- * @suppress {unusedLocalVariables} f is only used for nested messages
1315
- */
1316
- proto.gateway.parallax.v1.CreateTraceResponse.toObject = function(includeInstance, msg) {
1317
- var f, obj = {
1318
- status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
1319
- traceId: jspb.Message.getFieldWithDefault(msg, 2, ""),
1320
- rootSpanId: jspb.Message.getFieldWithDefault(msg, 3, "")
1321
- };
1322
-
1323
- if (includeInstance) {
1324
- obj.$jspbMessageInstance = msg;
1325
- }
1326
- return obj;
1327
- };
1328
- }
1329
-
1330
-
1331
- /**
1332
- * Deserializes binary data (in protobuf wire format).
1333
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1334
- * @return {!proto.gateway.parallax.v1.CreateTraceResponse}
1335
- */
1336
- proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinary = function(bytes) {
1337
- var reader = new jspb.BinaryReader(bytes);
1338
- var msg = new proto.gateway.parallax.v1.CreateTraceResponse;
1339
- return proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinaryFromReader(msg, reader);
1340
- };
1341
-
1342
-
1343
- /**
1344
- * Deserializes binary data (in protobuf wire format) from the
1345
- * given reader into the given message object.
1346
- * @param {!proto.gateway.parallax.v1.CreateTraceResponse} msg The message object to deserialize into.
1347
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1348
- * @return {!proto.gateway.parallax.v1.CreateTraceResponse}
1349
- */
1350
- proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinaryFromReader = function(msg, reader) {
1351
- while (reader.nextField()) {
1352
- if (reader.isEndGroup()) {
1353
- break;
1354
- }
1355
- var field = reader.getFieldNumber();
1356
- switch (field) {
1357
- case 1:
1358
- var value = new proto_common_v1_status_pb.ResponseStatus;
1359
- reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
1360
- msg.setStatus(value);
1361
- break;
1362
- case 2:
1363
- var value = /** @type {string} */ (reader.readString());
1364
- msg.setTraceId(value);
1365
- break;
1366
- case 3:
1367
- var value = /** @type {string} */ (reader.readString());
1368
- msg.setRootSpanId(value);
1369
- break;
1370
- default:
1371
- reader.skipField();
1372
- break;
1373
- }
1374
- }
1375
- return msg;
1376
- };
1377
-
1378
-
1379
- /**
1380
- * Serializes the message to binary data (in protobuf wire format).
1381
- * @return {!Uint8Array}
1382
- */
1383
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.serializeBinary = function() {
1384
- var writer = new jspb.BinaryWriter();
1385
- proto.gateway.parallax.v1.CreateTraceResponse.serializeBinaryToWriter(this, writer);
1386
- return writer.getResultBuffer();
1387
- };
1388
-
1389
-
1390
- /**
1391
- * Serializes the given message to binary data (in protobuf wire
1392
- * format), writing to the given BinaryWriter.
1393
- * @param {!proto.gateway.parallax.v1.CreateTraceResponse} message
1394
- * @param {!jspb.BinaryWriter} writer
1395
- * @suppress {unusedLocalVariables} f is only used for nested messages
1396
- */
1397
- proto.gateway.parallax.v1.CreateTraceResponse.serializeBinaryToWriter = function(message, writer) {
1398
- var f = undefined;
1399
- f = message.getStatus();
1400
- if (f != null) {
1401
- writer.writeMessage(
1402
- 1,
1403
- f,
1404
- proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
1405
- );
1406
- }
1407
- f = message.getTraceId();
1408
- if (f.length > 0) {
1409
- writer.writeString(
1410
- 2,
1411
- f
1412
- );
1413
- }
1414
- f = message.getRootSpanId();
1415
- if (f.length > 0) {
1416
- writer.writeString(
1417
- 3,
1418
- f
1419
- );
1420
- }
1421
- };
1422
-
1423
-
1424
- /**
1425
- * optional common.v1.ResponseStatus status = 1;
1426
- * @return {?proto.common.v1.ResponseStatus}
1427
- */
1428
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.getStatus = function() {
1429
- return /** @type{?proto.common.v1.ResponseStatus} */ (
1430
- jspb.Message.getWrapperField(this, proto_common_v1_status_pb.ResponseStatus, 1));
1431
- };
1432
-
1433
-
1434
- /**
1435
- * @param {?proto.common.v1.ResponseStatus|undefined} value
1436
- * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
1437
- */
1438
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.setStatus = function(value) {
1439
- return jspb.Message.setWrapperField(this, 1, value);
1440
- };
1441
-
1442
-
1443
- /**
1444
- * Clears the message field making it undefined.
1445
- * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
1446
- */
1447
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.clearStatus = function() {
1448
- return this.setStatus(undefined);
1449
- };
1450
-
1451
-
1452
- /**
1453
- * Returns whether this field is set.
1454
- * @return {boolean}
1455
- */
1456
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.hasStatus = function() {
1457
- return jspb.Message.getField(this, 1) != null;
1458
- };
1459
-
1460
-
1461
- /**
1462
- * optional string trace_id = 2;
1463
- * @return {string}
1464
- */
1465
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.getTraceId = function() {
1466
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1467
- };
1468
-
1469
-
1470
- /**
1471
- * @param {string} value
1472
- * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
1473
- */
1474
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.setTraceId = function(value) {
1475
- return jspb.Message.setProto3StringField(this, 2, value);
1476
- };
1477
-
1478
-
1479
- /**
1480
- * optional string root_span_id = 3;
1481
- * @return {string}
1482
- */
1483
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.getRootSpanId = function() {
1484
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1485
- };
1486
-
1487
-
1488
- /**
1489
- * @param {string} value
1490
- * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
1491
- */
1492
- proto.gateway.parallax.v1.CreateTraceResponse.prototype.setRootSpanId = function(value) {
1493
- return jspb.Message.setProto3StringField(this, 3, value);
1494
- };
1495
-
1496
-
1497
-
1498
-
1499
-
1500
- if (jspb.Message.GENERATE_TO_OBJECT) {
1501
- /**
1502
- * Creates an object representation of this proto.
1503
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1504
- * Optional fields that are not set will be set to undefined.
1505
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1506
- * For the list of reserved names please see:
1507
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1508
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1509
- * JSPB instance for transitional soy proto support:
1510
- * http://goto/soy-param-migration
1511
- * @return {!Object}
1512
- */
1513
- proto.gateway.parallax.v1.StartSpanRequest.prototype.toObject = function(opt_includeInstance) {
1514
- return proto.gateway.parallax.v1.StartSpanRequest.toObject(opt_includeInstance, this);
1515
- };
1516
-
1517
-
1518
- /**
1519
- * Static version of the {@see toObject} method.
1520
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1521
- * the JSPB instance for transitional soy proto support:
1522
- * http://goto/soy-param-migration
1523
- * @param {!proto.gateway.parallax.v1.StartSpanRequest} msg The msg instance to transform.
1524
- * @return {!Object}
1525
- * @suppress {unusedLocalVariables} f is only used for nested messages
1526
- */
1527
- proto.gateway.parallax.v1.StartSpanRequest.toObject = function(includeInstance, msg) {
1528
- var f, obj = {
1529
- name: jspb.Message.getFieldWithDefault(msg, 1, ""),
1530
- traceId: jspb.Message.getFieldWithDefault(msg, 2, ""),
1531
- parentSpanId: jspb.Message.getFieldWithDefault(msg, 3, ""),
1532
- attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [],
1533
- startTime: (f = msg.getStartTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
1534
- };
1535
-
1536
- if (includeInstance) {
1537
- obj.$jspbMessageInstance = msg;
1538
- }
1539
- return obj;
1540
- };
1541
- }
1542
-
1543
-
1544
- /**
1545
- * Deserializes binary data (in protobuf wire format).
1546
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1547
- * @return {!proto.gateway.parallax.v1.StartSpanRequest}
1548
- */
1549
- proto.gateway.parallax.v1.StartSpanRequest.deserializeBinary = function(bytes) {
1550
- var reader = new jspb.BinaryReader(bytes);
1551
- var msg = new proto.gateway.parallax.v1.StartSpanRequest;
1552
- return proto.gateway.parallax.v1.StartSpanRequest.deserializeBinaryFromReader(msg, reader);
1553
- };
1554
-
1555
-
1556
- /**
1557
- * Deserializes binary data (in protobuf wire format) from the
1558
- * given reader into the given message object.
1559
- * @param {!proto.gateway.parallax.v1.StartSpanRequest} msg The message object to deserialize into.
1560
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1561
- * @return {!proto.gateway.parallax.v1.StartSpanRequest}
1562
- */
1563
- proto.gateway.parallax.v1.StartSpanRequest.deserializeBinaryFromReader = function(msg, reader) {
1564
- while (reader.nextField()) {
1565
- if (reader.isEndGroup()) {
1566
- break;
1567
- }
1568
- var field = reader.getFieldNumber();
1569
- switch (field) {
1570
- case 1:
1571
- var value = /** @type {string} */ (reader.readString());
1572
- msg.setName(value);
1573
- break;
1574
- case 2:
1575
- var value = /** @type {string} */ (reader.readString());
1576
- msg.setTraceId(value);
1577
- break;
1578
- case 3:
1579
- var value = /** @type {string} */ (reader.readString());
1580
- msg.setParentSpanId(value);
1581
- break;
1582
- case 4:
1583
- var value = msg.getAttributesMap();
1584
- reader.readMessage(value, function(message, reader) {
1585
- jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
1586
- });
1587
- break;
1588
- case 5:
1589
- var value = new google_protobuf_timestamp_pb.Timestamp;
1590
- reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
1591
- msg.setStartTime(value);
1592
- break;
1593
- default:
1594
- reader.skipField();
1595
- break;
1596
- }
1597
- }
1598
- return msg;
1599
- };
1600
-
1601
-
1602
- /**
1603
- * Serializes the message to binary data (in protobuf wire format).
1604
- * @return {!Uint8Array}
1605
- */
1606
- proto.gateway.parallax.v1.StartSpanRequest.prototype.serializeBinary = function() {
1607
- var writer = new jspb.BinaryWriter();
1608
- proto.gateway.parallax.v1.StartSpanRequest.serializeBinaryToWriter(this, writer);
1609
- return writer.getResultBuffer();
1610
- };
1611
-
1612
-
1613
- /**
1614
- * Serializes the given message to binary data (in protobuf wire
1615
- * format), writing to the given BinaryWriter.
1616
- * @param {!proto.gateway.parallax.v1.StartSpanRequest} message
1617
- * @param {!jspb.BinaryWriter} writer
1618
- * @suppress {unusedLocalVariables} f is only used for nested messages
1619
- */
1620
- proto.gateway.parallax.v1.StartSpanRequest.serializeBinaryToWriter = function(message, writer) {
1621
- var f = undefined;
1622
- f = message.getName();
1623
- if (f.length > 0) {
1624
- writer.writeString(
1625
- 1,
1626
- f
1627
- );
1628
- }
1629
- f = message.getTraceId();
1630
- if (f.length > 0) {
1631
- writer.writeString(
1632
- 2,
1633
- f
1634
- );
1635
- }
1636
- f = message.getParentSpanId();
1637
- if (f.length > 0) {
1638
- writer.writeString(
1639
- 3,
1640
- f
1641
- );
1642
- }
1643
- f = message.getAttributesMap(true);
1644
- if (f && f.getLength() > 0) {
1645
- f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
1646
- }
1647
- f = message.getStartTime();
1648
- if (f != null) {
1649
- writer.writeMessage(
1650
- 5,
1651
- f,
1652
- google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
1653
- );
1654
- }
1655
- };
1656
-
1657
-
1658
- /**
1659
- * optional string name = 1;
1660
- * @return {string}
1661
- */
1662
- proto.gateway.parallax.v1.StartSpanRequest.prototype.getName = function() {
1663
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1664
- };
1665
-
1666
-
1667
- /**
1668
- * @param {string} value
1669
- * @return {!proto.gateway.parallax.v1.StartSpanRequest} returns this
1670
- */
1671
- proto.gateway.parallax.v1.StartSpanRequest.prototype.setName = function(value) {
1672
- return jspb.Message.setProto3StringField(this, 1, value);
1673
- };
1674
-
1675
-
1676
- /**
1677
- * optional string trace_id = 2;
1678
- * @return {string}
1679
- */
1680
- proto.gateway.parallax.v1.StartSpanRequest.prototype.getTraceId = function() {
1681
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1682
- };
1683
-
1684
-
1685
- /**
1686
- * @param {string} value
1687
- * @return {!proto.gateway.parallax.v1.StartSpanRequest} returns this
1688
- */
1689
- proto.gateway.parallax.v1.StartSpanRequest.prototype.setTraceId = function(value) {
1690
- return jspb.Message.setProto3StringField(this, 2, value);
1691
- };
1692
-
1693
-
1694
- /**
1695
- * optional string parent_span_id = 3;
1696
- * @return {string}
1697
- */
1698
- proto.gateway.parallax.v1.StartSpanRequest.prototype.getParentSpanId = function() {
1699
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
1700
- };
1701
-
1702
-
1703
- /**
1704
- * @param {string} value
1705
- * @return {!proto.gateway.parallax.v1.StartSpanRequest} returns this
1706
- */
1707
- proto.gateway.parallax.v1.StartSpanRequest.prototype.setParentSpanId = function(value) {
1708
- return jspb.Message.setProto3StringField(this, 3, value);
1709
- };
1710
-
1711
-
1712
- /**
1713
- * map<string, string> attributes = 4;
1714
- * @param {boolean=} opt_noLazyCreate Do not create the map if
1715
- * empty, instead returning `undefined`
1716
- * @return {!jspb.Map<string,string>}
1717
- */
1718
- proto.gateway.parallax.v1.StartSpanRequest.prototype.getAttributesMap = function(opt_noLazyCreate) {
1719
- return /** @type {!jspb.Map<string,string>} */ (
1720
- jspb.Message.getMapField(this, 4, opt_noLazyCreate,
1721
- null));
1722
- };
1723
-
1724
-
1725
- /**
1726
- * Clears values from the map. The map will be non-null.
1727
- * @return {!proto.gateway.parallax.v1.StartSpanRequest} returns this
1728
- */
1729
- proto.gateway.parallax.v1.StartSpanRequest.prototype.clearAttributesMap = function() {
1730
- this.getAttributesMap().clear();
1731
- return this;
1732
- };
1733
-
1734
-
1735
- /**
1736
- * optional google.protobuf.Timestamp start_time = 5;
1737
- * @return {?proto.google.protobuf.Timestamp}
1738
- */
1739
- proto.gateway.parallax.v1.StartSpanRequest.prototype.getStartTime = function() {
1740
- return /** @type{?proto.google.protobuf.Timestamp} */ (
1741
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5));
1742
- };
1743
-
1744
-
1745
- /**
1746
- * @param {?proto.google.protobuf.Timestamp|undefined} value
1747
- * @return {!proto.gateway.parallax.v1.StartSpanRequest} returns this
1748
- */
1749
- proto.gateway.parallax.v1.StartSpanRequest.prototype.setStartTime = function(value) {
1750
- return jspb.Message.setWrapperField(this, 5, value);
1751
- };
1752
-
1753
-
1754
- /**
1755
- * Clears the message field making it undefined.
1756
- * @return {!proto.gateway.parallax.v1.StartSpanRequest} returns this
1757
- */
1758
- proto.gateway.parallax.v1.StartSpanRequest.prototype.clearStartTime = function() {
1759
- return this.setStartTime(undefined);
1760
- };
1761
-
1762
-
1763
- /**
1764
- * Returns whether this field is set.
1765
- * @return {boolean}
1766
- */
1767
- proto.gateway.parallax.v1.StartSpanRequest.prototype.hasStartTime = function() {
1768
- return jspb.Message.getField(this, 5) != null;
1769
- };
1770
-
1771
-
1772
-
1773
-
1774
-
1775
- if (jspb.Message.GENERATE_TO_OBJECT) {
1776
- /**
1777
- * Creates an object representation of this proto.
1778
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1779
- * Optional fields that are not set will be set to undefined.
1780
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1781
- * For the list of reserved names please see:
1782
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1783
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1784
- * JSPB instance for transitional soy proto support:
1785
- * http://goto/soy-param-migration
1786
- * @return {!Object}
1787
- */
1788
- proto.gateway.parallax.v1.StartSpanResponse.prototype.toObject = function(opt_includeInstance) {
1789
- return proto.gateway.parallax.v1.StartSpanResponse.toObject(opt_includeInstance, this);
1790
- };
1791
-
1792
-
1793
- /**
1794
- * Static version of the {@see toObject} method.
1795
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1796
- * the JSPB instance for transitional soy proto support:
1797
- * http://goto/soy-param-migration
1798
- * @param {!proto.gateway.parallax.v1.StartSpanResponse} msg The msg instance to transform.
1799
- * @return {!Object}
1800
- * @suppress {unusedLocalVariables} f is only used for nested messages
1801
- */
1802
- proto.gateway.parallax.v1.StartSpanResponse.toObject = function(includeInstance, msg) {
1803
- var f, obj = {
1804
- status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
1805
- spanId: jspb.Message.getFieldWithDefault(msg, 2, "")
1806
- };
1807
-
1808
- if (includeInstance) {
1809
- obj.$jspbMessageInstance = msg;
1810
- }
1811
- return obj;
1812
- };
1813
- }
1814
-
1815
-
1816
- /**
1817
- * Deserializes binary data (in protobuf wire format).
1818
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
1819
- * @return {!proto.gateway.parallax.v1.StartSpanResponse}
1820
- */
1821
- proto.gateway.parallax.v1.StartSpanResponse.deserializeBinary = function(bytes) {
1822
- var reader = new jspb.BinaryReader(bytes);
1823
- var msg = new proto.gateway.parallax.v1.StartSpanResponse;
1824
- return proto.gateway.parallax.v1.StartSpanResponse.deserializeBinaryFromReader(msg, reader);
1825
- };
1826
-
1827
-
1828
- /**
1829
- * Deserializes binary data (in protobuf wire format) from the
1830
- * given reader into the given message object.
1831
- * @param {!proto.gateway.parallax.v1.StartSpanResponse} msg The message object to deserialize into.
1832
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
1833
- * @return {!proto.gateway.parallax.v1.StartSpanResponse}
1834
- */
1835
- proto.gateway.parallax.v1.StartSpanResponse.deserializeBinaryFromReader = function(msg, reader) {
1836
- while (reader.nextField()) {
1837
- if (reader.isEndGroup()) {
1838
- break;
1839
- }
1840
- var field = reader.getFieldNumber();
1841
- switch (field) {
1842
- case 1:
1843
- var value = new proto_common_v1_status_pb.ResponseStatus;
1844
- reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
1845
- msg.setStatus(value);
1846
- break;
1847
- case 2:
1848
- var value = /** @type {string} */ (reader.readString());
1849
- msg.setSpanId(value);
1850
- break;
1851
- default:
1852
- reader.skipField();
1853
- break;
1854
- }
1855
- }
1856
- return msg;
1857
- };
1858
-
1859
-
1860
- /**
1861
- * Serializes the message to binary data (in protobuf wire format).
1862
- * @return {!Uint8Array}
1863
- */
1864
- proto.gateway.parallax.v1.StartSpanResponse.prototype.serializeBinary = function() {
1865
- var writer = new jspb.BinaryWriter();
1866
- proto.gateway.parallax.v1.StartSpanResponse.serializeBinaryToWriter(this, writer);
1867
- return writer.getResultBuffer();
1868
- };
1869
-
1870
-
1871
- /**
1872
- * Serializes the given message to binary data (in protobuf wire
1873
- * format), writing to the given BinaryWriter.
1874
- * @param {!proto.gateway.parallax.v1.StartSpanResponse} message
1875
- * @param {!jspb.BinaryWriter} writer
1876
- * @suppress {unusedLocalVariables} f is only used for nested messages
1877
- */
1878
- proto.gateway.parallax.v1.StartSpanResponse.serializeBinaryToWriter = function(message, writer) {
1879
- var f = undefined;
1880
- f = message.getStatus();
1881
- if (f != null) {
1882
- writer.writeMessage(
1883
- 1,
1884
- f,
1885
- proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
1886
- );
1887
- }
1888
- f = message.getSpanId();
1889
- if (f.length > 0) {
1890
- writer.writeString(
1891
- 2,
1892
- f
1893
- );
1894
- }
1895
- };
1896
-
1897
-
1898
- /**
1899
- * optional common.v1.ResponseStatus status = 1;
1900
- * @return {?proto.common.v1.ResponseStatus}
1901
- */
1902
- proto.gateway.parallax.v1.StartSpanResponse.prototype.getStatus = function() {
1903
- return /** @type{?proto.common.v1.ResponseStatus} */ (
1904
- jspb.Message.getWrapperField(this, proto_common_v1_status_pb.ResponseStatus, 1));
1905
- };
1906
-
1907
-
1908
- /**
1909
- * @param {?proto.common.v1.ResponseStatus|undefined} value
1910
- * @return {!proto.gateway.parallax.v1.StartSpanResponse} returns this
1911
- */
1912
- proto.gateway.parallax.v1.StartSpanResponse.prototype.setStatus = function(value) {
1913
- return jspb.Message.setWrapperField(this, 1, value);
1914
- };
1915
-
1916
-
1917
- /**
1918
- * Clears the message field making it undefined.
1919
- * @return {!proto.gateway.parallax.v1.StartSpanResponse} returns this
1920
- */
1921
- proto.gateway.parallax.v1.StartSpanResponse.prototype.clearStatus = function() {
1922
- return this.setStatus(undefined);
1923
- };
1924
-
1925
-
1926
- /**
1927
- * Returns whether this field is set.
1928
- * @return {boolean}
1929
- */
1930
- proto.gateway.parallax.v1.StartSpanResponse.prototype.hasStatus = function() {
1931
- return jspb.Message.getField(this, 1) != null;
1932
- };
1933
-
1934
-
1935
- /**
1936
- * optional string span_id = 2;
1937
- * @return {string}
1938
- */
1939
- proto.gateway.parallax.v1.StartSpanResponse.prototype.getSpanId = function() {
1940
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1941
- };
1942
-
1943
-
1944
- /**
1945
- * @param {string} value
1946
- * @return {!proto.gateway.parallax.v1.StartSpanResponse} returns this
1947
- */
1948
- proto.gateway.parallax.v1.StartSpanResponse.prototype.setSpanId = function(value) {
1949
- return jspb.Message.setProto3StringField(this, 2, value);
1950
- };
1951
-
1952
-
1953
-
1954
-
1955
-
1956
- if (jspb.Message.GENERATE_TO_OBJECT) {
1957
- /**
1958
- * Creates an object representation of this proto.
1959
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
1960
- * Optional fields that are not set will be set to undefined.
1961
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
1962
- * For the list of reserved names please see:
1963
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
1964
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
1965
- * JSPB instance for transitional soy proto support:
1966
- * http://goto/soy-param-migration
1967
- * @return {!Object}
1968
- */
1969
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.toObject = function(opt_includeInstance) {
1970
- return proto.gateway.parallax.v1.FinishSpanRequest.toObject(opt_includeInstance, this);
1971
- };
1972
-
1973
-
1974
- /**
1975
- * Static version of the {@see toObject} method.
1976
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
1977
- * the JSPB instance for transitional soy proto support:
1978
- * http://goto/soy-param-migration
1979
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest} msg The msg instance to transform.
1980
- * @return {!Object}
1981
- * @suppress {unusedLocalVariables} f is only used for nested messages
1982
- */
1983
- proto.gateway.parallax.v1.FinishSpanRequest.toObject = function(includeInstance, msg) {
1984
- var f, obj = {
1985
- traceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
1986
- spanId: jspb.Message.getFieldWithDefault(msg, 2, ""),
1987
- endTime: (f = msg.getEndTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
1988
- status: (f = msg.getStatus()) && proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.toObject(includeInstance, f)
1989
- };
1990
-
1991
- if (includeInstance) {
1992
- obj.$jspbMessageInstance = msg;
1993
- }
1994
- return obj;
1995
- };
1996
- }
1997
-
1998
-
1999
- /**
2000
- * Deserializes binary data (in protobuf wire format).
2001
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2002
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest}
2003
- */
2004
- proto.gateway.parallax.v1.FinishSpanRequest.deserializeBinary = function(bytes) {
2005
- var reader = new jspb.BinaryReader(bytes);
2006
- var msg = new proto.gateway.parallax.v1.FinishSpanRequest;
2007
- return proto.gateway.parallax.v1.FinishSpanRequest.deserializeBinaryFromReader(msg, reader);
2008
- };
2009
-
2010
-
2011
- /**
2012
- * Deserializes binary data (in protobuf wire format) from the
2013
- * given reader into the given message object.
2014
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest} msg The message object to deserialize into.
2015
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2016
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest}
2017
- */
2018
- proto.gateway.parallax.v1.FinishSpanRequest.deserializeBinaryFromReader = function(msg, reader) {
2019
- while (reader.nextField()) {
2020
- if (reader.isEndGroup()) {
2021
- break;
2022
- }
2023
- var field = reader.getFieldNumber();
2024
- switch (field) {
2025
- case 1:
2026
- var value = /** @type {string} */ (reader.readString());
2027
- msg.setTraceId(value);
2028
- break;
2029
- case 2:
2030
- var value = /** @type {string} */ (reader.readString());
2031
- msg.setSpanId(value);
2032
- break;
2033
- case 3:
2034
- var value = new google_protobuf_timestamp_pb.Timestamp;
2035
- reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
2036
- msg.setEndTime(value);
2037
- break;
2038
- case 4:
2039
- var value = new proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus;
2040
- reader.readMessage(value,proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.deserializeBinaryFromReader);
2041
- msg.setStatus(value);
2042
- break;
2043
- default:
2044
- reader.skipField();
2045
- break;
2046
- }
2047
- }
2048
- return msg;
2049
- };
2050
-
2051
-
2052
- /**
2053
- * Serializes the message to binary data (in protobuf wire format).
2054
- * @return {!Uint8Array}
2055
- */
2056
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.serializeBinary = function() {
2057
- var writer = new jspb.BinaryWriter();
2058
- proto.gateway.parallax.v1.FinishSpanRequest.serializeBinaryToWriter(this, writer);
2059
- return writer.getResultBuffer();
2060
- };
2061
-
2062
-
2063
- /**
2064
- * Serializes the given message to binary data (in protobuf wire
2065
- * format), writing to the given BinaryWriter.
2066
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest} message
2067
- * @param {!jspb.BinaryWriter} writer
2068
- * @suppress {unusedLocalVariables} f is only used for nested messages
2069
- */
2070
- proto.gateway.parallax.v1.FinishSpanRequest.serializeBinaryToWriter = function(message, writer) {
2071
- var f = undefined;
2072
- f = message.getTraceId();
2073
- if (f.length > 0) {
2074
- writer.writeString(
2075
- 1,
2076
- f
2077
- );
2078
- }
2079
- f = message.getSpanId();
2080
- if (f.length > 0) {
2081
- writer.writeString(
2082
- 2,
2083
- f
2084
- );
2085
- }
2086
- f = message.getEndTime();
2087
- if (f != null) {
2088
- writer.writeMessage(
2089
- 3,
2090
- f,
2091
- google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2092
- );
2093
- }
2094
- f = message.getStatus();
2095
- if (f != null) {
2096
- writer.writeMessage(
2097
- 4,
2098
- f,
2099
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.serializeBinaryToWriter
2100
- );
2101
- }
2102
- };
2103
-
2104
-
2105
-
2106
-
2107
-
2108
- if (jspb.Message.GENERATE_TO_OBJECT) {
2109
- /**
2110
- * Creates an object representation of this proto.
2111
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2112
- * Optional fields that are not set will be set to undefined.
2113
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2114
- * For the list of reserved names please see:
2115
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2116
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2117
- * JSPB instance for transitional soy proto support:
2118
- * http://goto/soy-param-migration
2119
- * @return {!Object}
2120
- */
2121
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.toObject = function(opt_includeInstance) {
2122
- return proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.toObject(opt_includeInstance, this);
2123
- };
2124
-
2125
-
2126
- /**
2127
- * Static version of the {@see toObject} method.
2128
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2129
- * the JSPB instance for transitional soy proto support:
2130
- * http://goto/soy-param-migration
2131
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} msg The msg instance to transform.
2132
- * @return {!Object}
2133
- * @suppress {unusedLocalVariables} f is only used for nested messages
2134
- */
2135
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.toObject = function(includeInstance, msg) {
2136
- var f, obj = {
2137
- code: jspb.Message.getFieldWithDefault(msg, 1, 0),
2138
- message: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f
2139
- };
2140
-
2141
- if (includeInstance) {
2142
- obj.$jspbMessageInstance = msg;
2143
- }
2144
- return obj;
2145
- };
2146
- }
2147
-
2148
-
2149
- /**
2150
- * Deserializes binary data (in protobuf wire format).
2151
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2152
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus}
2153
- */
2154
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.deserializeBinary = function(bytes) {
2155
- var reader = new jspb.BinaryReader(bytes);
2156
- var msg = new proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus;
2157
- return proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.deserializeBinaryFromReader(msg, reader);
2158
- };
2159
-
2160
-
2161
- /**
2162
- * Deserializes binary data (in protobuf wire format) from the
2163
- * given reader into the given message object.
2164
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} msg The message object to deserialize into.
2165
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2166
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus}
2167
- */
2168
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.deserializeBinaryFromReader = function(msg, reader) {
2169
- while (reader.nextField()) {
2170
- if (reader.isEndGroup()) {
2171
- break;
2172
- }
2173
- var field = reader.getFieldNumber();
2174
- switch (field) {
2175
- case 1:
2176
- var value = /** @type {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.StatusCode} */ (reader.readEnum());
2177
- msg.setCode(value);
2178
- break;
2179
- case 2:
2180
- var value = /** @type {string} */ (reader.readString());
2181
- msg.setMessage(value);
2182
- break;
2183
- default:
2184
- reader.skipField();
2185
- break;
2186
- }
2187
- }
2188
- return msg;
2189
- };
2190
-
2191
-
2192
- /**
2193
- * Serializes the message to binary data (in protobuf wire format).
2194
- * @return {!Uint8Array}
2195
- */
2196
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.serializeBinary = function() {
2197
- var writer = new jspb.BinaryWriter();
2198
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.serializeBinaryToWriter(this, writer);
2199
- return writer.getResultBuffer();
2200
- };
2201
-
2202
-
2203
- /**
2204
- * Serializes the given message to binary data (in protobuf wire
2205
- * format), writing to the given BinaryWriter.
2206
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} message
2207
- * @param {!jspb.BinaryWriter} writer
2208
- * @suppress {unusedLocalVariables} f is only used for nested messages
2209
- */
2210
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.serializeBinaryToWriter = function(message, writer) {
2211
- var f = undefined;
2212
- f = message.getCode();
2213
- if (f !== 0.0) {
2214
- writer.writeEnum(
2215
- 1,
2216
- f
2217
- );
2218
- }
2219
- f = /** @type {string} */ (jspb.Message.getField(message, 2));
2220
- if (f != null) {
2221
- writer.writeString(
2222
- 2,
2223
- f
2224
- );
2225
- }
2226
- };
2227
-
2228
-
2229
- /**
2230
- * @enum {number}
2231
- */
2232
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.StatusCode = {
2233
- STATUS_CODE_UNSPECIFIED: 0,
2234
- STATUS_CODE_OK: 1,
2235
- STATUS_CODE_ERROR: 2
2236
- };
2237
-
2238
- /**
2239
- * optional StatusCode code = 1;
2240
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.StatusCode}
2241
- */
2242
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.getCode = function() {
2243
- return /** @type {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.StatusCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0));
2244
- };
2245
-
2246
-
2247
- /**
2248
- * @param {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.StatusCode} value
2249
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} returns this
2250
- */
2251
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.setCode = function(value) {
2252
- return jspb.Message.setProto3EnumField(this, 1, value);
2253
- };
2254
-
2255
-
2256
- /**
2257
- * optional string message = 2;
2258
- * @return {string}
2259
- */
2260
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.getMessage = function() {
2261
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2262
- };
2263
-
2264
-
2265
- /**
2266
- * @param {string} value
2267
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} returns this
2268
- */
2269
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.setMessage = function(value) {
2270
- return jspb.Message.setField(this, 2, value);
2271
- };
2272
-
2273
-
2274
- /**
2275
- * Clears the field making it undefined.
2276
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} returns this
2277
- */
2278
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.clearMessage = function() {
2279
- return jspb.Message.setField(this, 2, undefined);
2280
- };
2281
-
2282
-
2283
- /**
2284
- * Returns whether this field is set.
2285
- * @return {boolean}
2286
- */
2287
- proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus.prototype.hasMessage = function() {
2288
- return jspb.Message.getField(this, 2) != null;
2289
- };
2290
-
2291
-
2292
- /**
2293
- * optional string trace_id = 1;
2294
- * @return {string}
2295
- */
2296
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.getTraceId = function() {
2297
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2298
- };
2299
-
2300
-
2301
- /**
2302
- * @param {string} value
2303
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest} returns this
2304
- */
2305
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.setTraceId = function(value) {
2306
- return jspb.Message.setProto3StringField(this, 1, value);
2307
- };
2308
-
2309
-
2310
- /**
2311
- * optional string span_id = 2;
2312
- * @return {string}
2313
- */
2314
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.getSpanId = function() {
2315
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2316
- };
2317
-
2318
-
2319
- /**
2320
- * @param {string} value
2321
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest} returns this
2322
- */
2323
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.setSpanId = function(value) {
2324
- return jspb.Message.setProto3StringField(this, 2, value);
2325
- };
2326
-
2327
-
2328
- /**
2329
- * optional google.protobuf.Timestamp end_time = 3;
2330
- * @return {?proto.google.protobuf.Timestamp}
2331
- */
2332
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.getEndTime = function() {
2333
- return /** @type{?proto.google.protobuf.Timestamp} */ (
2334
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
2335
- };
2336
-
2337
-
2338
- /**
2339
- * @param {?proto.google.protobuf.Timestamp|undefined} value
2340
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest} returns this
2341
- */
2342
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.setEndTime = function(value) {
2343
- return jspb.Message.setWrapperField(this, 3, value);
2344
- };
2345
-
2346
-
2347
- /**
2348
- * Clears the message field making it undefined.
2349
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest} returns this
2350
- */
2351
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.clearEndTime = function() {
2352
- return this.setEndTime(undefined);
2353
- };
2354
-
2355
-
2356
- /**
2357
- * Returns whether this field is set.
2358
- * @return {boolean}
2359
- */
2360
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.hasEndTime = function() {
2361
- return jspb.Message.getField(this, 3) != null;
2362
- };
2363
-
2364
-
2365
- /**
2366
- * optional SpanStatus status = 4;
2367
- * @return {?proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus}
2368
- */
2369
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.getStatus = function() {
2370
- return /** @type{?proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus} */ (
2371
- jspb.Message.getWrapperField(this, proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus, 4));
2372
- };
2373
-
2374
-
2375
- /**
2376
- * @param {?proto.gateway.parallax.v1.FinishSpanRequest.SpanStatus|undefined} value
2377
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest} returns this
2378
- */
2379
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.setStatus = function(value) {
2380
- return jspb.Message.setWrapperField(this, 4, value);
2381
- };
2382
-
2383
-
2384
- /**
2385
- * Clears the message field making it undefined.
2386
- * @return {!proto.gateway.parallax.v1.FinishSpanRequest} returns this
2387
- */
2388
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.clearStatus = function() {
2389
- return this.setStatus(undefined);
2390
- };
2391
-
2392
-
2393
- /**
2394
- * Returns whether this field is set.
2395
- * @return {boolean}
2396
- */
2397
- proto.gateway.parallax.v1.FinishSpanRequest.prototype.hasStatus = function() {
2398
- return jspb.Message.getField(this, 4) != null;
2399
- };
2400
-
2401
-
2402
-
2403
-
2404
-
2405
- if (jspb.Message.GENERATE_TO_OBJECT) {
2406
- /**
2407
- * Creates an object representation of this proto.
2408
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2409
- * Optional fields that are not set will be set to undefined.
2410
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2411
- * For the list of reserved names please see:
2412
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2413
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2414
- * JSPB instance for transitional soy proto support:
2415
- * http://goto/soy-param-migration
2416
- * @return {!Object}
2417
- */
2418
- proto.gateway.parallax.v1.FinishSpanResponse.prototype.toObject = function(opt_includeInstance) {
2419
- return proto.gateway.parallax.v1.FinishSpanResponse.toObject(opt_includeInstance, this);
2420
- };
2421
-
2422
-
2423
- /**
2424
- * Static version of the {@see toObject} method.
2425
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2426
- * the JSPB instance for transitional soy proto support:
2427
- * http://goto/soy-param-migration
2428
- * @param {!proto.gateway.parallax.v1.FinishSpanResponse} msg The msg instance to transform.
2429
- * @return {!Object}
2430
- * @suppress {unusedLocalVariables} f is only used for nested messages
2431
- */
2432
- proto.gateway.parallax.v1.FinishSpanResponse.toObject = function(includeInstance, msg) {
2433
- var f, obj = {
2434
- status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f)
2435
- };
2436
-
2437
- if (includeInstance) {
2438
- obj.$jspbMessageInstance = msg;
2439
- }
2440
- return obj;
2441
- };
2442
- }
2443
-
2444
-
2445
- /**
2446
- * Deserializes binary data (in protobuf wire format).
2447
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2448
- * @return {!proto.gateway.parallax.v1.FinishSpanResponse}
2449
- */
2450
- proto.gateway.parallax.v1.FinishSpanResponse.deserializeBinary = function(bytes) {
2451
- var reader = new jspb.BinaryReader(bytes);
2452
- var msg = new proto.gateway.parallax.v1.FinishSpanResponse;
2453
- return proto.gateway.parallax.v1.FinishSpanResponse.deserializeBinaryFromReader(msg, reader);
2454
- };
2455
-
2456
-
2457
- /**
2458
- * Deserializes binary data (in protobuf wire format) from the
2459
- * given reader into the given message object.
2460
- * @param {!proto.gateway.parallax.v1.FinishSpanResponse} msg The message object to deserialize into.
2461
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2462
- * @return {!proto.gateway.parallax.v1.FinishSpanResponse}
2463
- */
2464
- proto.gateway.parallax.v1.FinishSpanResponse.deserializeBinaryFromReader = function(msg, reader) {
2465
- while (reader.nextField()) {
2466
- if (reader.isEndGroup()) {
2467
- break;
2468
- }
2469
- var field = reader.getFieldNumber();
2470
- switch (field) {
2471
- case 1:
2472
- var value = new proto_common_v1_status_pb.ResponseStatus;
2473
- reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
2474
- msg.setStatus(value);
2475
- break;
2476
- default:
2477
- reader.skipField();
2478
- break;
2479
- }
2480
- }
2481
- return msg;
2482
- };
2483
-
2484
-
2485
- /**
2486
- * Serializes the message to binary data (in protobuf wire format).
2487
- * @return {!Uint8Array}
2488
- */
2489
- proto.gateway.parallax.v1.FinishSpanResponse.prototype.serializeBinary = function() {
2490
- var writer = new jspb.BinaryWriter();
2491
- proto.gateway.parallax.v1.FinishSpanResponse.serializeBinaryToWriter(this, writer);
2492
- return writer.getResultBuffer();
2493
- };
2494
-
2495
-
2496
- /**
2497
- * Serializes the given message to binary data (in protobuf wire
2498
- * format), writing to the given BinaryWriter.
2499
- * @param {!proto.gateway.parallax.v1.FinishSpanResponse} message
2500
- * @param {!jspb.BinaryWriter} writer
2501
- * @suppress {unusedLocalVariables} f is only used for nested messages
2502
- */
2503
- proto.gateway.parallax.v1.FinishSpanResponse.serializeBinaryToWriter = function(message, writer) {
2504
- var f = undefined;
2505
- f = message.getStatus();
2506
- if (f != null) {
2507
- writer.writeMessage(
2508
- 1,
2509
- f,
2510
- proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
2511
- );
2512
- }
2513
- };
2514
-
2515
-
2516
- /**
2517
- * optional common.v1.ResponseStatus status = 1;
2518
- * @return {?proto.common.v1.ResponseStatus}
2519
- */
2520
- proto.gateway.parallax.v1.FinishSpanResponse.prototype.getStatus = function() {
2521
- return /** @type{?proto.common.v1.ResponseStatus} */ (
2522
- jspb.Message.getWrapperField(this, proto_common_v1_status_pb.ResponseStatus, 1));
2523
- };
2524
-
2525
-
2526
- /**
2527
- * @param {?proto.common.v1.ResponseStatus|undefined} value
2528
- * @return {!proto.gateway.parallax.v1.FinishSpanResponse} returns this
2529
- */
2530
- proto.gateway.parallax.v1.FinishSpanResponse.prototype.setStatus = function(value) {
2531
- return jspb.Message.setWrapperField(this, 1, value);
2532
- };
2533
-
2534
-
2535
- /**
2536
- * Clears the message field making it undefined.
2537
- * @return {!proto.gateway.parallax.v1.FinishSpanResponse} returns this
2538
- */
2539
- proto.gateway.parallax.v1.FinishSpanResponse.prototype.clearStatus = function() {
2540
- return this.setStatus(undefined);
2541
- };
2542
-
2543
-
2544
- /**
2545
- * Returns whether this field is set.
2546
- * @return {boolean}
2547
- */
2548
- proto.gateway.parallax.v1.FinishSpanResponse.prototype.hasStatus = function() {
2549
- return jspb.Message.getField(this, 1) != null;
2550
- };
2551
-
2552
-
2553
-
2554
-
2555
-
2556
- if (jspb.Message.GENERATE_TO_OBJECT) {
2557
- /**
2558
- * Creates an object representation of this proto.
2559
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2560
- * Optional fields that are not set will be set to undefined.
2561
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2562
- * For the list of reserved names please see:
2563
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2564
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2565
- * JSPB instance for transitional soy proto support:
2566
- * http://goto/soy-param-migration
2567
- * @return {!Object}
2568
- */
2569
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.toObject = function(opt_includeInstance) {
2570
- return proto.gateway.parallax.v1.AddSpanEventRequest.toObject(opt_includeInstance, this);
2571
- };
2572
-
2573
-
2574
- /**
2575
- * Static version of the {@see toObject} method.
2576
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2577
- * the JSPB instance for transitional soy proto support:
2578
- * http://goto/soy-param-migration
2579
- * @param {!proto.gateway.parallax.v1.AddSpanEventRequest} msg The msg instance to transform.
2580
- * @return {!Object}
2581
- * @suppress {unusedLocalVariables} f is only used for nested messages
2582
- */
2583
- proto.gateway.parallax.v1.AddSpanEventRequest.toObject = function(includeInstance, msg) {
2584
- var f, obj = {
2585
- traceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
2586
- spanId: jspb.Message.getFieldWithDefault(msg, 2, ""),
2587
- eventName: jspb.Message.getFieldWithDefault(msg, 3, ""),
2588
- attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [],
2589
- timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
2590
- };
2591
-
2592
- if (includeInstance) {
2593
- obj.$jspbMessageInstance = msg;
2594
- }
2595
- return obj;
2596
- };
2597
- }
2598
-
2599
-
2600
- /**
2601
- * Deserializes binary data (in protobuf wire format).
2602
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2603
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest}
2604
- */
2605
- proto.gateway.parallax.v1.AddSpanEventRequest.deserializeBinary = function(bytes) {
2606
- var reader = new jspb.BinaryReader(bytes);
2607
- var msg = new proto.gateway.parallax.v1.AddSpanEventRequest;
2608
- return proto.gateway.parallax.v1.AddSpanEventRequest.deserializeBinaryFromReader(msg, reader);
2609
- };
2610
-
2611
-
2612
- /**
2613
- * Deserializes binary data (in protobuf wire format) from the
2614
- * given reader into the given message object.
2615
- * @param {!proto.gateway.parallax.v1.AddSpanEventRequest} msg The message object to deserialize into.
2616
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2617
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest}
2618
- */
2619
- proto.gateway.parallax.v1.AddSpanEventRequest.deserializeBinaryFromReader = function(msg, reader) {
2620
- while (reader.nextField()) {
2621
- if (reader.isEndGroup()) {
2622
- break;
2623
- }
2624
- var field = reader.getFieldNumber();
2625
- switch (field) {
2626
- case 1:
2627
- var value = /** @type {string} */ (reader.readString());
2628
- msg.setTraceId(value);
2629
- break;
2630
- case 2:
2631
- var value = /** @type {string} */ (reader.readString());
2632
- msg.setSpanId(value);
2633
- break;
2634
- case 3:
2635
- var value = /** @type {string} */ (reader.readString());
2636
- msg.setEventName(value);
2637
- break;
2638
- case 4:
2639
- var value = msg.getAttributesMap();
2640
- reader.readMessage(value, function(message, reader) {
2641
- jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
2642
- });
2643
- break;
2644
- case 5:
2645
- var value = new google_protobuf_timestamp_pb.Timestamp;
2646
- reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
2647
- msg.setTimestamp(value);
2648
- break;
2649
- default:
2650
- reader.skipField();
2651
- break;
2652
- }
2653
- }
2654
- return msg;
2655
- };
2656
-
2657
-
2658
- /**
2659
- * Serializes the message to binary data (in protobuf wire format).
2660
- * @return {!Uint8Array}
2661
- */
2662
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.serializeBinary = function() {
2663
- var writer = new jspb.BinaryWriter();
2664
- proto.gateway.parallax.v1.AddSpanEventRequest.serializeBinaryToWriter(this, writer);
2665
- return writer.getResultBuffer();
2666
- };
2667
-
2668
-
2669
- /**
2670
- * Serializes the given message to binary data (in protobuf wire
2671
- * format), writing to the given BinaryWriter.
2672
- * @param {!proto.gateway.parallax.v1.AddSpanEventRequest} message
2673
- * @param {!jspb.BinaryWriter} writer
2674
- * @suppress {unusedLocalVariables} f is only used for nested messages
2675
- */
2676
- proto.gateway.parallax.v1.AddSpanEventRequest.serializeBinaryToWriter = function(message, writer) {
2677
- var f = undefined;
2678
- f = message.getTraceId();
2679
- if (f.length > 0) {
2680
- writer.writeString(
2681
- 1,
2682
- f
2683
- );
2684
- }
2685
- f = message.getSpanId();
2686
- if (f.length > 0) {
2687
- writer.writeString(
2688
- 2,
2689
- f
2690
- );
2691
- }
2692
- f = message.getEventName();
2693
- if (f.length > 0) {
2694
- writer.writeString(
2695
- 3,
2696
- f
2697
- );
2698
- }
2699
- f = message.getAttributesMap(true);
2700
- if (f && f.getLength() > 0) {
2701
- f.serializeBinary(4, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
2702
- }
2703
- f = message.getTimestamp();
2704
- if (f != null) {
2705
- writer.writeMessage(
2706
- 5,
2707
- f,
2708
- google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
2709
- );
2710
- }
2711
- };
2712
-
2713
-
2714
- /**
2715
- * optional string trace_id = 1;
2716
- * @return {string}
2717
- */
2718
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.getTraceId = function() {
2719
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
2720
- };
2721
-
2722
-
2723
- /**
2724
- * @param {string} value
2725
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest} returns this
2726
- */
2727
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.setTraceId = function(value) {
2728
- return jspb.Message.setProto3StringField(this, 1, value);
2729
- };
2730
-
2731
-
2732
- /**
2733
- * optional string span_id = 2;
2734
- * @return {string}
2735
- */
2736
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.getSpanId = function() {
2737
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
2738
- };
2739
-
2740
-
2741
- /**
2742
- * @param {string} value
2743
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest} returns this
2744
- */
2745
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.setSpanId = function(value) {
2746
- return jspb.Message.setProto3StringField(this, 2, value);
2747
- };
2748
-
2749
-
2750
- /**
2751
- * optional string event_name = 3;
2752
- * @return {string}
2753
- */
2754
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.getEventName = function() {
2755
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
2756
- };
2757
-
2758
-
2759
- /**
2760
- * @param {string} value
2761
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest} returns this
2762
- */
2763
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.setEventName = function(value) {
2764
- return jspb.Message.setProto3StringField(this, 3, value);
2765
- };
2766
-
2767
-
2768
- /**
2769
- * map<string, string> attributes = 4;
2770
- * @param {boolean=} opt_noLazyCreate Do not create the map if
2771
- * empty, instead returning `undefined`
2772
- * @return {!jspb.Map<string,string>}
2773
- */
2774
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.getAttributesMap = function(opt_noLazyCreate) {
2775
- return /** @type {!jspb.Map<string,string>} */ (
2776
- jspb.Message.getMapField(this, 4, opt_noLazyCreate,
2777
- null));
2778
- };
2779
-
2780
-
2781
- /**
2782
- * Clears values from the map. The map will be non-null.
2783
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest} returns this
2784
- */
2785
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.clearAttributesMap = function() {
2786
- this.getAttributesMap().clear();
2787
- return this;
2788
- };
2789
-
2790
-
2791
- /**
2792
- * optional google.protobuf.Timestamp timestamp = 5;
2793
- * @return {?proto.google.protobuf.Timestamp}
2794
- */
2795
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.getTimestamp = function() {
2796
- return /** @type{?proto.google.protobuf.Timestamp} */ (
2797
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5));
2798
- };
2799
-
2800
-
2801
- /**
2802
- * @param {?proto.google.protobuf.Timestamp|undefined} value
2803
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest} returns this
2804
- */
2805
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.setTimestamp = function(value) {
2806
- return jspb.Message.setWrapperField(this, 5, value);
2807
- };
2808
-
2809
-
2810
- /**
2811
- * Clears the message field making it undefined.
2812
- * @return {!proto.gateway.parallax.v1.AddSpanEventRequest} returns this
2813
- */
2814
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.clearTimestamp = function() {
2815
- return this.setTimestamp(undefined);
2816
- };
2817
-
2818
-
2819
- /**
2820
- * Returns whether this field is set.
2821
- * @return {boolean}
2822
- */
2823
- proto.gateway.parallax.v1.AddSpanEventRequest.prototype.hasTimestamp = function() {
2824
- return jspb.Message.getField(this, 5) != null;
2825
- };
2826
-
2827
-
2828
-
2829
-
2830
-
2831
- if (jspb.Message.GENERATE_TO_OBJECT) {
2832
- /**
2833
- * Creates an object representation of this proto.
2834
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2835
- * Optional fields that are not set will be set to undefined.
2836
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2837
- * For the list of reserved names please see:
2838
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2839
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2840
- * JSPB instance for transitional soy proto support:
2841
- * http://goto/soy-param-migration
2842
- * @return {!Object}
2843
- */
2844
- proto.gateway.parallax.v1.AddSpanEventResponse.prototype.toObject = function(opt_includeInstance) {
2845
- return proto.gateway.parallax.v1.AddSpanEventResponse.toObject(opt_includeInstance, this);
2846
- };
2847
-
2848
-
2849
- /**
2850
- * Static version of the {@see toObject} method.
2851
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
2852
- * the JSPB instance for transitional soy proto support:
2853
- * http://goto/soy-param-migration
2854
- * @param {!proto.gateway.parallax.v1.AddSpanEventResponse} msg The msg instance to transform.
2855
- * @return {!Object}
2856
- * @suppress {unusedLocalVariables} f is only used for nested messages
2857
- */
2858
- proto.gateway.parallax.v1.AddSpanEventResponse.toObject = function(includeInstance, msg) {
2859
- var f, obj = {
2860
- status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f)
2861
- };
2862
-
2863
- if (includeInstance) {
2864
- obj.$jspbMessageInstance = msg;
2865
- }
2866
- return obj;
2867
- };
2868
- }
2869
-
2870
-
2871
- /**
2872
- * Deserializes binary data (in protobuf wire format).
2873
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
2874
- * @return {!proto.gateway.parallax.v1.AddSpanEventResponse}
2875
- */
2876
- proto.gateway.parallax.v1.AddSpanEventResponse.deserializeBinary = function(bytes) {
2877
- var reader = new jspb.BinaryReader(bytes);
2878
- var msg = new proto.gateway.parallax.v1.AddSpanEventResponse;
2879
- return proto.gateway.parallax.v1.AddSpanEventResponse.deserializeBinaryFromReader(msg, reader);
2880
- };
2881
-
2882
-
2883
- /**
2884
- * Deserializes binary data (in protobuf wire format) from the
2885
- * given reader into the given message object.
2886
- * @param {!proto.gateway.parallax.v1.AddSpanEventResponse} msg The message object to deserialize into.
2887
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
2888
- * @return {!proto.gateway.parallax.v1.AddSpanEventResponse}
2889
- */
2890
- proto.gateway.parallax.v1.AddSpanEventResponse.deserializeBinaryFromReader = function(msg, reader) {
2891
- while (reader.nextField()) {
2892
- if (reader.isEndGroup()) {
2893
- break;
2894
- }
2895
- var field = reader.getFieldNumber();
2896
- switch (field) {
2897
- case 1:
2898
- var value = new proto_common_v1_status_pb.ResponseStatus;
2899
- reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
2900
- msg.setStatus(value);
2901
- break;
2902
- default:
2903
- reader.skipField();
2904
- break;
2905
- }
2906
- }
2907
- return msg;
2908
- };
2909
-
2910
-
2911
- /**
2912
- * Serializes the message to binary data (in protobuf wire format).
2913
- * @return {!Uint8Array}
2914
- */
2915
- proto.gateway.parallax.v1.AddSpanEventResponse.prototype.serializeBinary = function() {
2916
- var writer = new jspb.BinaryWriter();
2917
- proto.gateway.parallax.v1.AddSpanEventResponse.serializeBinaryToWriter(this, writer);
2918
- return writer.getResultBuffer();
2919
- };
2920
-
2921
-
2922
- /**
2923
- * Serializes the given message to binary data (in protobuf wire
2924
- * format), writing to the given BinaryWriter.
2925
- * @param {!proto.gateway.parallax.v1.AddSpanEventResponse} message
2926
- * @param {!jspb.BinaryWriter} writer
2927
- * @suppress {unusedLocalVariables} f is only used for nested messages
2928
- */
2929
- proto.gateway.parallax.v1.AddSpanEventResponse.serializeBinaryToWriter = function(message, writer) {
2930
- var f = undefined;
2931
- f = message.getStatus();
2932
- if (f != null) {
2933
- writer.writeMessage(
2934
- 1,
2935
- f,
2936
- proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
2937
- );
2938
- }
2939
- };
2940
-
2941
-
2942
- /**
2943
- * optional common.v1.ResponseStatus status = 1;
2944
- * @return {?proto.common.v1.ResponseStatus}
2945
- */
2946
- proto.gateway.parallax.v1.AddSpanEventResponse.prototype.getStatus = function() {
2947
- return /** @type{?proto.common.v1.ResponseStatus} */ (
2948
- jspb.Message.getWrapperField(this, proto_common_v1_status_pb.ResponseStatus, 1));
2949
- };
2950
-
2951
-
2952
- /**
2953
- * @param {?proto.common.v1.ResponseStatus|undefined} value
2954
- * @return {!proto.gateway.parallax.v1.AddSpanEventResponse} returns this
2955
- */
2956
- proto.gateway.parallax.v1.AddSpanEventResponse.prototype.setStatus = function(value) {
2957
- return jspb.Message.setWrapperField(this, 1, value);
2958
- };
2959
-
2960
-
2961
- /**
2962
- * Clears the message field making it undefined.
2963
- * @return {!proto.gateway.parallax.v1.AddSpanEventResponse} returns this
2964
- */
2965
- proto.gateway.parallax.v1.AddSpanEventResponse.prototype.clearStatus = function() {
2966
- return this.setStatus(undefined);
2967
- };
2968
-
2969
-
2970
- /**
2971
- * Returns whether this field is set.
2972
- * @return {boolean}
2973
- */
2974
- proto.gateway.parallax.v1.AddSpanEventResponse.prototype.hasStatus = function() {
2975
- return jspb.Message.getField(this, 1) != null;
2976
- };
2977
-
2978
-
2979
-
2980
-
2981
-
2982
- if (jspb.Message.GENERATE_TO_OBJECT) {
2983
- /**
2984
- * Creates an object representation of this proto.
2985
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
2986
- * Optional fields that are not set will be set to undefined.
2987
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
2988
- * For the list of reserved names please see:
2989
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
2990
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
2991
- * JSPB instance for transitional soy proto support:
2992
- * http://goto/soy-param-migration
2993
- * @return {!Object}
2994
- */
2995
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.toObject = function(opt_includeInstance) {
2996
- return proto.gateway.parallax.v1.AddSpanErrorRequest.toObject(opt_includeInstance, this);
2997
- };
2998
-
2999
-
3000
- /**
3001
- * Static version of the {@see toObject} method.
3002
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3003
- * the JSPB instance for transitional soy proto support:
3004
- * http://goto/soy-param-migration
3005
- * @param {!proto.gateway.parallax.v1.AddSpanErrorRequest} msg The msg instance to transform.
3006
- * @return {!Object}
3007
- * @suppress {unusedLocalVariables} f is only used for nested messages
3008
- */
3009
- proto.gateway.parallax.v1.AddSpanErrorRequest.toObject = function(includeInstance, msg) {
3010
- var f, obj = {
3011
- traceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
3012
- spanId: jspb.Message.getFieldWithDefault(msg, 2, ""),
3013
- errorType: jspb.Message.getFieldWithDefault(msg, 3, ""),
3014
- message: jspb.Message.getFieldWithDefault(msg, 4, ""),
3015
- stackTrace: (f = jspb.Message.getField(msg, 5)) == null ? undefined : f,
3016
- attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [],
3017
- timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
3018
- };
3019
-
3020
- if (includeInstance) {
3021
- obj.$jspbMessageInstance = msg;
3022
- }
3023
- return obj;
3024
- };
3025
- }
3026
-
3027
-
3028
- /**
3029
- * Deserializes binary data (in protobuf wire format).
3030
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
3031
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest}
3032
- */
3033
- proto.gateway.parallax.v1.AddSpanErrorRequest.deserializeBinary = function(bytes) {
3034
- var reader = new jspb.BinaryReader(bytes);
3035
- var msg = new proto.gateway.parallax.v1.AddSpanErrorRequest;
3036
- return proto.gateway.parallax.v1.AddSpanErrorRequest.deserializeBinaryFromReader(msg, reader);
3037
- };
3038
-
3039
-
3040
- /**
3041
- * Deserializes binary data (in protobuf wire format) from the
3042
- * given reader into the given message object.
3043
- * @param {!proto.gateway.parallax.v1.AddSpanErrorRequest} msg The message object to deserialize into.
3044
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3045
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest}
3046
- */
3047
- proto.gateway.parallax.v1.AddSpanErrorRequest.deserializeBinaryFromReader = function(msg, reader) {
1029
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.deserializeBinaryFromReader = function(msg, reader) {
3048
1030
  while (reader.nextField()) {
3049
1031
  if (reader.isEndGroup()) {
3050
1032
  break;
@@ -3053,31 +1035,17 @@ function requireParallax_gateway_pb () {
3053
1035
  switch (field) {
3054
1036
  case 1:
3055
1037
  var value = /** @type {string} */ (reader.readString());
3056
- msg.setTraceId(value);
1038
+ msg.setChainId(value);
3057
1039
  break;
3058
1040
  case 2:
3059
1041
  var value = /** @type {string} */ (reader.readString());
3060
- msg.setSpanId(value);
1042
+ msg.setTxHash(value);
3061
1043
  break;
3062
1044
  case 3:
3063
1045
  var value = /** @type {string} */ (reader.readString());
3064
- msg.setErrorType(value);
1046
+ msg.setDetails(value);
3065
1047
  break;
3066
1048
  case 4:
3067
- var value = /** @type {string} */ (reader.readString());
3068
- msg.setMessage(value);
3069
- break;
3070
- case 5:
3071
- var value = /** @type {string} */ (reader.readString());
3072
- msg.setStackTrace(value);
3073
- break;
3074
- case 6:
3075
- var value = msg.getAttributesMap();
3076
- reader.readMessage(value, function(message, reader) {
3077
- jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
3078
- });
3079
- break;
3080
- case 7:
3081
1049
  var value = new google_protobuf_timestamp_pb.Timestamp;
3082
1050
  reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
3083
1051
  msg.setTimestamp(value);
@@ -3095,9 +1063,9 @@ function requireParallax_gateway_pb () {
3095
1063
  * Serializes the message to binary data (in protobuf wire format).
3096
1064
  * @return {!Uint8Array}
3097
1065
  */
3098
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.serializeBinary = function() {
1066
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.serializeBinary = function() {
3099
1067
  var writer = new jspb.BinaryWriter();
3100
- proto.gateway.parallax.v1.AddSpanErrorRequest.serializeBinaryToWriter(this, writer);
1068
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.serializeBinaryToWriter(this, writer);
3101
1069
  return writer.getResultBuffer();
3102
1070
  };
3103
1071
 
@@ -3105,55 +1073,37 @@ function requireParallax_gateway_pb () {
3105
1073
  /**
3106
1074
  * Serializes the given message to binary data (in protobuf wire
3107
1075
  * format), writing to the given BinaryWriter.
3108
- * @param {!proto.gateway.parallax.v1.AddSpanErrorRequest} message
1076
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} message
3109
1077
  * @param {!jspb.BinaryWriter} writer
3110
1078
  * @suppress {unusedLocalVariables} f is only used for nested messages
3111
1079
  */
3112
- proto.gateway.parallax.v1.AddSpanErrorRequest.serializeBinaryToWriter = function(message, writer) {
1080
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.serializeBinaryToWriter = function(message, writer) {
3113
1081
  var f = undefined;
3114
- f = message.getTraceId();
1082
+ f = message.getChainId();
3115
1083
  if (f.length > 0) {
3116
1084
  writer.writeString(
3117
1085
  1,
3118
1086
  f
3119
1087
  );
3120
1088
  }
3121
- f = message.getSpanId();
1089
+ f = message.getTxHash();
3122
1090
  if (f.length > 0) {
3123
1091
  writer.writeString(
3124
1092
  2,
3125
1093
  f
3126
1094
  );
3127
1095
  }
3128
- f = message.getErrorType();
3129
- if (f.length > 0) {
3130
- writer.writeString(
3131
- 3,
3132
- f
3133
- );
3134
- }
3135
- f = message.getMessage();
3136
- if (f.length > 0) {
3137
- writer.writeString(
3138
- 4,
3139
- f
3140
- );
3141
- }
3142
- f = /** @type {string} */ (jspb.Message.getField(message, 5));
1096
+ f = /** @type {string} */ (jspb.Message.getField(message, 3));
3143
1097
  if (f != null) {
3144
1098
  writer.writeString(
3145
- 5,
1099
+ 3,
3146
1100
  f
3147
1101
  );
3148
1102
  }
3149
- f = message.getAttributesMap(true);
3150
- if (f && f.getLength() > 0) {
3151
- f.serializeBinary(6, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
3152
- }
3153
1103
  f = message.getTimestamp();
3154
1104
  if (f != null) {
3155
1105
  writer.writeMessage(
3156
- 7,
1106
+ 4,
3157
1107
  f,
3158
1108
  google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
3159
1109
  );
@@ -3162,312 +1112,65 @@ function requireParallax_gateway_pb () {
3162
1112
 
3163
1113
 
3164
1114
  /**
3165
- * optional string trace_id = 1;
3166
- * @return {string}
3167
- */
3168
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getTraceId = function() {
3169
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3170
- };
3171
-
3172
-
3173
- /**
3174
- * @param {string} value
3175
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3176
- */
3177
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.setTraceId = function(value) {
3178
- return jspb.Message.setProto3StringField(this, 1, value);
3179
- };
3180
-
3181
-
3182
- /**
3183
- * optional string span_id = 2;
3184
- * @return {string}
3185
- */
3186
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getSpanId = function() {
3187
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3188
- };
3189
-
3190
-
3191
- /**
3192
- * @param {string} value
3193
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3194
- */
3195
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.setSpanId = function(value) {
3196
- return jspb.Message.setProto3StringField(this, 2, value);
3197
- };
3198
-
3199
-
3200
- /**
3201
- * optional string error_type = 3;
3202
- * @return {string}
3203
- */
3204
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getErrorType = function() {
3205
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
3206
- };
3207
-
3208
-
3209
- /**
3210
- * @param {string} value
3211
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3212
- */
3213
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.setErrorType = function(value) {
3214
- return jspb.Message.setProto3StringField(this, 3, value);
3215
- };
3216
-
3217
-
3218
- /**
3219
- * optional string message = 4;
3220
- * @return {string}
3221
- */
3222
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getMessage = function() {
3223
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
3224
- };
3225
-
3226
-
3227
- /**
3228
- * @param {string} value
3229
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3230
- */
3231
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.setMessage = function(value) {
3232
- return jspb.Message.setProto3StringField(this, 4, value);
3233
- };
3234
-
3235
-
3236
- /**
3237
- * optional string stack_trace = 5;
1115
+ * optional string chain_id = 1;
3238
1116
  * @return {string}
3239
1117
  */
3240
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getStackTrace = function() {
3241
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, ""));
3242
- };
3243
-
3244
-
3245
- /**
3246
- * @param {string} value
3247
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3248
- */
3249
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.setStackTrace = function(value) {
3250
- return jspb.Message.setField(this, 5, value);
3251
- };
3252
-
3253
-
3254
- /**
3255
- * Clears the field making it undefined.
3256
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3257
- */
3258
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.clearStackTrace = function() {
3259
- return jspb.Message.setField(this, 5, undefined);
3260
- };
3261
-
3262
-
3263
- /**
3264
- * Returns whether this field is set.
3265
- * @return {boolean}
3266
- */
3267
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.hasStackTrace = function() {
3268
- return jspb.Message.getField(this, 5) != null;
3269
- };
3270
-
3271
-
3272
- /**
3273
- * map<string, string> attributes = 6;
3274
- * @param {boolean=} opt_noLazyCreate Do not create the map if
3275
- * empty, instead returning `undefined`
3276
- * @return {!jspb.Map<string,string>}
3277
- */
3278
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getAttributesMap = function(opt_noLazyCreate) {
3279
- return /** @type {!jspb.Map<string,string>} */ (
3280
- jspb.Message.getMapField(this, 6, opt_noLazyCreate,
3281
- null));
3282
- };
3283
-
3284
-
3285
- /**
3286
- * Clears values from the map. The map will be non-null.
3287
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3288
- */
3289
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.clearAttributesMap = function() {
3290
- this.getAttributesMap().clear();
3291
- return this;
3292
- };
3293
-
3294
-
3295
- /**
3296
- * optional google.protobuf.Timestamp timestamp = 7;
3297
- * @return {?proto.google.protobuf.Timestamp}
3298
- */
3299
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.getTimestamp = function() {
3300
- return /** @type{?proto.google.protobuf.Timestamp} */ (
3301
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 7));
3302
- };
3303
-
3304
-
3305
- /**
3306
- * @param {?proto.google.protobuf.Timestamp|undefined} value
3307
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3308
- */
3309
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.setTimestamp = function(value) {
3310
- return jspb.Message.setWrapperField(this, 7, value);
3311
- };
3312
-
3313
-
3314
- /**
3315
- * Clears the message field making it undefined.
3316
- * @return {!proto.gateway.parallax.v1.AddSpanErrorRequest} returns this
3317
- */
3318
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.clearTimestamp = function() {
3319
- return this.setTimestamp(undefined);
3320
- };
3321
-
3322
-
3323
- /**
3324
- * Returns whether this field is set.
3325
- * @return {boolean}
3326
- */
3327
- proto.gateway.parallax.v1.AddSpanErrorRequest.prototype.hasTimestamp = function() {
3328
- return jspb.Message.getField(this, 7) != null;
3329
- };
3330
-
3331
-
3332
-
3333
-
3334
-
3335
- if (jspb.Message.GENERATE_TO_OBJECT) {
3336
- /**
3337
- * Creates an object representation of this proto.
3338
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
3339
- * Optional fields that are not set will be set to undefined.
3340
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3341
- * For the list of reserved names please see:
3342
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3343
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3344
- * JSPB instance for transitional soy proto support:
3345
- * http://goto/soy-param-migration
3346
- * @return {!Object}
3347
- */
3348
- proto.gateway.parallax.v1.AddSpanErrorResponse.prototype.toObject = function(opt_includeInstance) {
3349
- return proto.gateway.parallax.v1.AddSpanErrorResponse.toObject(opt_includeInstance, this);
3350
- };
3351
-
3352
-
3353
- /**
3354
- * Static version of the {@see toObject} method.
3355
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3356
- * the JSPB instance for transitional soy proto support:
3357
- * http://goto/soy-param-migration
3358
- * @param {!proto.gateway.parallax.v1.AddSpanErrorResponse} msg The msg instance to transform.
3359
- * @return {!Object}
3360
- * @suppress {unusedLocalVariables} f is only used for nested messages
3361
- */
3362
- proto.gateway.parallax.v1.AddSpanErrorResponse.toObject = function(includeInstance, msg) {
3363
- var f, obj = {
3364
- status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f)
3365
- };
3366
-
3367
- if (includeInstance) {
3368
- obj.$jspbMessageInstance = msg;
3369
- }
3370
- return obj;
3371
- };
3372
- }
3373
-
3374
-
3375
- /**
3376
- * Deserializes binary data (in protobuf wire format).
3377
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
3378
- * @return {!proto.gateway.parallax.v1.AddSpanErrorResponse}
3379
- */
3380
- proto.gateway.parallax.v1.AddSpanErrorResponse.deserializeBinary = function(bytes) {
3381
- var reader = new jspb.BinaryReader(bytes);
3382
- var msg = new proto.gateway.parallax.v1.AddSpanErrorResponse;
3383
- return proto.gateway.parallax.v1.AddSpanErrorResponse.deserializeBinaryFromReader(msg, reader);
3384
- };
3385
-
3386
-
3387
- /**
3388
- * Deserializes binary data (in protobuf wire format) from the
3389
- * given reader into the given message object.
3390
- * @param {!proto.gateway.parallax.v1.AddSpanErrorResponse} msg The message object to deserialize into.
3391
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3392
- * @return {!proto.gateway.parallax.v1.AddSpanErrorResponse}
3393
- */
3394
- proto.gateway.parallax.v1.AddSpanErrorResponse.deserializeBinaryFromReader = function(msg, reader) {
3395
- while (reader.nextField()) {
3396
- if (reader.isEndGroup()) {
3397
- break;
3398
- }
3399
- var field = reader.getFieldNumber();
3400
- switch (field) {
3401
- case 1:
3402
- var value = new proto_common_v1_status_pb.ResponseStatus;
3403
- reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
3404
- msg.setStatus(value);
3405
- break;
3406
- default:
3407
- reader.skipField();
3408
- break;
3409
- }
3410
- }
3411
- return msg;
1118
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.getChainId = function() {
1119
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3412
1120
  };
3413
1121
 
3414
1122
 
3415
1123
  /**
3416
- * Serializes the message to binary data (in protobuf wire format).
3417
- * @return {!Uint8Array}
1124
+ * @param {string} value
1125
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} returns this
3418
1126
  */
3419
- proto.gateway.parallax.v1.AddSpanErrorResponse.prototype.serializeBinary = function() {
3420
- var writer = new jspb.BinaryWriter();
3421
- proto.gateway.parallax.v1.AddSpanErrorResponse.serializeBinaryToWriter(this, writer);
3422
- return writer.getResultBuffer();
1127
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.setChainId = function(value) {
1128
+ return jspb.Message.setProto3StringField(this, 1, value);
3423
1129
  };
3424
1130
 
3425
1131
 
3426
1132
  /**
3427
- * Serializes the given message to binary data (in protobuf wire
3428
- * format), writing to the given BinaryWriter.
3429
- * @param {!proto.gateway.parallax.v1.AddSpanErrorResponse} message
3430
- * @param {!jspb.BinaryWriter} writer
3431
- * @suppress {unusedLocalVariables} f is only used for nested messages
1133
+ * optional string tx_hash = 2;
1134
+ * @return {string}
3432
1135
  */
3433
- proto.gateway.parallax.v1.AddSpanErrorResponse.serializeBinaryToWriter = function(message, writer) {
3434
- var f = undefined;
3435
- f = message.getStatus();
3436
- if (f != null) {
3437
- writer.writeMessage(
3438
- 1,
3439
- f,
3440
- proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
3441
- );
3442
- }
1136
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.getTxHash = function() {
1137
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3443
1138
  };
3444
1139
 
3445
1140
 
3446
1141
  /**
3447
- * optional common.v1.ResponseStatus status = 1;
3448
- * @return {?proto.common.v1.ResponseStatus}
1142
+ * @param {string} value
1143
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} returns this
3449
1144
  */
3450
- proto.gateway.parallax.v1.AddSpanErrorResponse.prototype.getStatus = function() {
3451
- return /** @type{?proto.common.v1.ResponseStatus} */ (
3452
- jspb.Message.getWrapperField(this, proto_common_v1_status_pb.ResponseStatus, 1));
1145
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.setTxHash = function(value) {
1146
+ return jspb.Message.setProto3StringField(this, 2, value);
3453
1147
  };
3454
1148
 
3455
1149
 
3456
1150
  /**
3457
- * @param {?proto.common.v1.ResponseStatus|undefined} value
3458
- * @return {!proto.gateway.parallax.v1.AddSpanErrorResponse} returns this
3459
- */
3460
- proto.gateway.parallax.v1.AddSpanErrorResponse.prototype.setStatus = function(value) {
3461
- return jspb.Message.setWrapperField(this, 1, value);
1151
+ * optional string details = 3;
1152
+ * @return {string}
1153
+ */
1154
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.getDetails = function() {
1155
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
3462
1156
  };
3463
1157
 
3464
1158
 
3465
1159
  /**
3466
- * Clears the message field making it undefined.
3467
- * @return {!proto.gateway.parallax.v1.AddSpanErrorResponse} returns this
1160
+ * @param {string} value
1161
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} returns this
3468
1162
  */
3469
- proto.gateway.parallax.v1.AddSpanErrorResponse.prototype.clearStatus = function() {
3470
- return this.setStatus(undefined);
1163
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.setDetails = function(value) {
1164
+ return jspb.Message.setField(this, 3, value);
1165
+ };
1166
+
1167
+
1168
+ /**
1169
+ * Clears the field making it undefined.
1170
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} returns this
1171
+ */
1172
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.clearDetails = function() {
1173
+ return jspb.Message.setField(this, 3, undefined);
3471
1174
  };
3472
1175
 
3473
1176
 
@@ -3475,39 +1178,51 @@ function requireParallax_gateway_pb () {
3475
1178
  * Returns whether this field is set.
3476
1179
  * @return {boolean}
3477
1180
  */
3478
- proto.gateway.parallax.v1.AddSpanErrorResponse.prototype.hasStatus = function() {
3479
- return jspb.Message.getField(this, 1) != null;
1181
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.hasDetails = function() {
1182
+ return jspb.Message.getField(this, 3) != null;
3480
1183
  };
3481
1184
 
3482
1185
 
3483
-
3484
1186
  /**
3485
- * Oneof group definitions for this message. Each group defines the field
3486
- * numbers belonging to that group. When of these fields' value is set, all
3487
- * other fields in the group are cleared. During deserialization, if multiple
3488
- * fields are encountered for a group, only the last value seen will be kept.
3489
- * @private {!Array<!Array<number>>}
3490
- * @const
1187
+ * optional google.protobuf.Timestamp timestamp = 4;
1188
+ * @return {?proto.google.protobuf.Timestamp}
3491
1189
  */
3492
- proto.gateway.parallax.v1.AddSpanHintRequest.oneofGroups_ = [[10]];
1190
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.getTimestamp = function() {
1191
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1192
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 4));
1193
+ };
1194
+
3493
1195
 
3494
1196
  /**
3495
- * @enum {number}
1197
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1198
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} returns this
1199
+ */
1200
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.setTimestamp = function(value) {
1201
+ return jspb.Message.setWrapperField(this, 4, value);
1202
+ };
1203
+
1204
+
1205
+ /**
1206
+ * Clears the message field making it undefined.
1207
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} returns this
3496
1208
  */
3497
- proto.gateway.parallax.v1.AddSpanHintRequest.HintTypeCase = {
3498
- HINT_TYPE_NOT_SET: 0,
3499
- CHAIN_TRANSACTION: 10
1209
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.clearTimestamp = function() {
1210
+ return this.setTimestamp(undefined);
3500
1211
  };
3501
1212
 
1213
+
3502
1214
  /**
3503
- * @return {proto.gateway.parallax.v1.AddSpanHintRequest.HintTypeCase}
1215
+ * Returns whether this field is set.
1216
+ * @return {boolean}
3504
1217
  */
3505
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.getHintTypeCase = function() {
3506
- return /** @type {proto.gateway.parallax.v1.AddSpanHintRequest.HintTypeCase} */(jspb.Message.computeOneofCase(this, proto.gateway.parallax.v1.AddSpanHintRequest.oneofGroups_[0]));
1218
+ proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint.prototype.hasTimestamp = function() {
1219
+ return jspb.Message.getField(this, 4) != null;
3507
1220
  };
3508
1221
 
3509
1222
 
3510
1223
 
1224
+
1225
+
3511
1226
  if (jspb.Message.GENERATE_TO_OBJECT) {
3512
1227
  /**
3513
1228
  * Creates an object representation of this proto.
@@ -3521,8 +1236,8 @@ function requireParallax_gateway_pb () {
3521
1236
  * http://goto/soy-param-migration
3522
1237
  * @return {!Object}
3523
1238
  */
3524
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.toObject = function(opt_includeInstance) {
3525
- return proto.gateway.parallax.v1.AddSpanHintRequest.toObject(opt_includeInstance, this);
1239
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.toObject = function(opt_includeInstance) {
1240
+ return proto.gateway.parallax.v1.CreateTraceRequest.Event.toObject(opt_includeInstance, this);
3526
1241
  };
3527
1242
 
3528
1243
 
@@ -3531,16 +1246,15 @@ function requireParallax_gateway_pb () {
3531
1246
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3532
1247
  * the JSPB instance for transitional soy proto support:
3533
1248
  * http://goto/soy-param-migration
3534
- * @param {!proto.gateway.parallax.v1.AddSpanHintRequest} msg The msg instance to transform.
1249
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.Event} msg The msg instance to transform.
3535
1250
  * @return {!Object}
3536
1251
  * @suppress {unusedLocalVariables} f is only used for nested messages
3537
1252
  */
3538
- proto.gateway.parallax.v1.AddSpanHintRequest.toObject = function(includeInstance, msg) {
1253
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.toObject = function(includeInstance, msg) {
3539
1254
  var f, obj = {
3540
- traceId: jspb.Message.getFieldWithDefault(msg, 1, ""),
3541
- parentSpanId: jspb.Message.getFieldWithDefault(msg, 2, ""),
3542
- timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
3543
- chainTransaction: (f = msg.getChainTransaction()) && proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.toObject(includeInstance, f)
1255
+ eventName: jspb.Message.getFieldWithDefault(msg, 1, ""),
1256
+ details: (f = jspb.Message.getField(msg, 2)) == null ? undefined : f,
1257
+ timestamp: (f = msg.getTimestamp()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
3544
1258
  };
3545
1259
 
3546
1260
  if (includeInstance) {
@@ -3554,23 +1268,23 @@ function requireParallax_gateway_pb () {
3554
1268
  /**
3555
1269
  * Deserializes binary data (in protobuf wire format).
3556
1270
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
3557
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest}
1271
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event}
3558
1272
  */
3559
- proto.gateway.parallax.v1.AddSpanHintRequest.deserializeBinary = function(bytes) {
1273
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.deserializeBinary = function(bytes) {
3560
1274
  var reader = new jspb.BinaryReader(bytes);
3561
- var msg = new proto.gateway.parallax.v1.AddSpanHintRequest;
3562
- return proto.gateway.parallax.v1.AddSpanHintRequest.deserializeBinaryFromReader(msg, reader);
1275
+ var msg = new proto.gateway.parallax.v1.CreateTraceRequest.Event;
1276
+ return proto.gateway.parallax.v1.CreateTraceRequest.Event.deserializeBinaryFromReader(msg, reader);
3563
1277
  };
3564
1278
 
3565
1279
 
3566
1280
  /**
3567
1281
  * Deserializes binary data (in protobuf wire format) from the
3568
1282
  * given reader into the given message object.
3569
- * @param {!proto.gateway.parallax.v1.AddSpanHintRequest} msg The message object to deserialize into.
1283
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.Event} msg The message object to deserialize into.
3570
1284
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3571
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest}
1285
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event}
3572
1286
  */
3573
- proto.gateway.parallax.v1.AddSpanHintRequest.deserializeBinaryFromReader = function(msg, reader) {
1287
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.deserializeBinaryFromReader = function(msg, reader) {
3574
1288
  while (reader.nextField()) {
3575
1289
  if (reader.isEndGroup()) {
3576
1290
  break;
@@ -3579,22 +1293,17 @@ function requireParallax_gateway_pb () {
3579
1293
  switch (field) {
3580
1294
  case 1:
3581
1295
  var value = /** @type {string} */ (reader.readString());
3582
- msg.setTraceId(value);
1296
+ msg.setEventName(value);
3583
1297
  break;
3584
1298
  case 2:
3585
1299
  var value = /** @type {string} */ (reader.readString());
3586
- msg.setParentSpanId(value);
1300
+ msg.setDetails(value);
3587
1301
  break;
3588
1302
  case 3:
3589
1303
  var value = new google_protobuf_timestamp_pb.Timestamp;
3590
1304
  reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
3591
1305
  msg.setTimestamp(value);
3592
1306
  break;
3593
- case 10:
3594
- var value = new proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction;
3595
- reader.readMessage(value,proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.deserializeBinaryFromReader);
3596
- msg.setChainTransaction(value);
3597
- break;
3598
1307
  default:
3599
1308
  reader.skipField();
3600
1309
  break;
@@ -3608,9 +1317,9 @@ function requireParallax_gateway_pb () {
3608
1317
  * Serializes the message to binary data (in protobuf wire format).
3609
1318
  * @return {!Uint8Array}
3610
1319
  */
3611
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.serializeBinary = function() {
1320
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.serializeBinary = function() {
3612
1321
  var writer = new jspb.BinaryWriter();
3613
- proto.gateway.parallax.v1.AddSpanHintRequest.serializeBinaryToWriter(this, writer);
1322
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.serializeBinaryToWriter(this, writer);
3614
1323
  return writer.getResultBuffer();
3615
1324
  };
3616
1325
 
@@ -3618,21 +1327,21 @@ function requireParallax_gateway_pb () {
3618
1327
  /**
3619
1328
  * Serializes the given message to binary data (in protobuf wire
3620
1329
  * format), writing to the given BinaryWriter.
3621
- * @param {!proto.gateway.parallax.v1.AddSpanHintRequest} message
1330
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.Event} message
3622
1331
  * @param {!jspb.BinaryWriter} writer
3623
1332
  * @suppress {unusedLocalVariables} f is only used for nested messages
3624
1333
  */
3625
- proto.gateway.parallax.v1.AddSpanHintRequest.serializeBinaryToWriter = function(message, writer) {
1334
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.serializeBinaryToWriter = function(message, writer) {
3626
1335
  var f = undefined;
3627
- f = message.getTraceId();
1336
+ f = message.getEventName();
3628
1337
  if (f.length > 0) {
3629
1338
  writer.writeString(
3630
1339
  1,
3631
1340
  f
3632
1341
  );
3633
1342
  }
3634
- f = message.getParentSpanId();
3635
- if (f.length > 0) {
1343
+ f = /** @type {string} */ (jspb.Message.getField(message, 2));
1344
+ if (f != null) {
3636
1345
  writer.writeString(
3637
1346
  2,
3638
1347
  f
@@ -3646,275 +1355,241 @@ function requireParallax_gateway_pb () {
3646
1355
  google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
3647
1356
  );
3648
1357
  }
3649
- f = message.getChainTransaction();
3650
- if (f != null) {
3651
- writer.writeMessage(
3652
- 10,
3653
- f,
3654
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.serializeBinaryToWriter
3655
- );
3656
- }
3657
1358
  };
3658
1359
 
3659
1360
 
1361
+ /**
1362
+ * optional string event_name = 1;
1363
+ * @return {string}
1364
+ */
1365
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.getEventName = function() {
1366
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1367
+ };
1368
+
3660
1369
 
1370
+ /**
1371
+ * @param {string} value
1372
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event} returns this
1373
+ */
1374
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.setEventName = function(value) {
1375
+ return jspb.Message.setProto3StringField(this, 1, value);
1376
+ };
3661
1377
 
3662
1378
 
3663
- if (jspb.Message.GENERATE_TO_OBJECT) {
3664
1379
  /**
3665
- * Creates an object representation of this proto.
3666
- * Field names that are reserved in JavaScript and will be renamed to pb_name.
3667
- * Optional fields that are not set will be set to undefined.
3668
- * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
3669
- * For the list of reserved names please see:
3670
- * net/proto2/compiler/js/internal/generator.cc#kKeyword.
3671
- * @param {boolean=} opt_includeInstance Deprecated. whether to include the
3672
- * JSPB instance for transitional soy proto support:
3673
- * http://goto/soy-param-migration
3674
- * @return {!Object}
1380
+ * optional string details = 2;
1381
+ * @return {string}
3675
1382
  */
3676
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.prototype.toObject = function(opt_includeInstance) {
3677
- return proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.toObject(opt_includeInstance, this);
1383
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.getDetails = function() {
1384
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
3678
1385
  };
3679
1386
 
3680
1387
 
3681
1388
  /**
3682
- * Static version of the {@see toObject} method.
3683
- * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3684
- * the JSPB instance for transitional soy proto support:
3685
- * http://goto/soy-param-migration
3686
- * @param {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction} msg The msg instance to transform.
3687
- * @return {!Object}
3688
- * @suppress {unusedLocalVariables} f is only used for nested messages
1389
+ * @param {string} value
1390
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event} returns this
3689
1391
  */
3690
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.toObject = function(includeInstance, msg) {
3691
- var obj = {
3692
- txHash: jspb.Message.getFieldWithDefault(msg, 1, ""),
3693
- chainId: jspb.Message.getFieldWithDefault(msg, 2, 0)
3694
- };
1392
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.setDetails = function(value) {
1393
+ return jspb.Message.setField(this, 2, value);
1394
+ };
3695
1395
 
3696
- if (includeInstance) {
3697
- obj.$jspbMessageInstance = msg;
3698
- }
3699
- return obj;
1396
+
1397
+ /**
1398
+ * Clears the field making it undefined.
1399
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event} returns this
1400
+ */
1401
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.clearDetails = function() {
1402
+ return jspb.Message.setField(this, 2, undefined);
3700
1403
  };
3701
- }
3702
1404
 
3703
1405
 
3704
1406
  /**
3705
- * Deserializes binary data (in protobuf wire format).
3706
- * @param {jspb.ByteSource} bytes The bytes to deserialize.
3707
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction}
1407
+ * Returns whether this field is set.
1408
+ * @return {boolean}
3708
1409
  */
3709
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.deserializeBinary = function(bytes) {
3710
- var reader = new jspb.BinaryReader(bytes);
3711
- var msg = new proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction;
3712
- return proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.deserializeBinaryFromReader(msg, reader);
1410
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.hasDetails = function() {
1411
+ return jspb.Message.getField(this, 2) != null;
3713
1412
  };
3714
1413
 
3715
1414
 
3716
1415
  /**
3717
- * Deserializes binary data (in protobuf wire format) from the
3718
- * given reader into the given message object.
3719
- * @param {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction} msg The message object to deserialize into.
3720
- * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3721
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction}
1416
+ * optional google.protobuf.Timestamp timestamp = 3;
1417
+ * @return {?proto.google.protobuf.Timestamp}
3722
1418
  */
3723
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.deserializeBinaryFromReader = function(msg, reader) {
3724
- while (reader.nextField()) {
3725
- if (reader.isEndGroup()) {
3726
- break;
3727
- }
3728
- var field = reader.getFieldNumber();
3729
- switch (field) {
3730
- case 1:
3731
- var value = /** @type {string} */ (reader.readString());
3732
- msg.setTxHash(value);
3733
- break;
3734
- case 2:
3735
- var value = /** @type {number} */ (reader.readUint64());
3736
- msg.setChainId(value);
3737
- break;
3738
- default:
3739
- reader.skipField();
3740
- break;
3741
- }
3742
- }
3743
- return msg;
1419
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.getTimestamp = function() {
1420
+ return /** @type{?proto.google.protobuf.Timestamp} */ (
1421
+ jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
3744
1422
  };
3745
1423
 
3746
1424
 
3747
1425
  /**
3748
- * Serializes the message to binary data (in protobuf wire format).
3749
- * @return {!Uint8Array}
1426
+ * @param {?proto.google.protobuf.Timestamp|undefined} value
1427
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event} returns this
1428
+ */
1429
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.setTimestamp = function(value) {
1430
+ return jspb.Message.setWrapperField(this, 3, value);
1431
+ };
1432
+
1433
+
1434
+ /**
1435
+ * Clears the message field making it undefined.
1436
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event} returns this
3750
1437
  */
3751
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.prototype.serializeBinary = function() {
3752
- var writer = new jspb.BinaryWriter();
3753
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.serializeBinaryToWriter(this, writer);
3754
- return writer.getResultBuffer();
1438
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.clearTimestamp = function() {
1439
+ return this.setTimestamp(undefined);
3755
1440
  };
3756
1441
 
3757
1442
 
3758
1443
  /**
3759
- * Serializes the given message to binary data (in protobuf wire
3760
- * format), writing to the given BinaryWriter.
3761
- * @param {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction} message
3762
- * @param {!jspb.BinaryWriter} writer
3763
- * @suppress {unusedLocalVariables} f is only used for nested messages
1444
+ * Returns whether this field is set.
1445
+ * @return {boolean}
3764
1446
  */
3765
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.serializeBinaryToWriter = function(message, writer) {
3766
- var f = undefined;
3767
- f = message.getTxHash();
3768
- if (f.length > 0) {
3769
- writer.writeString(
3770
- 1,
3771
- f
3772
- );
3773
- }
3774
- f = message.getChainId();
3775
- if (f !== 0) {
3776
- writer.writeUint64(
3777
- 2,
3778
- f
3779
- );
3780
- }
1447
+ proto.gateway.parallax.v1.CreateTraceRequest.Event.prototype.hasTimestamp = function() {
1448
+ return jspb.Message.getField(this, 3) != null;
3781
1449
  };
3782
1450
 
3783
1451
 
3784
1452
  /**
3785
- * optional string tx_hash = 1;
1453
+ * optional string name = 1;
3786
1454
  * @return {string}
3787
1455
  */
3788
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.prototype.getTxHash = function() {
1456
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.getName = function() {
3789
1457
  return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
3790
1458
  };
3791
1459
 
3792
1460
 
3793
1461
  /**
3794
1462
  * @param {string} value
3795
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction} returns this
1463
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3796
1464
  */
3797
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.prototype.setTxHash = function(value) {
1465
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.setName = function(value) {
3798
1466
  return jspb.Message.setProto3StringField(this, 1, value);
3799
1467
  };
3800
1468
 
3801
1469
 
3802
1470
  /**
3803
- * optional uint64 chain_id = 2;
3804
- * @return {number}
1471
+ * map<string, string> attributes = 2;
1472
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
1473
+ * empty, instead returning `undefined`
1474
+ * @return {!jspb.Map<string,string>}
3805
1475
  */
3806
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.prototype.getChainId = function() {
3807
- return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0));
1476
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.getAttributesMap = function(opt_noLazyCreate) {
1477
+ return /** @type {!jspb.Map<string,string>} */ (
1478
+ jspb.Message.getMapField(this, 2, opt_noLazyCreate,
1479
+ null));
3808
1480
  };
3809
1481
 
3810
1482
 
3811
1483
  /**
3812
- * @param {number} value
3813
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction} returns this
1484
+ * Clears values from the map. The map will be non-null.
1485
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3814
1486
  */
3815
- proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction.prototype.setChainId = function(value) {
3816
- return jspb.Message.setProto3IntField(this, 2, value);
1487
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearAttributesMap = function() {
1488
+ this.getAttributesMap().clear();
1489
+ return this;
3817
1490
  };
3818
1491
 
3819
1492
 
3820
1493
  /**
3821
- * optional string trace_id = 1;
3822
- * @return {string}
1494
+ * repeated string tags = 3;
1495
+ * @return {!Array<string>}
3823
1496
  */
3824
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.getTraceId = function() {
3825
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
1497
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.getTagsList = function() {
1498
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 3));
3826
1499
  };
3827
1500
 
3828
1501
 
3829
1502
  /**
3830
- * @param {string} value
3831
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest} returns this
1503
+ * @param {!Array<string>} value
1504
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3832
1505
  */
3833
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.setTraceId = function(value) {
3834
- return jspb.Message.setProto3StringField(this, 1, value);
1506
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.setTagsList = function(value) {
1507
+ return jspb.Message.setField(this, 3, value || []);
3835
1508
  };
3836
1509
 
3837
1510
 
3838
1511
  /**
3839
- * optional string parent_span_id = 2;
3840
- * @return {string}
1512
+ * @param {string} value
1513
+ * @param {number=} opt_index
1514
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3841
1515
  */
3842
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.getParentSpanId = function() {
3843
- return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1516
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.addTags = function(value, opt_index) {
1517
+ return jspb.Message.addToRepeatedField(this, 3, value, opt_index);
3844
1518
  };
3845
1519
 
3846
1520
 
3847
1521
  /**
3848
- * @param {string} value
3849
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest} returns this
1522
+ * Clears the list making it empty but non-null.
1523
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3850
1524
  */
3851
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.setParentSpanId = function(value) {
3852
- return jspb.Message.setProto3StringField(this, 2, value);
1525
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearTagsList = function() {
1526
+ return this.setTagsList([]);
3853
1527
  };
3854
1528
 
3855
1529
 
3856
1530
  /**
3857
- * optional google.protobuf.Timestamp timestamp = 3;
3858
- * @return {?proto.google.protobuf.Timestamp}
1531
+ * repeated Event events = 4;
1532
+ * @return {!Array<!proto.gateway.parallax.v1.CreateTraceRequest.Event>}
3859
1533
  */
3860
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.getTimestamp = function() {
3861
- return /** @type{?proto.google.protobuf.Timestamp} */ (
3862
- jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3));
1534
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.getEventsList = function() {
1535
+ return /** @type{!Array<!proto.gateway.parallax.v1.CreateTraceRequest.Event>} */ (
1536
+ jspb.Message.getRepeatedWrapperField(this, proto.gateway.parallax.v1.CreateTraceRequest.Event, 4));
3863
1537
  };
3864
1538
 
3865
1539
 
3866
1540
  /**
3867
- * @param {?proto.google.protobuf.Timestamp|undefined} value
3868
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest} returns this
1541
+ * @param {!Array<!proto.gateway.parallax.v1.CreateTraceRequest.Event>} value
1542
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3869
1543
  */
3870
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.setTimestamp = function(value) {
3871
- return jspb.Message.setWrapperField(this, 3, value);
1544
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.setEventsList = function(value) {
1545
+ return jspb.Message.setRepeatedWrapperField(this, 4, value);
3872
1546
  };
3873
1547
 
3874
1548
 
3875
1549
  /**
3876
- * Clears the message field making it undefined.
3877
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest} returns this
1550
+ * @param {!proto.gateway.parallax.v1.CreateTraceRequest.Event=} opt_value
1551
+ * @param {number=} opt_index
1552
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest.Event}
3878
1553
  */
3879
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.clearTimestamp = function() {
3880
- return this.setTimestamp(undefined);
1554
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.addEvents = function(opt_value, opt_index) {
1555
+ return jspb.Message.addToRepeatedWrapperField(this, 4, opt_value, proto.gateway.parallax.v1.CreateTraceRequest.Event, opt_index);
3881
1556
  };
3882
1557
 
3883
1558
 
3884
1559
  /**
3885
- * Returns whether this field is set.
3886
- * @return {boolean}
1560
+ * Clears the list making it empty but non-null.
1561
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3887
1562
  */
3888
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.hasTimestamp = function() {
3889
- return jspb.Message.getField(this, 3) != null;
1563
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearEventsList = function() {
1564
+ return this.setEventsList([]);
3890
1565
  };
3891
1566
 
3892
1567
 
3893
1568
  /**
3894
- * optional ChainTransaction chain_transaction = 10;
3895
- * @return {?proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction}
1569
+ * optional TxHashHint tx_hash_hint = 5;
1570
+ * @return {?proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint}
3896
1571
  */
3897
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.getChainTransaction = function() {
3898
- return /** @type{?proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction} */ (
3899
- jspb.Message.getWrapperField(this, proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction, 10));
1572
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.getTxHashHint = function() {
1573
+ return /** @type{?proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint} */ (
1574
+ jspb.Message.getWrapperField(this, proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint, 5));
3900
1575
  };
3901
1576
 
3902
1577
 
3903
1578
  /**
3904
- * @param {?proto.gateway.parallax.v1.AddSpanHintRequest.ChainTransaction|undefined} value
3905
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest} returns this
1579
+ * @param {?proto.gateway.parallax.v1.CreateTraceRequest.TxHashHint|undefined} value
1580
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3906
1581
  */
3907
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.setChainTransaction = function(value) {
3908
- return jspb.Message.setOneofWrapperField(this, 10, proto.gateway.parallax.v1.AddSpanHintRequest.oneofGroups_[0], value);
1582
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.setTxHashHint = function(value) {
1583
+ return jspb.Message.setWrapperField(this, 5, value);
3909
1584
  };
3910
1585
 
3911
1586
 
3912
1587
  /**
3913
1588
  * Clears the message field making it undefined.
3914
- * @return {!proto.gateway.parallax.v1.AddSpanHintRequest} returns this
1589
+ * @return {!proto.gateway.parallax.v1.CreateTraceRequest} returns this
3915
1590
  */
3916
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.clearChainTransaction = function() {
3917
- return this.setChainTransaction(undefined);
1591
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.clearTxHashHint = function() {
1592
+ return this.setTxHashHint(undefined);
3918
1593
  };
3919
1594
 
3920
1595
 
@@ -3922,8 +1597,8 @@ function requireParallax_gateway_pb () {
3922
1597
  * Returns whether this field is set.
3923
1598
  * @return {boolean}
3924
1599
  */
3925
- proto.gateway.parallax.v1.AddSpanHintRequest.prototype.hasChainTransaction = function() {
3926
- return jspb.Message.getField(this, 10) != null;
1600
+ proto.gateway.parallax.v1.CreateTraceRequest.prototype.hasTxHashHint = function() {
1601
+ return jspb.Message.getField(this, 5) != null;
3927
1602
  };
3928
1603
 
3929
1604
 
@@ -3943,8 +1618,8 @@ function requireParallax_gateway_pb () {
3943
1618
  * http://goto/soy-param-migration
3944
1619
  * @return {!Object}
3945
1620
  */
3946
- proto.gateway.parallax.v1.AddSpanHintResponse.prototype.toObject = function(opt_includeInstance) {
3947
- return proto.gateway.parallax.v1.AddSpanHintResponse.toObject(opt_includeInstance, this);
1621
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.toObject = function(opt_includeInstance) {
1622
+ return proto.gateway.parallax.v1.CreateTraceResponse.toObject(opt_includeInstance, this);
3948
1623
  };
3949
1624
 
3950
1625
 
@@ -3953,13 +1628,14 @@ function requireParallax_gateway_pb () {
3953
1628
  * @param {boolean|undefined} includeInstance Deprecated. Whether to include
3954
1629
  * the JSPB instance for transitional soy proto support:
3955
1630
  * http://goto/soy-param-migration
3956
- * @param {!proto.gateway.parallax.v1.AddSpanHintResponse} msg The msg instance to transform.
1631
+ * @param {!proto.gateway.parallax.v1.CreateTraceResponse} msg The msg instance to transform.
3957
1632
  * @return {!Object}
3958
1633
  * @suppress {unusedLocalVariables} f is only used for nested messages
3959
1634
  */
3960
- proto.gateway.parallax.v1.AddSpanHintResponse.toObject = function(includeInstance, msg) {
1635
+ proto.gateway.parallax.v1.CreateTraceResponse.toObject = function(includeInstance, msg) {
3961
1636
  var f, obj = {
3962
- status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f)
1637
+ status: (f = msg.getStatus()) && proto_common_v1_status_pb.ResponseStatus.toObject(includeInstance, f),
1638
+ traceId: jspb.Message.getFieldWithDefault(msg, 2, "")
3963
1639
  };
3964
1640
 
3965
1641
  if (includeInstance) {
@@ -3973,23 +1649,23 @@ function requireParallax_gateway_pb () {
3973
1649
  /**
3974
1650
  * Deserializes binary data (in protobuf wire format).
3975
1651
  * @param {jspb.ByteSource} bytes The bytes to deserialize.
3976
- * @return {!proto.gateway.parallax.v1.AddSpanHintResponse}
1652
+ * @return {!proto.gateway.parallax.v1.CreateTraceResponse}
3977
1653
  */
3978
- proto.gateway.parallax.v1.AddSpanHintResponse.deserializeBinary = function(bytes) {
1654
+ proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinary = function(bytes) {
3979
1655
  var reader = new jspb.BinaryReader(bytes);
3980
- var msg = new proto.gateway.parallax.v1.AddSpanHintResponse;
3981
- return proto.gateway.parallax.v1.AddSpanHintResponse.deserializeBinaryFromReader(msg, reader);
1656
+ var msg = new proto.gateway.parallax.v1.CreateTraceResponse;
1657
+ return proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinaryFromReader(msg, reader);
3982
1658
  };
3983
1659
 
3984
1660
 
3985
1661
  /**
3986
1662
  * Deserializes binary data (in protobuf wire format) from the
3987
1663
  * given reader into the given message object.
3988
- * @param {!proto.gateway.parallax.v1.AddSpanHintResponse} msg The message object to deserialize into.
1664
+ * @param {!proto.gateway.parallax.v1.CreateTraceResponse} msg The message object to deserialize into.
3989
1665
  * @param {!jspb.BinaryReader} reader The BinaryReader to use.
3990
- * @return {!proto.gateway.parallax.v1.AddSpanHintResponse}
1666
+ * @return {!proto.gateway.parallax.v1.CreateTraceResponse}
3991
1667
  */
3992
- proto.gateway.parallax.v1.AddSpanHintResponse.deserializeBinaryFromReader = function(msg, reader) {
1668
+ proto.gateway.parallax.v1.CreateTraceResponse.deserializeBinaryFromReader = function(msg, reader) {
3993
1669
  while (reader.nextField()) {
3994
1670
  if (reader.isEndGroup()) {
3995
1671
  break;
@@ -4001,6 +1677,10 @@ function requireParallax_gateway_pb () {
4001
1677
  reader.readMessage(value,proto_common_v1_status_pb.ResponseStatus.deserializeBinaryFromReader);
4002
1678
  msg.setStatus(value);
4003
1679
  break;
1680
+ case 2:
1681
+ var value = /** @type {string} */ (reader.readString());
1682
+ msg.setTraceId(value);
1683
+ break;
4004
1684
  default:
4005
1685
  reader.skipField();
4006
1686
  break;
@@ -4014,9 +1694,9 @@ function requireParallax_gateway_pb () {
4014
1694
  * Serializes the message to binary data (in protobuf wire format).
4015
1695
  * @return {!Uint8Array}
4016
1696
  */
4017
- proto.gateway.parallax.v1.AddSpanHintResponse.prototype.serializeBinary = function() {
1697
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.serializeBinary = function() {
4018
1698
  var writer = new jspb.BinaryWriter();
4019
- proto.gateway.parallax.v1.AddSpanHintResponse.serializeBinaryToWriter(this, writer);
1699
+ proto.gateway.parallax.v1.CreateTraceResponse.serializeBinaryToWriter(this, writer);
4020
1700
  return writer.getResultBuffer();
4021
1701
  };
4022
1702
 
@@ -4024,11 +1704,11 @@ function requireParallax_gateway_pb () {
4024
1704
  /**
4025
1705
  * Serializes the given message to binary data (in protobuf wire
4026
1706
  * format), writing to the given BinaryWriter.
4027
- * @param {!proto.gateway.parallax.v1.AddSpanHintResponse} message
1707
+ * @param {!proto.gateway.parallax.v1.CreateTraceResponse} message
4028
1708
  * @param {!jspb.BinaryWriter} writer
4029
1709
  * @suppress {unusedLocalVariables} f is only used for nested messages
4030
1710
  */
4031
- proto.gateway.parallax.v1.AddSpanHintResponse.serializeBinaryToWriter = function(message, writer) {
1711
+ proto.gateway.parallax.v1.CreateTraceResponse.serializeBinaryToWriter = function(message, writer) {
4032
1712
  var f = undefined;
4033
1713
  f = message.getStatus();
4034
1714
  if (f != null) {
@@ -4038,6 +1718,13 @@ function requireParallax_gateway_pb () {
4038
1718
  proto_common_v1_status_pb.ResponseStatus.serializeBinaryToWriter
4039
1719
  );
4040
1720
  }
1721
+ f = message.getTraceId();
1722
+ if (f.length > 0) {
1723
+ writer.writeString(
1724
+ 2,
1725
+ f
1726
+ );
1727
+ }
4041
1728
  };
4042
1729
 
4043
1730
 
@@ -4045,7 +1732,7 @@ function requireParallax_gateway_pb () {
4045
1732
  * optional common.v1.ResponseStatus status = 1;
4046
1733
  * @return {?proto.common.v1.ResponseStatus}
4047
1734
  */
4048
- proto.gateway.parallax.v1.AddSpanHintResponse.prototype.getStatus = function() {
1735
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.getStatus = function() {
4049
1736
  return /** @type{?proto.common.v1.ResponseStatus} */ (
4050
1737
  jspb.Message.getWrapperField(this, proto_common_v1_status_pb.ResponseStatus, 1));
4051
1738
  };
@@ -4053,18 +1740,18 @@ function requireParallax_gateway_pb () {
4053
1740
 
4054
1741
  /**
4055
1742
  * @param {?proto.common.v1.ResponseStatus|undefined} value
4056
- * @return {!proto.gateway.parallax.v1.AddSpanHintResponse} returns this
1743
+ * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
4057
1744
  */
4058
- proto.gateway.parallax.v1.AddSpanHintResponse.prototype.setStatus = function(value) {
1745
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.setStatus = function(value) {
4059
1746
  return jspb.Message.setWrapperField(this, 1, value);
4060
1747
  };
4061
1748
 
4062
1749
 
4063
1750
  /**
4064
1751
  * Clears the message field making it undefined.
4065
- * @return {!proto.gateway.parallax.v1.AddSpanHintResponse} returns this
1752
+ * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
4066
1753
  */
4067
- proto.gateway.parallax.v1.AddSpanHintResponse.prototype.clearStatus = function() {
1754
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.clearStatus = function() {
4068
1755
  return this.setStatus(undefined);
4069
1756
  };
4070
1757
 
@@ -4073,11 +1760,29 @@ function requireParallax_gateway_pb () {
4073
1760
  * Returns whether this field is set.
4074
1761
  * @return {boolean}
4075
1762
  */
4076
- proto.gateway.parallax.v1.AddSpanHintResponse.prototype.hasStatus = function() {
1763
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.hasStatus = function() {
4077
1764
  return jspb.Message.getField(this, 1) != null;
4078
1765
  };
4079
1766
 
4080
1767
 
1768
+ /**
1769
+ * optional string trace_id = 2;
1770
+ * @return {string}
1771
+ */
1772
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.getTraceId = function() {
1773
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, ""));
1774
+ };
1775
+
1776
+
1777
+ /**
1778
+ * @param {string} value
1779
+ * @return {!proto.gateway.parallax.v1.CreateTraceResponse} returns this
1780
+ */
1781
+ proto.gateway.parallax.v1.CreateTraceResponse.prototype.setTraceId = function(value) {
1782
+ return jspb.Message.setProto3StringField(this, 2, value);
1783
+ };
1784
+
1785
+
4081
1786
  goog.object.extend(exports$1, proto.gateway.parallax.v1);
4082
1787
  } (parallax_gateway_pb));
4083
1788
  return parallax_gateway_pb;
@@ -4192,46 +1897,6 @@ class ParallaxGatewayServiceClient {
4192
1897
  return request.serializeBinary();
4193
1898
  }, parallax_gateway_pbExports.CreateTraceResponse.deserializeBinary)
4194
1899
  });
4195
- Object.defineProperty(this, "methodDescriptorStartSpan", {
4196
- enumerable: true,
4197
- configurable: true,
4198
- writable: true,
4199
- value: new grpcWebExports.MethodDescriptor('/gateway.parallax.v1.ParallaxGatewayService/StartSpan', grpcWebExports.MethodType.UNARY, parallax_gateway_pbExports.StartSpanRequest, parallax_gateway_pbExports.StartSpanResponse, (request) => {
4200
- return request.serializeBinary();
4201
- }, parallax_gateway_pbExports.StartSpanResponse.deserializeBinary)
4202
- });
4203
- Object.defineProperty(this, "methodDescriptorFinishSpan", {
4204
- enumerable: true,
4205
- configurable: true,
4206
- writable: true,
4207
- value: new grpcWebExports.MethodDescriptor('/gateway.parallax.v1.ParallaxGatewayService/FinishSpan', grpcWebExports.MethodType.UNARY, parallax_gateway_pbExports.FinishSpanRequest, parallax_gateway_pbExports.FinishSpanResponse, (request) => {
4208
- return request.serializeBinary();
4209
- }, parallax_gateway_pbExports.FinishSpanResponse.deserializeBinary)
4210
- });
4211
- Object.defineProperty(this, "methodDescriptorAddSpanEvent", {
4212
- enumerable: true,
4213
- configurable: true,
4214
- writable: true,
4215
- value: new grpcWebExports.MethodDescriptor('/gateway.parallax.v1.ParallaxGatewayService/AddSpanEvent', grpcWebExports.MethodType.UNARY, parallax_gateway_pbExports.AddSpanEventRequest, parallax_gateway_pbExports.AddSpanEventResponse, (request) => {
4216
- return request.serializeBinary();
4217
- }, parallax_gateway_pbExports.AddSpanEventResponse.deserializeBinary)
4218
- });
4219
- Object.defineProperty(this, "methodDescriptorAddSpanError", {
4220
- enumerable: true,
4221
- configurable: true,
4222
- writable: true,
4223
- value: new grpcWebExports.MethodDescriptor('/gateway.parallax.v1.ParallaxGatewayService/AddSpanError', grpcWebExports.MethodType.UNARY, parallax_gateway_pbExports.AddSpanErrorRequest, parallax_gateway_pbExports.AddSpanErrorResponse, (request) => {
4224
- return request.serializeBinary();
4225
- }, parallax_gateway_pbExports.AddSpanErrorResponse.deserializeBinary)
4226
- });
4227
- Object.defineProperty(this, "methodDescriptorAddSpanHint", {
4228
- enumerable: true,
4229
- configurable: true,
4230
- writable: true,
4231
- value: new grpcWebExports.MethodDescriptor('/gateway.parallax.v1.ParallaxGatewayService/AddSpanHint', grpcWebExports.MethodType.UNARY, parallax_gateway_pbExports.AddSpanHintRequest, parallax_gateway_pbExports.AddSpanHintResponse, (request) => {
4232
- return request.serializeBinary();
4233
- }, parallax_gateway_pbExports.AddSpanHintResponse.deserializeBinary)
4234
- });
4235
1900
  if (!options)
4236
1901
  options = {};
4237
1902
  if (!credentials)
@@ -4250,50 +1915,12 @@ class ParallaxGatewayServiceClient {
4250
1915
  return this.client_.unaryCall(this.hostname_ +
4251
1916
  '/gateway.parallax.v1.ParallaxGatewayService/CreateTrace', request, metadata || {}, this.methodDescriptorCreateTrace);
4252
1917
  }
4253
- startSpan(request, metadata, callback) {
4254
- if (callback !== undefined) {
4255
- return this.client_.rpcCall(this.hostname_ +
4256
- '/gateway.parallax.v1.ParallaxGatewayService/StartSpan', request, metadata || {}, this.methodDescriptorStartSpan, callback);
4257
- }
4258
- return this.client_.unaryCall(this.hostname_ +
4259
- '/gateway.parallax.v1.ParallaxGatewayService/StartSpan', request, metadata || {}, this.methodDescriptorStartSpan);
4260
- }
4261
- finishSpan(request, metadata, callback) {
4262
- if (callback !== undefined) {
4263
- return this.client_.rpcCall(this.hostname_ +
4264
- '/gateway.parallax.v1.ParallaxGatewayService/FinishSpan', request, metadata || {}, this.methodDescriptorFinishSpan, callback);
4265
- }
4266
- return this.client_.unaryCall(this.hostname_ +
4267
- '/gateway.parallax.v1.ParallaxGatewayService/FinishSpan', request, metadata || {}, this.methodDescriptorFinishSpan);
4268
- }
4269
- addSpanEvent(request, metadata, callback) {
4270
- if (callback !== undefined) {
4271
- return this.client_.rpcCall(this.hostname_ +
4272
- '/gateway.parallax.v1.ParallaxGatewayService/AddSpanEvent', request, metadata || {}, this.methodDescriptorAddSpanEvent, callback);
4273
- }
4274
- return this.client_.unaryCall(this.hostname_ +
4275
- '/gateway.parallax.v1.ParallaxGatewayService/AddSpanEvent', request, metadata || {}, this.methodDescriptorAddSpanEvent);
4276
- }
4277
- addSpanError(request, metadata, callback) {
4278
- if (callback !== undefined) {
4279
- return this.client_.rpcCall(this.hostname_ +
4280
- '/gateway.parallax.v1.ParallaxGatewayService/AddSpanError', request, metadata || {}, this.methodDescriptorAddSpanError, callback);
4281
- }
4282
- return this.client_.unaryCall(this.hostname_ +
4283
- '/gateway.parallax.v1.ParallaxGatewayService/AddSpanError', request, metadata || {}, this.methodDescriptorAddSpanError);
4284
- }
4285
- addSpanHint(request, metadata, callback) {
4286
- if (callback !== undefined) {
4287
- return this.client_.rpcCall(this.hostname_ +
4288
- '/gateway.parallax.v1.ParallaxGatewayService/AddSpanHint', request, metadata || {}, this.methodDescriptorAddSpanHint, callback);
4289
- }
4290
- return this.client_.unaryCall(this.hostname_ +
4291
- '/gateway.parallax.v1.ParallaxGatewayService/AddSpanHint', request, metadata || {}, this.methodDescriptorAddSpanHint);
4292
- }
4293
1918
  }
4294
1919
 
1920
+ var timestamp_pbExports = requireTimestamp_pb();
1921
+
4295
1922
  // Parallax SDK Web Client
4296
- const GRPC_GATEWAY_API_URL = "https://gateway-parallax-dev.platform.svc.cluster.local:50053";
1923
+ const GRPC_GATEWAY_API_URL = "https://parallax-gateway.dev.mirador.org:443";
4297
1924
  const debugIssue = (trace, error) => {
4298
1925
  // Handle our own debugging / logging here
4299
1926
  console.error(`[ParallaxClient][${trace}] Error:`, error);
@@ -4466,182 +2093,206 @@ class ParallaxClient {
4466
2093
  }
4467
2094
  }
4468
2095
  /**
4469
- * Create a StartSpanRequest with optional attributes and client metadata
4470
- * @param traceId trace id to associate the span with
4471
- * @param name name of the span
4472
- * @param parentSpanId (optional) create a span off a parent span id
4473
- * @param attr (optional) attributes to add to the span
4474
- * @param includeClientMeta (optional) flag to include client metadata (ip, browser, os, etc)
4475
- * @returns
4476
- */
4477
- async createStartSpanRequest({ traceId, name, parentSpanId, attr, includeClientMeta = false }) {
4478
- const startSpanReq = new parallax_gateway_pbExports.StartSpanRequest();
4479
- startSpanReq.setTraceId(traceId);
4480
- startSpanReq.setName(name);
4481
- if (parentSpanId) {
4482
- startSpanReq.setParentSpanId(parentSpanId);
4483
- }
4484
- const spanAttrs = startSpanReq.getAttributesMap();
4485
- if (attr) {
4486
- Object.entries(attr).forEach(([key, value]) => {
4487
- if (key.includes('client.')) {
4488
- console.warn(`Attribute key "${key}" is reserved for client metadata. It will be prefixed with "custom."`);
4489
- }
4490
- else {
4491
- spanAttrs.set(key, typeof value === 'object' ? JSON.stringify(value) : String(value));
4492
- }
4493
- });
4494
- }
4495
- try {
4496
- if (includeClientMeta) {
4497
- const clientMetadata = await this.getClientMetadata();
4498
- Object.entries(clientMetadata).forEach(([key, value]) => {
4499
- spanAttrs.set(`client.${key}`, value);
4500
- });
4501
- }
4502
- }
4503
- catch (error) {
4504
- console.error('Error gathering client metadata for span:', error);
4505
- }
4506
- return startSpanReq;
4507
- }
4508
- /**
4509
- * Start a new span within a trace
4510
- * @param params Parameters to start a new span
2096
+ * Create a new trace builder
2097
+ *
2098
+ * Example usage:
2099
+ * ```typescript
2100
+ * const response = await client.trace("swap_execution")
2101
+ * .addAttribute("user", "0xabc...")
2102
+ * .addAttribute("slippage_bps", 25)
2103
+ * .addTag("dex")
2104
+ * .addTag("swap")
2105
+ * .addEvent("wallet_connected", { wallet: "MetaMask" })
2106
+ * .addEvent("quote_received")
2107
+ * .submit("0x123...", "ethereum");
2108
+ * ```
2109
+ *
2110
+ * @param name The name of the trace
2111
+ * @param includeClientMeta Optional flag to automatically include client metadata
2112
+ * @returns A ParallaxTrace builder instance
4511
2113
  */
4512
- async startSpan(params) {
4513
- try {
4514
- return await this.client.startSpan(params, null);
4515
- }
4516
- catch (_error) {
4517
- debugIssue("startSpan", new Error('Error starting span'));
4518
- throw _error;
4519
- }
2114
+ trace(name, includeClientMeta = false) {
2115
+ return new ParallaxTrace(this, name, includeClientMeta);
4520
2116
  }
4521
- /**
4522
- * Create a FinishSpanRequest
4523
- * @param params Parameters to finish a span - traceId, spanId, status (optional) (success, errorMessage)
4524
- * @returns FinishSpanRequest
4525
- */
4526
- createFinishSpanRequest({ traceId, spanId, status }) {
4527
- const request = new parallax_gateway_pbExports.FinishSpanRequest();
4528
- request.setTraceId(traceId);
4529
- request.setSpanId(spanId);
4530
- if (status !== undefined) {
4531
- const spanStatus = new parallax_gateway_pbExports.FinishSpanRequest.SpanStatus();
4532
- spanStatus.setCode(status.success ? parallax_gateway_pbExports.FinishSpanRequest.SpanStatus.StatusCode.STATUS_CODE_OK : parallax_gateway_pbExports.FinishSpanRequest.SpanStatus.StatusCode.STATUS_CODE_ERROR);
4533
- if (status.errorMessage) {
4534
- spanStatus.setMessage(status.errorMessage);
4535
- }
4536
- request.setStatus(spanStatus);
4537
- }
4538
- return request;
2117
+ }
2118
+ /**
2119
+ * Builder class for constructing traces with method chaining
2120
+ * Automatically handles web-specific features like client metadata
2121
+ */
2122
+ class ParallaxTrace {
2123
+ constructor(client, name, includeClientMeta = false) {
2124
+ Object.defineProperty(this, "name", {
2125
+ enumerable: true,
2126
+ configurable: true,
2127
+ writable: true,
2128
+ value: void 0
2129
+ });
2130
+ Object.defineProperty(this, "attributes", {
2131
+ enumerable: true,
2132
+ configurable: true,
2133
+ writable: true,
2134
+ value: {}
2135
+ });
2136
+ Object.defineProperty(this, "tags", {
2137
+ enumerable: true,
2138
+ configurable: true,
2139
+ writable: true,
2140
+ value: []
2141
+ });
2142
+ Object.defineProperty(this, "events", {
2143
+ enumerable: true,
2144
+ configurable: true,
2145
+ writable: true,
2146
+ value: []
2147
+ });
2148
+ Object.defineProperty(this, "txHashHint", {
2149
+ enumerable: true,
2150
+ configurable: true,
2151
+ writable: true,
2152
+ value: void 0
2153
+ });
2154
+ Object.defineProperty(this, "client", {
2155
+ enumerable: true,
2156
+ configurable: true,
2157
+ writable: true,
2158
+ value: void 0
2159
+ });
2160
+ Object.defineProperty(this, "includeClientMeta", {
2161
+ enumerable: true,
2162
+ configurable: true,
2163
+ writable: true,
2164
+ value: void 0
2165
+ });
2166
+ this.client = client;
2167
+ this.name = name;
2168
+ this.includeClientMeta = includeClientMeta;
4539
2169
  }
4540
2170
  /**
4541
- * Finish a span within a trace
4542
- * @param params Parameters to finish a span
2171
+ * Add an attribute to the trace
2172
+ * @param key Attribute key
2173
+ * @param value Attribute value (will be converted to string)
2174
+ * @returns This trace builder for chaining
4543
2175
  */
4544
- async finishSpan(params) {
4545
- try {
4546
- return await this.client.finishSpan(params, null);
4547
- }
4548
- catch (_error) {
4549
- debugIssue("finishSpan", new Error('Error finishing span'));
4550
- throw _error;
4551
- }
2176
+ addAttribute(key, value) {
2177
+ this.attributes[key] = String(value);
2178
+ return this;
4552
2179
  }
4553
2180
  /**
4554
- * Creates the add span event request
4555
- * @param params - Parameters to create an AddSpanEventRequest - traceId, spanId, eventName, attr (optional)
4556
- * @returns AddSpanEventRequest
2181
+ * Add multiple attributes to the trace
2182
+ * @param attributes Object containing key-value pairs
2183
+ * @returns This trace builder for chaining
4557
2184
  */
4558
- createAddSpanEventRequest({ traceId, spanId, eventName, attr }) {
4559
- const request = new parallax_gateway_pbExports.AddSpanEventRequest();
4560
- request.setTraceId(traceId);
4561
- request.setSpanId(spanId);
4562
- request.setEventName(eventName);
4563
- const eventAttrs = request.getAttributesMap();
4564
- if (attr) {
4565
- Object.entries(attr).forEach(([key, value]) => {
4566
- eventAttrs.set(key, typeof value === 'object' ? JSON.stringify(value) : String(value));
4567
- });
2185
+ addAttributes(attributes) {
2186
+ for (const [key, value] of Object.entries(attributes)) {
2187
+ this.attributes[key] = String(value);
4568
2188
  }
4569
- eventAttrs.set('timestamp', new Date().toISOString());
4570
- return request;
2189
+ return this;
4571
2190
  }
4572
2191
  /**
4573
- * Add an event to a span
4574
- * @param params Parameters to add an event to a span
2192
+ * Add a tag to the trace
2193
+ * @param tag Tag to add
2194
+ * @returns This trace builder for chaining
4575
2195
  */
4576
- async addSpanEvent(params) {
4577
- try {
4578
- return await this.client.addSpanEvent(params, null);
4579
- }
4580
- catch (_error) {
4581
- debugIssue("addSpanEvent", new Error('Error adding span event'));
4582
- throw _error;
4583
- }
2196
+ addTag(tag) {
2197
+ this.tags.push(tag);
2198
+ return this;
4584
2199
  }
4585
2200
  /**
4586
- * Creates the add span error request
4587
- * @param params - params used to generate the error request ( traceid, span id, error message, error type, stack trace)
4588
- * @returns AddSpanErrorRequest
2201
+ * Add multiple tags to the trace
2202
+ * @param tags Array of tags to add
2203
+ * @returns This trace builder for chaining
4589
2204
  */
4590
- createAddSpanErrorRequest({ traceId, spanId, errorMessage, errorType, stackTrace }) {
4591
- const request = new parallax_gateway_pbExports.AddSpanErrorRequest();
4592
- request.setTraceId(traceId);
4593
- request.setSpanId(spanId);
4594
- request.setMessage(errorMessage);
4595
- if (errorType) {
4596
- request.setErrorType(errorType);
4597
- }
4598
- if (stackTrace) {
4599
- request.setStackTrace(stackTrace);
4600
- }
4601
- return request;
2205
+ addTags(tags) {
2206
+ this.tags.push(...tags);
2207
+ return this;
4602
2208
  }
4603
2209
  /**
4604
- * Add an error to a span
4605
- * @param params Parameters to add an error to a span
2210
+ * Add an event to the trace
2211
+ * @param eventName Name of the event
2212
+ * @param details Optional details (can be a JSON string or object that will be stringified)
2213
+ * @param timestamp Optional timestamp (defaults to current time)
2214
+ * @returns This trace builder for chaining
4606
2215
  */
4607
- async addSpanError(params) {
4608
- try {
4609
- return await this.client.addSpanError(params, null);
4610
- }
4611
- catch (_error) {
4612
- debugIssue("addSpanError", new Error('Error adding span error'));
4613
- throw _error;
4614
- }
2216
+ addEvent(eventName, details, timestamp) {
2217
+ const detailsString = typeof details === 'object' && details !== null
2218
+ ? JSON.stringify(details)
2219
+ : details;
2220
+ this.events.push({
2221
+ eventName,
2222
+ details: detailsString,
2223
+ timestamp: timestamp || new Date(),
2224
+ });
2225
+ return this;
4615
2226
  }
4616
2227
  /**
4617
- * Creates the add span hint request
4618
- * @param params - params used to generate the span hint (trace id, parentSpanId, txHash and chainId)
4619
- * @returns AddSpanHintRequest
2228
+ * Set or update the transaction hash hint
2229
+ * @param txHash Transaction hash
2230
+ * @param chainId Chain ID (e.g., "ethereum", "polygon")
2231
+ * @param details Optional details about the transaction
2232
+ * @param timestamp Optional timestamp (defaults to current time)
2233
+ * @returns This trace builder for chaining
4620
2234
  */
4621
- createAddSpanHintRequest({ traceId, parentSpanId, txHash, chainId }) {
4622
- const hintReq = new parallax_gateway_pbExports.AddSpanHintRequest();
4623
- hintReq.setTraceId(traceId);
4624
- hintReq.setParentSpanId(parentSpanId);
4625
- if (txHash && chainId !== undefined) {
4626
- const chainTxReq = new parallax_gateway_pbExports.AddSpanHintRequest.ChainTransaction();
4627
- chainTxReq.setTxHash(txHash);
4628
- chainTxReq.setChainId(chainId);
4629
- hintReq.setChainTransaction(chainTxReq);
4630
- }
4631
- return hintReq;
2235
+ setTxHash(txHash, chainId, details, timestamp) {
2236
+ this.txHashHint = {
2237
+ txHash,
2238
+ chainId,
2239
+ details,
2240
+ timestamp: timestamp || new Date(),
2241
+ };
2242
+ return this;
4632
2243
  }
4633
- /**
4634
- * Add a hint to a span
4635
- * @param params Parameters to add a hint to a span
4636
- */
4637
- async addSpanHint(params) {
4638
- try {
4639
- return await this.client.addSpanHint(params, null);
2244
+ async submit(txHash, chainId, details) {
2245
+ // If txHash and chainId are provided in submit(), they override any previously set txHashHint
2246
+ const finalTxHashHint = txHash && chainId ? {
2247
+ txHash,
2248
+ chainId,
2249
+ details,
2250
+ timestamp: new Date(),
2251
+ } : this.txHashHint;
2252
+ // Build the CreateTraceRequest
2253
+ const request = new parallax_gateway_pbExports.CreateTraceRequest();
2254
+ request.setName(this.name);
2255
+ request.setTagsList(this.tags);
2256
+ // Add attributes
2257
+ const attrsMap = request.getAttributesMap();
2258
+ for (const [key, value] of Object.entries(this.attributes)) {
2259
+ attrsMap.set(key, value);
2260
+ }
2261
+ // Add client metadata if requested
2262
+ if (this.includeClientMeta) {
2263
+ const clientMetadata = await this.client.getClientMetadata();
2264
+ for (const [key, value] of Object.entries(clientMetadata)) {
2265
+ attrsMap.set(`client.${key}`, value);
2266
+ }
4640
2267
  }
4641
- catch (_error) {
4642
- debugIssue("addSpanHint", new Error('Error adding span hint'));
4643
- throw _error;
2268
+ // Add events
2269
+ const eventsList = [];
2270
+ for (const event of this.events) {
2271
+ const eventMsg = new parallax_gateway_pbExports.CreateTraceRequest.Event();
2272
+ eventMsg.setEventName(event.eventName);
2273
+ if (event.details) {
2274
+ eventMsg.setDetails(event.details);
2275
+ }
2276
+ const timestamp = new timestamp_pbExports.Timestamp();
2277
+ timestamp.fromDate(event.timestamp);
2278
+ eventMsg.setTimestamp(timestamp);
2279
+ eventsList.push(eventMsg);
2280
+ }
2281
+ request.setEventsList(eventsList);
2282
+ // Add transaction hash hint if present
2283
+ if (finalTxHashHint) {
2284
+ const txHint = new parallax_gateway_pbExports.CreateTraceRequest.TxHashHint();
2285
+ txHint.setTxHash(finalTxHashHint.txHash);
2286
+ txHint.setChainId(finalTxHashHint.chainId);
2287
+ if (finalTxHashHint.details) {
2288
+ txHint.setDetails(finalTxHashHint.details);
2289
+ }
2290
+ const timestamp = new timestamp_pbExports.Timestamp();
2291
+ timestamp.fromDate(finalTxHashHint.timestamp);
2292
+ txHint.setTimestamp(timestamp);
2293
+ request.setTxHashHint(txHint);
4644
2294
  }
2295
+ return this.client.createTrace(request);
4645
2296
  }
4646
2297
  }
4647
2298
 
@@ -4799,8 +2450,7 @@ class ParallaxService {
4799
2450
  * Start a new transaction trace
4800
2451
  * Called when user initiates a transaction
4801
2452
  *
4802
- * Note: Since createTrace now automatically creates a root span, we don't need
4803
- * to call startSpan separately. The rootSpanId from the response is the parent span.
2453
+ * Uses the builder pattern to create a trace with events
4804
2454
  *
4805
2455
  * @param txData - Transaction data
4806
2456
  * @param name - Name for the trace (e.g., 'SendingTrace', 'SwappingTrace')
@@ -4814,39 +2464,37 @@ class ParallaxService {
4814
2464
  }
4815
2465
  try {
4816
2466
  const txId = `tx_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`;
4817
- const timestamp = new Date().toISOString();
4818
- // Create trace attributes
4819
- const traceAttributes = {
4820
- transactionId: txId,
4821
- walletAddress: txData.walletAddress || txData.from,
4822
- network: txData.network || 'Unknown',
4823
- transactionStart: timestamp,
2467
+ const timestamp = new Date();
2468
+ // Build the trace using the builder pattern
2469
+ const builder = this.client
2470
+ .trace(name, options?.includeClientMeta ?? true)
2471
+ .addAttribute('transactionId', txId)
2472
+ .addAttribute('walletAddress', txData.walletAddress || txData.from)
2473
+ .addAttribute('network', txData.network || 'Unknown')
2474
+ .addAttribute('transactionStart', timestamp.toISOString())
2475
+ .addAttribute('from', txData.from)
2476
+ .addAttribute('to', txData.to)
2477
+ .addAttribute('value', txData.value)
2478
+ .addTags(['transaction', 'wallet', txData.network || 'unknown'])
2479
+ .addEvent('transaction_initiated', {
4824
2480
  from: txData.from,
4825
2481
  to: txData.to,
4826
2482
  value: txData.value,
4827
- };
4828
- // Add any additional transaction data
2483
+ timestamp: timestamp.toISOString(),
2484
+ });
2485
+ // Add any additional transaction data as attributes
4829
2486
  if (txData.additionalData) {
4830
2487
  Object.entries(txData.additionalData).forEach(([key, value]) => {
4831
- traceAttributes[key] = typeof value === 'object' ? JSON.stringify(value) : String(value);
2488
+ builder.addAttribute(key, typeof value === 'object' ? JSON.stringify(value) : String(value));
4832
2489
  });
4833
2490
  }
4834
- // Create a trace for this transaction
4835
- const createTraceReq = await this.client.createTraceRequest({
4836
- name: name,
4837
- attr: traceAttributes,
4838
- tags: ['transaction', 'wallet', txData.network || 'unknown'],
4839
- includeClientMeta: options?.includeClientMeta ?? true,
4840
- });
4841
- const traceResponse = await this.client.createTrace(createTraceReq);
2491
+ // Submit the trace
2492
+ const traceResponse = await builder.submit();
4842
2493
  const traceId = traceResponse.getTraceId();
4843
- const rootSpanId = traceResponse.getRootSpanId();
4844
2494
  // Store transaction info
4845
2495
  this.activeTransactions.set(txId, {
4846
2496
  traceId,
4847
- rootSpanId,
4848
- spanId: rootSpanId, // Use rootSpanId as the main span for this transaction
4849
- timestamp,
2497
+ timestamp: timestamp.toISOString(),
4850
2498
  txHash: null,
4851
2499
  from: txData.from,
4852
2500
  to: txData.to,
@@ -4855,18 +2503,10 @@ class ParallaxService {
4855
2503
  console.log('[ParallaxService] Transaction trace started:', {
4856
2504
  txId,
4857
2505
  traceId,
4858
- rootSpanId,
4859
2506
  from: txData.from,
4860
2507
  to: txData.to,
4861
2508
  });
4862
- // Add initial event to the root span
4863
- await this.addTransactionEvent(txId, 'transaction_initiated', {
4864
- from: txData.from,
4865
- to: txData.to,
4866
- value: txData.value,
4867
- timestamp,
4868
- });
4869
- return { traceId, rootSpanId, txId };
2509
+ return { traceId, rootSpanId: traceId, txId };
4870
2510
  }
4871
2511
  catch (error) {
4872
2512
  console.error('[ParallaxService] Failed to start transaction trace:', error);
@@ -4877,9 +2517,13 @@ class ParallaxService {
4877
2517
  * Associate a transaction hash with an existing trace
4878
2518
  * Called when the transaction hash is available after signing/sending
4879
2519
  *
2520
+ * NOTE: This method is deprecated as the new API does not support adding hints to existing traces.
2521
+ * Transaction hashes should be provided at trace creation time via the builder's submit(txHash, chainId) method.
2522
+ *
4880
2523
  * @param txId - Transaction identifier returned from startTransactionTrace
4881
2524
  * @param txHash - Blockchain transaction hash
4882
2525
  * @param chainId - Chain ID
2526
+ * @deprecated Use submit(txHash, chainId) when creating the trace instead
4883
2527
  */
4884
2528
  async associateTransactionHash(txId, txHash, chainId) {
4885
2529
  const txInfo = this.activeTransactions.get(txId);
@@ -4887,44 +2531,26 @@ class ParallaxService {
4887
2531
  console.warn(`[ParallaxService] Transaction ${txId} not found in active transactions`);
4888
2532
  return;
4889
2533
  }
4890
- if (!this.client) {
4891
- console.warn('[ParallaxService] Client not initialized');
4892
- return;
4893
- }
4894
- try {
4895
- // Update stored tx info
4896
- txInfo.txHash = txHash;
4897
- this.activeTransactions.set(txId, txInfo);
4898
- // Add chain hint to correlate with blockchain events
4899
- const hintReq = this.client.createAddSpanHintRequest({
4900
- traceId: txInfo.traceId,
4901
- parentSpanId: txInfo.rootSpanId,
4902
- txHash: txHash,
4903
- chainId: chainId,
4904
- });
4905
- await this.client.addSpanHint(hintReq);
4906
- // Add event for transaction sent
4907
- await this.addTransactionEvent(txId, 'transaction_hash_available', {
4908
- txHash,
4909
- chainId: chainId.toString(),
4910
- timestamp: new Date().toISOString(),
4911
- });
4912
- console.log('[ParallaxService] Transaction hash associated with trace:', {
4913
- txId,
4914
- txHash,
4915
- traceId: txInfo.traceId,
4916
- });
4917
- }
4918
- catch (error) {
4919
- console.error('[ParallaxService] Failed to associate transaction hash:', error);
4920
- }
2534
+ // Update stored tx info
2535
+ txInfo.txHash = txHash;
2536
+ this.activeTransactions.set(txId, txInfo);
2537
+ console.warn('[ParallaxService] associateTransactionHash is deprecated. The new API does not support adding transaction hashes after trace creation. Please provide the txHash when creating the trace using submit(txHash, chainId).');
2538
+ console.log('[ParallaxService] Transaction hash updated in local cache:', {
2539
+ txId,
2540
+ txHash,
2541
+ traceId: txInfo.traceId,
2542
+ });
4921
2543
  }
4922
2544
  /**
4923
2545
  * Add an event to a transaction trace
4924
2546
  *
2547
+ * NOTE: This method is deprecated as the new API does not support adding events to existing traces.
2548
+ * Events should be added to the trace builder before calling submit().
2549
+ *
4925
2550
  * @param txId - Transaction identifier
4926
2551
  * @param eventName - Event name
4927
2552
  * @param attributes - Event attributes
2553
+ * @deprecated Use the trace builder's addEvent() method before calling submit() instead
4928
2554
  */
4929
2555
  async addTransactionEvent(txId, eventName, attributes = {}) {
4930
2556
  const txInfo = this.activeTransactions.get(txId);
@@ -4932,35 +2558,18 @@ class ParallaxService {
4932
2558
  console.warn(`[ParallaxService] Transaction ${txId} not found. Cannot add event '${eventName}'`);
4933
2559
  return;
4934
2560
  }
4935
- if (!this.client || !txInfo.spanId) {
4936
- console.warn('[ParallaxService] Client not initialized or span not available');
4937
- return;
4938
- }
4939
- try {
4940
- // Convert attributes to plain object with string values
4941
- const eventAttributes = {};
4942
- Object.entries(attributes).forEach(([key, value]) => {
4943
- eventAttributes[key] = typeof value === 'object' ? JSON.stringify(value) : String(value);
4944
- });
4945
- const request = this.client.createAddSpanEventRequest({
4946
- traceId: txInfo.traceId,
4947
- spanId: txInfo.spanId,
4948
- eventName: eventName,
4949
- attr: eventAttributes,
4950
- });
4951
- await this.client.addSpanEvent(request);
4952
- }
4953
- catch (error) {
4954
- console.error(`[ParallaxService] Failed to add transaction event '${eventName}':`, error);
4955
- }
2561
+ console.warn('[ParallaxService] addTransactionEvent is deprecated. The new API does not support adding events after trace creation. Events should be added using the builder pattern before calling submit().');
4956
2562
  }
4957
2563
  /**
4958
2564
  * Add an error to a transaction trace
4959
- * Creates a proper span error event in Parallax
2565
+ *
2566
+ * NOTE: This method is deprecated as the new API does not support adding errors to existing traces.
2567
+ * Errors should be added as events to the trace builder before calling submit().
4960
2568
  *
4961
2569
  * @param txId - Transaction identifier
4962
2570
  * @param error - Error object or message
4963
2571
  * @param errorType - Type/category of error (e.g., 'TransactionError', 'NetworkError', 'UserRejection')
2572
+ * @deprecated Use the trace builder's addEvent() method to add error events before calling submit() instead
4964
2573
  */
4965
2574
  async addTransactionError(txId, error, errorType = 'TransactionError') {
4966
2575
  const txInfo = this.activeTransactions.get(txId);
@@ -4968,45 +2577,17 @@ class ParallaxService {
4968
2577
  console.warn(`[ParallaxService] Transaction ${txId} not found. Cannot add error.`);
4969
2578
  return;
4970
2579
  }
4971
- if (!this.client || !txInfo.spanId) {
4972
- console.warn('[ParallaxService] Client not initialized or span not available');
4973
- return;
4974
- }
4975
- try {
4976
- // Extract error message and stack trace
4977
- let errorMessage = '';
4978
- let stackTrace;
4979
- if (error instanceof Error) {
4980
- errorMessage = error.message;
4981
- stackTrace = error.stack;
4982
- }
4983
- else {
4984
- errorMessage = String(error);
4985
- }
4986
- const request = this.client.createAddSpanErrorRequest({
4987
- traceId: txInfo.traceId,
4988
- spanId: txInfo.spanId,
4989
- errorMessage: errorMessage,
4990
- errorType: errorType,
4991
- stackTrace: stackTrace,
4992
- });
4993
- await this.client.addSpanError(request);
4994
- console.log('[ParallaxService] Transaction error added to trace:', {
4995
- txId,
4996
- errorType,
4997
- message: error instanceof Error ? error.message : String(error),
4998
- });
4999
- }
5000
- catch (err) {
5001
- console.error('[ParallaxService] Failed to add transaction error:', err);
5002
- }
2580
+ console.warn('[ParallaxService] addTransactionError is deprecated. The new API does not support adding errors after trace creation. Add error events using the builder pattern before calling submit().');
5003
2581
  }
5004
2582
  /**
5005
2583
  * Finish a transaction trace
5006
- * Called when transaction is confirmed or permanently failed
2584
+ *
2585
+ * NOTE: This method is deprecated as the new API does not support span lifecycle management.
2586
+ * Traces are completed when submit() is called on the builder.
5007
2587
  *
5008
2588
  * @param txId - Transaction identifier
5009
2589
  * @param options - Finish options (success, error message)
2590
+ * @deprecated Traces are automatically completed when submit() is called
5010
2591
  */
5011
2592
  async finishTransactionTrace(txId, options = { success: true }) {
5012
2593
  const txInfo = this.activeTransactions.get(txId);
@@ -5014,40 +2595,15 @@ class ParallaxService {
5014
2595
  console.warn(`[ParallaxService] Transaction ${txId} not found. Cannot finish.`);
5015
2596
  return;
5016
2597
  }
5017
- if (!this.client || !txInfo.spanId) {
5018
- console.warn('[ParallaxService] Client not initialized or span not available');
5019
- return;
5020
- }
5021
- try {
5022
- // Add final event
5023
- await this.addTransactionEvent(txId, options.success ? 'transaction_completed' : 'transaction_failed', {
5024
- success: options.success.toString(),
5025
- error: options.error || '',
5026
- duration: (Date.now() - new Date(txInfo.timestamp).getTime()).toString(),
5027
- timestamp: new Date().toISOString(),
5028
- });
5029
- // Finish the span
5030
- const request = this.client.createFinishSpanRequest({
5031
- traceId: txInfo.traceId,
5032
- spanId: txInfo.spanId,
5033
- status: {
5034
- success: options.success,
5035
- errorMessage: options.error || '',
5036
- },
5037
- });
5038
- await this.client.finishSpan(request);
5039
- console.log('[ParallaxService] Transaction trace finished:', {
5040
- txId,
5041
- traceId: txInfo.traceId,
5042
- success: options.success,
5043
- txHash: txInfo.txHash,
5044
- });
5045
- // Remove from active transactions
5046
- this.activeTransactions.delete(txId);
5047
- }
5048
- catch (error) {
5049
- console.error('[ParallaxService] Failed to finish transaction trace:', error);
5050
- }
2598
+ console.warn('[ParallaxService] finishTransactionTrace is deprecated. The new API does not support span lifecycle. Traces are completed when submit() is called.');
2599
+ console.log('[ParallaxService] Transaction trace marked as finished (local only):', {
2600
+ txId,
2601
+ traceId: txInfo.traceId,
2602
+ success: options.success,
2603
+ txHash: txInfo.txHash,
2604
+ });
2605
+ // Remove from active transactions
2606
+ this.activeTransactions.delete(txId);
5051
2607
  }
5052
2608
  /**
5053
2609
  * Get info about an active transaction
@@ -5085,17 +2641,7 @@ class ParallaxService {
5085
2641
  // Export singleton instance
5086
2642
  const parallaxService = new ParallaxService();
5087
2643
 
5088
- var AddSpanErrorRequest = parallax_gateway_pbExports.AddSpanErrorRequest;
5089
- var AddSpanErrorResponse = parallax_gateway_pbExports.AddSpanErrorResponse;
5090
- var AddSpanEventRequest = parallax_gateway_pbExports.AddSpanEventRequest;
5091
- var AddSpanEventResponse = parallax_gateway_pbExports.AddSpanEventResponse;
5092
- var AddSpanHintRequest = parallax_gateway_pbExports.AddSpanHintRequest;
5093
- var AddSpanHintResponse = parallax_gateway_pbExports.AddSpanHintResponse;
5094
2644
  var CreateTraceRequest = parallax_gateway_pbExports.CreateTraceRequest;
5095
2645
  var CreateTraceResponse = parallax_gateway_pbExports.CreateTraceResponse;
5096
- var FinishSpanRequest = parallax_gateway_pbExports.FinishSpanRequest;
5097
- var FinishSpanResponse = parallax_gateway_pbExports.FinishSpanResponse;
5098
- var StartSpanRequest = parallax_gateway_pbExports.StartSpanRequest;
5099
- var StartSpanResponse = parallax_gateway_pbExports.StartSpanResponse;
5100
- export { AddSpanErrorRequest, AddSpanErrorResponse, AddSpanEventRequest, AddSpanEventResponse, AddSpanHintRequest, AddSpanHintResponse, CreateTraceRequest, CreateTraceResponse, FinishSpanRequest, FinishSpanResponse, GrpcWebRpc, ParallaxClient, ParallaxService, StartSpanRequest, StartSpanResponse, parallaxService };
2646
+ export { CreateTraceRequest, CreateTraceResponse, GrpcWebRpc, ParallaxClient, ParallaxService, ParallaxTrace, parallaxService };
5101
2647
  //# sourceMappingURL=index.esm.js.map