@miradorlabs/web-grpc 2.10.0 → 2.12.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@miradorlabs/web-grpc",
3
- "version": "2.10.0",
3
+ "version": "2.12.0",
4
4
  "description": "Generated gRPC (grpc-js) client stubs for the Mirador web gateway.",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -12,6 +12,43 @@ import { ResponseStatus } from "../../common/v1/status";
12
12
 
13
13
  export const protobufPackage = "gateway.web.v1";
14
14
 
15
+ /**
16
+ * The signal a definition derives from. Log and metric sources are planned and will be added as
17
+ * new values; unset reads as TRACE.
18
+ */
19
+ export enum DerivedMetricSource {
20
+ DERIVED_METRIC_SOURCE_UNSPECIFIED = 0,
21
+ DERIVED_METRIC_SOURCE_TRACE = 1,
22
+ UNRECOGNIZED = -1,
23
+ }
24
+
25
+ export function derivedMetricSourceFromJSON(object: any): DerivedMetricSource {
26
+ switch (object) {
27
+ case 0:
28
+ case "DERIVED_METRIC_SOURCE_UNSPECIFIED":
29
+ return DerivedMetricSource.DERIVED_METRIC_SOURCE_UNSPECIFIED;
30
+ case 1:
31
+ case "DERIVED_METRIC_SOURCE_TRACE":
32
+ return DerivedMetricSource.DERIVED_METRIC_SOURCE_TRACE;
33
+ case -1:
34
+ case "UNRECOGNIZED":
35
+ default:
36
+ return DerivedMetricSource.UNRECOGNIZED;
37
+ }
38
+ }
39
+
40
+ export function derivedMetricSourceToJSON(object: DerivedMetricSource): string {
41
+ switch (object) {
42
+ case DerivedMetricSource.DERIVED_METRIC_SOURCE_UNSPECIFIED:
43
+ return "DERIVED_METRIC_SOURCE_UNSPECIFIED";
44
+ case DerivedMetricSource.DERIVED_METRIC_SOURCE_TRACE:
45
+ return "DERIVED_METRIC_SOURCE_TRACE";
46
+ case DerivedMetricSource.UNRECOGNIZED:
47
+ default:
48
+ return "UNRECOGNIZED";
49
+ }
50
+ }
51
+
15
52
  export enum DerivedMetricOutcome {
16
53
  DERIVED_METRIC_OUTCOME_UNSPECIFIED = 0,
17
54
  DERIVED_METRIC_OUTCOME_EMITTED = 1,
@@ -186,6 +223,7 @@ export interface DerivedMetric {
186
223
  program: DerivedMetricProgram | undefined;
187
224
  createdAt: Date | undefined;
188
225
  updatedAt: Date | undefined;
226
+ source: DerivedMetricSource;
189
227
  }
190
228
 
191
229
  export interface DerivedMetricProgram {
@@ -216,6 +254,7 @@ export interface CreateDerivedMetricRequest {
216
254
  enabled: boolean;
217
255
  unit: string;
218
256
  program: DerivedMetricProgram | undefined;
257
+ source: DerivedMetricSource;
219
258
  }
220
259
 
221
260
  export interface CreateDerivedMetricResponse {
@@ -389,6 +428,7 @@ function createBaseDerivedMetric(): DerivedMetric {
389
428
  program: undefined,
390
429
  createdAt: undefined,
391
430
  updatedAt: undefined,
431
+ source: 0,
392
432
  };
393
433
  }
394
434
 
@@ -430,6 +470,9 @@ export const DerivedMetric: MessageFns<DerivedMetric> = {
430
470
  if (message.updatedAt !== undefined) {
431
471
  Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(98).fork()).join();
432
472
  }
473
+ if (message.source !== 0) {
474
+ writer.uint32(104).int32(message.source);
475
+ }
433
476
  return writer;
434
477
  },
435
478
 
@@ -536,6 +579,14 @@ export const DerivedMetric: MessageFns<DerivedMetric> = {
536
579
  message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
537
580
  continue;
538
581
  }
582
+ case 13: {
583
+ if (tag !== 104) {
584
+ break;
585
+ }
586
+
587
+ message.source = reader.int32() as any;
588
+ continue;
589
+ }
539
590
  }
540
591
  if ((tag & 7) === 4 || tag === 0) {
541
592
  break;
@@ -583,6 +634,7 @@ export const DerivedMetric: MessageFns<DerivedMetric> = {
583
634
  : isSet(object.updated_at)
584
635
  ? fromJsonTimestamp(object.updated_at)
585
636
  : undefined,
637
+ source: isSet(object.source) ? derivedMetricSourceFromJSON(object.source) : 0,
586
638
  };
587
639
  },
588
640
 
@@ -624,6 +676,9 @@ export const DerivedMetric: MessageFns<DerivedMetric> = {
624
676
  if (message.updatedAt !== undefined) {
625
677
  obj.updatedAt = message.updatedAt.toISOString();
626
678
  }
679
+ if (message.source !== 0) {
680
+ obj.source = derivedMetricSourceToJSON(message.source);
681
+ }
627
682
  return obj;
628
683
  },
629
684
 
@@ -646,6 +701,7 @@ export const DerivedMetric: MessageFns<DerivedMetric> = {
646
701
  : undefined;
647
702
  message.createdAt = object.createdAt ?? undefined;
648
703
  message.updatedAt = object.updatedAt ?? undefined;
704
+ message.source = object.source ?? 0;
649
705
  return message;
650
706
  },
651
707
  };
@@ -762,6 +818,7 @@ function createBaseCreateDerivedMetricRequest(): CreateDerivedMetricRequest {
762
818
  enabled: false,
763
819
  unit: "",
764
820
  program: undefined,
821
+ source: 0,
765
822
  };
766
823
  }
767
824
 
@@ -791,6 +848,9 @@ export const CreateDerivedMetricRequest: MessageFns<CreateDerivedMetricRequest>
791
848
  if (message.program !== undefined) {
792
849
  DerivedMetricProgram.encode(message.program, writer.uint32(66).fork()).join();
793
850
  }
851
+ if (message.source !== 0) {
852
+ writer.uint32(72).int32(message.source);
853
+ }
794
854
  return writer;
795
855
  },
796
856
 
@@ -865,6 +925,14 @@ export const CreateDerivedMetricRequest: MessageFns<CreateDerivedMetricRequest>
865
925
  message.program = DerivedMetricProgram.decode(reader, reader.uint32());
866
926
  continue;
867
927
  }
928
+ case 9: {
929
+ if (tag !== 72) {
930
+ break;
931
+ }
932
+
933
+ message.source = reader.int32() as any;
934
+ continue;
935
+ }
868
936
  }
869
937
  if ((tag & 7) === 4 || tag === 0) {
870
938
  break;
@@ -896,6 +964,7 @@ export const CreateDerivedMetricRequest: MessageFns<CreateDerivedMetricRequest>
896
964
  enabled: isSet(object.enabled) ? globalThis.Boolean(object.enabled) : false,
897
965
  unit: isSet(object.unit) ? globalThis.String(object.unit) : "",
898
966
  program: isSet(object.program) ? DerivedMetricProgram.fromJSON(object.program) : undefined,
967
+ source: isSet(object.source) ? derivedMetricSourceFromJSON(object.source) : 0,
899
968
  };
900
969
  },
901
970
 
@@ -925,6 +994,9 @@ export const CreateDerivedMetricRequest: MessageFns<CreateDerivedMetricRequest>
925
994
  if (message.program !== undefined) {
926
995
  obj.program = DerivedMetricProgram.toJSON(message.program);
927
996
  }
997
+ if (message.source !== 0) {
998
+ obj.source = derivedMetricSourceToJSON(message.source);
999
+ }
928
1000
  return obj;
929
1001
  },
930
1002
 
@@ -943,6 +1015,7 @@ export const CreateDerivedMetricRequest: MessageFns<CreateDerivedMetricRequest>
943
1015
  message.program = (object.program !== undefined && object.program !== null)
944
1016
  ? DerivedMetricProgram.fromPartial(object.program)
945
1017
  : undefined;
1018
+ message.source = object.source ?? 0;
946
1019
  return message;
947
1020
  },
948
1021
  };
@@ -36,6 +36,7 @@ goog.exportSymbol('proto.gateway.web.v1.DerivedMetricEventAttributes', null, glo
36
36
  goog.exportSymbol('proto.gateway.web.v1.DerivedMetricOutcome', null, global);
37
37
  goog.exportSymbol('proto.gateway.web.v1.DerivedMetricOutcomeCount', null, global);
38
38
  goog.exportSymbol('proto.gateway.web.v1.DerivedMetricProgram', null, global);
39
+ goog.exportSymbol('proto.gateway.web.v1.DerivedMetricSource', null, global);
39
40
  goog.exportSymbol('proto.gateway.web.v1.DryRunDerivedMetricRequest', null, global);
40
41
  goog.exportSymbol('proto.gateway.web.v1.DryRunDerivedMetricResponse', null, global);
41
42
  goog.exportSymbol('proto.gateway.web.v1.DryRunEmission', null, global);
@@ -577,7 +578,8 @@ metricName: jspb.Message.getFieldWithDefault(msg, 8, ""),
577
578
  unit: jspb.Message.getFieldWithDefault(msg, 9, ""),
578
579
  program: (f = msg.getProgram()) && proto.gateway.web.v1.DerivedMetricProgram.toObject(includeInstance, f),
579
580
  createdAt: (f = msg.getCreatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
580
- updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
581
+ updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
582
+ source: jspb.Message.getFieldWithDefault(msg, 13, 0)
581
583
  };
582
584
 
583
585
  if (includeInstance) {
@@ -665,6 +667,10 @@ proto.gateway.web.v1.DerivedMetric.deserializeBinaryFromReader = function(msg, r
665
667
  reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
666
668
  msg.setUpdatedAt(value);
667
669
  break;
670
+ case 13:
671
+ var value = /** @type {!proto.gateway.web.v1.DerivedMetricSource} */ (reader.readEnum());
672
+ msg.setSource(value);
673
+ break;
668
674
  default:
669
675
  reader.skipField();
670
676
  break;
@@ -781,6 +787,13 @@ proto.gateway.web.v1.DerivedMetric.serializeBinaryToWriter = function(message, w
781
787
  google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
782
788
  );
783
789
  }
790
+ f = message.getSource();
791
+ if (f !== 0.0) {
792
+ writer.writeEnum(
793
+ 13,
794
+ f
795
+ );
796
+ }
784
797
  };
785
798
 
786
799
 
@@ -1057,6 +1070,24 @@ proto.gateway.web.v1.DerivedMetric.prototype.hasUpdatedAt = function() {
1057
1070
  };
1058
1071
 
1059
1072
 
1073
+ /**
1074
+ * optional DerivedMetricSource source = 13;
1075
+ * @return {!proto.gateway.web.v1.DerivedMetricSource}
1076
+ */
1077
+ proto.gateway.web.v1.DerivedMetric.prototype.getSource = function() {
1078
+ return /** @type {!proto.gateway.web.v1.DerivedMetricSource} */ (jspb.Message.getFieldWithDefault(this, 13, 0));
1079
+ };
1080
+
1081
+
1082
+ /**
1083
+ * @param {!proto.gateway.web.v1.DerivedMetricSource} value
1084
+ * @return {!proto.gateway.web.v1.DerivedMetric} returns this
1085
+ */
1086
+ proto.gateway.web.v1.DerivedMetric.prototype.setSource = function(value) {
1087
+ return jspb.Message.setProto3EnumField(this, 13, value);
1088
+ };
1089
+
1090
+
1060
1091
 
1061
1092
  /**
1062
1093
  * List of repeated fields within this message type.
@@ -1312,7 +1343,8 @@ displayName: jspb.Message.getFieldWithDefault(msg, 4, ""),
1312
1343
  description: jspb.Message.getFieldWithDefault(msg, 5, ""),
1313
1344
  enabled: jspb.Message.getBooleanFieldWithDefault(msg, 6, false),
1314
1345
  unit: jspb.Message.getFieldWithDefault(msg, 7, ""),
1315
- program: (f = msg.getProgram()) && proto.gateway.web.v1.DerivedMetricProgram.toObject(includeInstance, f)
1346
+ program: (f = msg.getProgram()) && proto.gateway.web.v1.DerivedMetricProgram.toObject(includeInstance, f),
1347
+ source: jspb.Message.getFieldWithDefault(msg, 9, 0)
1316
1348
  };
1317
1349
 
1318
1350
  if (includeInstance) {
@@ -1382,6 +1414,10 @@ proto.gateway.web.v1.CreateDerivedMetricRequest.deserializeBinaryFromReader = fu
1382
1414
  reader.readMessage(value,proto.gateway.web.v1.DerivedMetricProgram.deserializeBinaryFromReader);
1383
1415
  msg.setProgram(value);
1384
1416
  break;
1417
+ case 9:
1418
+ var value = /** @type {!proto.gateway.web.v1.DerivedMetricSource} */ (reader.readEnum());
1419
+ msg.setSource(value);
1420
+ break;
1385
1421
  default:
1386
1422
  reader.skipField();
1387
1423
  break;
@@ -1468,6 +1504,13 @@ proto.gateway.web.v1.CreateDerivedMetricRequest.serializeBinaryToWriter = functi
1468
1504
  proto.gateway.web.v1.DerivedMetricProgram.serializeBinaryToWriter
1469
1505
  );
1470
1506
  }
1507
+ f = message.getSource();
1508
+ if (f !== 0.0) {
1509
+ writer.writeEnum(
1510
+ 9,
1511
+ f
1512
+ );
1513
+ }
1471
1514
  };
1472
1515
 
1473
1516
 
@@ -1634,6 +1677,24 @@ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.hasProgram = function(
1634
1677
  };
1635
1678
 
1636
1679
 
1680
+ /**
1681
+ * optional DerivedMetricSource source = 9;
1682
+ * @return {!proto.gateway.web.v1.DerivedMetricSource}
1683
+ */
1684
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.getSource = function() {
1685
+ return /** @type {!proto.gateway.web.v1.DerivedMetricSource} */ (jspb.Message.getFieldWithDefault(this, 9, 0));
1686
+ };
1687
+
1688
+
1689
+ /**
1690
+ * @param {!proto.gateway.web.v1.DerivedMetricSource} value
1691
+ * @return {!proto.gateway.web.v1.CreateDerivedMetricRequest} returns this
1692
+ */
1693
+ proto.gateway.web.v1.CreateDerivedMetricRequest.prototype.setSource = function(value) {
1694
+ return jspb.Message.setProto3EnumField(this, 9, value);
1695
+ };
1696
+
1697
+
1637
1698
 
1638
1699
 
1639
1700
 
@@ -5824,6 +5885,14 @@ proto.gateway.web.v1.DerivedMetricEventAttributes.prototype.clearAttributesList
5824
5885
  };
5825
5886
 
5826
5887
 
5888
+ /**
5889
+ * @enum {number}
5890
+ */
5891
+ proto.gateway.web.v1.DerivedMetricSource = {
5892
+ DERIVED_METRIC_SOURCE_UNSPECIFIED: 0,
5893
+ DERIVED_METRIC_SOURCE_TRACE: 1
5894
+ };
5895
+
5827
5896
  /**
5828
5897
  * @enum {number}
5829
5898
  */
@@ -1770,6 +1770,12 @@ export interface TraceEventEnvelope {
1770
1770
  spanId: string;
1771
1771
  /** Parent of this event's span ("" = root / trace-level) */
1772
1772
  parentSpanId: string;
1773
+ /**
1774
+ * Per-event annotations, rendered to strings server-side. Distinct from trace attributes
1775
+ * (TraceStarted/AttributesUpdated) and span attributes (SpanStarted) — this bag belongs to
1776
+ * this one event occurrence.
1777
+ */
1778
+ attributes: { [key: string]: string };
1773
1779
  traceStarted?: TraceStarted | undefined;
1774
1780
  traceFinished?: TraceFinished | undefined;
1775
1781
  infoEventAdded?: InfoEventAdded | undefined;
@@ -1823,6 +1829,11 @@ export interface TraceEventEnvelope {
1823
1829
  safeTxSuperseded?: SafeTxSuperseded | undefined;
1824
1830
  }
1825
1831
 
1832
+ export interface TraceEventEnvelope_AttributesEntry {
1833
+ key: string;
1834
+ value: string;
1835
+ }
1836
+
1826
1837
  /** SpanStarted is emitted when a span opens. */
1827
1838
  export interface SpanStarted {
1828
1839
  /** the span that opened; same value as the envelope span_id (field 13) */
@@ -6758,6 +6769,7 @@ function createBaseTraceEventEnvelope(): TraceEventEnvelope {
6758
6769
  category: 0,
6759
6770
  spanId: "",
6760
6771
  parentSpanId: "",
6772
+ attributes: {},
6761
6773
  traceStarted: undefined,
6762
6774
  traceFinished: undefined,
6763
6775
  infoEventAdded: undefined,
@@ -6850,6 +6862,9 @@ export const TraceEventEnvelope: MessageFns<TraceEventEnvelope> = {
6850
6862
  if (message.parentSpanId !== "") {
6851
6863
  writer.uint32(114).string(message.parentSpanId);
6852
6864
  }
6865
+ globalThis.Object.entries(message.attributes).forEach(([key, value]: [string, string]) => {
6866
+ TraceEventEnvelope_AttributesEntry.encode({ key: key as any, value }, writer.uint32(122).fork()).join();
6867
+ });
6853
6868
  if (message.traceStarted !== undefined) {
6854
6869
  TraceStarted.encode(message.traceStarted, writer.uint32(162).fork()).join();
6855
6870
  }
@@ -7109,6 +7124,17 @@ export const TraceEventEnvelope: MessageFns<TraceEventEnvelope> = {
7109
7124
  message.parentSpanId = reader.string();
7110
7125
  continue;
7111
7126
  }
7127
+ case 15: {
7128
+ if (tag !== 122) {
7129
+ break;
7130
+ }
7131
+
7132
+ const entry15 = TraceEventEnvelope_AttributesEntry.decode(reader, reader.uint32());
7133
+ if (entry15.value !== undefined) {
7134
+ message.attributes[entry15.key] = entry15.value;
7135
+ }
7136
+ continue;
7137
+ }
7112
7138
  case 20: {
7113
7139
  if (tag !== 162) {
7114
7140
  break;
@@ -7572,6 +7598,15 @@ export const TraceEventEnvelope: MessageFns<TraceEventEnvelope> = {
7572
7598
  : isSet(object.parent_span_id)
7573
7599
  ? globalThis.String(object.parent_span_id)
7574
7600
  : "",
7601
+ attributes: isObject(object.attributes)
7602
+ ? (globalThis.Object.entries(object.attributes) as [string, any][]).reduce(
7603
+ (acc: { [key: string]: string }, [key, value]: [string, any]) => {
7604
+ acc[key] = globalThis.String(value);
7605
+ return acc;
7606
+ },
7607
+ {},
7608
+ )
7609
+ : {},
7575
7610
  traceStarted: isSet(object.traceStarted)
7576
7611
  ? TraceStarted.fromJSON(object.traceStarted)
7577
7612
  : isSet(object.trace_started)
@@ -7868,6 +7903,15 @@ export const TraceEventEnvelope: MessageFns<TraceEventEnvelope> = {
7868
7903
  if (message.parentSpanId !== "") {
7869
7904
  obj.parentSpanId = message.parentSpanId;
7870
7905
  }
7906
+ if (message.attributes) {
7907
+ const entries = globalThis.Object.entries(message.attributes) as [string, string][];
7908
+ if (entries.length > 0) {
7909
+ obj.attributes = {};
7910
+ entries.forEach(([k, v]) => {
7911
+ obj.attributes[k] = v;
7912
+ });
7913
+ }
7914
+ }
7871
7915
  if (message.traceStarted !== undefined) {
7872
7916
  obj.traceStarted = TraceStarted.toJSON(message.traceStarted);
7873
7917
  }
@@ -8041,6 +8085,15 @@ export const TraceEventEnvelope: MessageFns<TraceEventEnvelope> = {
8041
8085
  message.category = object.category ?? 0;
8042
8086
  message.spanId = object.spanId ?? "";
8043
8087
  message.parentSpanId = object.parentSpanId ?? "";
8088
+ message.attributes = (globalThis.Object.entries(object.attributes ?? {}) as [string, string][]).reduce(
8089
+ (acc: { [key: string]: string }, [key, value]: [string, string]) => {
8090
+ if (value !== undefined) {
8091
+ acc[key] = globalThis.String(value);
8092
+ }
8093
+ return acc;
8094
+ },
8095
+ {},
8096
+ );
8044
8097
  message.traceStarted = (object.traceStarted !== undefined && object.traceStarted !== null)
8045
8098
  ? TraceStarted.fromPartial(object.traceStarted)
8046
8099
  : undefined;
@@ -8207,6 +8260,86 @@ export const TraceEventEnvelope: MessageFns<TraceEventEnvelope> = {
8207
8260
  },
8208
8261
  };
8209
8262
 
8263
+ function createBaseTraceEventEnvelope_AttributesEntry(): TraceEventEnvelope_AttributesEntry {
8264
+ return { key: "", value: "" };
8265
+ }
8266
+
8267
+ export const TraceEventEnvelope_AttributesEntry: MessageFns<TraceEventEnvelope_AttributesEntry> = {
8268
+ encode(message: TraceEventEnvelope_AttributesEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
8269
+ if (message.key !== "") {
8270
+ writer.uint32(10).string(message.key);
8271
+ }
8272
+ if (message.value !== "") {
8273
+ writer.uint32(18).string(message.value);
8274
+ }
8275
+ return writer;
8276
+ },
8277
+
8278
+ decode(input: BinaryReader | Uint8Array, length?: number): TraceEventEnvelope_AttributesEntry {
8279
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
8280
+ const end = length === undefined ? reader.len : reader.pos + length;
8281
+ const message = createBaseTraceEventEnvelope_AttributesEntry();
8282
+ while (reader.pos < end) {
8283
+ const tag = reader.uint32();
8284
+ switch (tag >>> 3) {
8285
+ case 1: {
8286
+ if (tag !== 10) {
8287
+ break;
8288
+ }
8289
+
8290
+ message.key = reader.string();
8291
+ continue;
8292
+ }
8293
+ case 2: {
8294
+ if (tag !== 18) {
8295
+ break;
8296
+ }
8297
+
8298
+ message.value = reader.string();
8299
+ continue;
8300
+ }
8301
+ }
8302
+ if ((tag & 7) === 4 || tag === 0) {
8303
+ break;
8304
+ }
8305
+ reader.skip(tag & 7);
8306
+ }
8307
+ return message;
8308
+ },
8309
+
8310
+ fromJSON(object: any): TraceEventEnvelope_AttributesEntry {
8311
+ return {
8312
+ key: isSet(object.key) ? globalThis.String(object.key) : "",
8313
+ value: isSet(object.value) ? globalThis.String(object.value) : "",
8314
+ };
8315
+ },
8316
+
8317
+ toJSON(message: TraceEventEnvelope_AttributesEntry): unknown {
8318
+ const obj: any = {};
8319
+ if (message.key !== "") {
8320
+ obj.key = message.key;
8321
+ }
8322
+ if (message.value !== "") {
8323
+ obj.value = message.value;
8324
+ }
8325
+ return obj;
8326
+ },
8327
+
8328
+ create<I extends Exact<DeepPartial<TraceEventEnvelope_AttributesEntry>, I>>(
8329
+ base?: I,
8330
+ ): TraceEventEnvelope_AttributesEntry {
8331
+ return TraceEventEnvelope_AttributesEntry.fromPartial(base ?? ({} as any));
8332
+ },
8333
+ fromPartial<I extends Exact<DeepPartial<TraceEventEnvelope_AttributesEntry>, I>>(
8334
+ object: I,
8335
+ ): TraceEventEnvelope_AttributesEntry {
8336
+ const message = createBaseTraceEventEnvelope_AttributesEntry();
8337
+ message.key = object.key ?? "";
8338
+ message.value = object.value ?? "";
8339
+ return message;
8340
+ },
8341
+ };
8342
+
8210
8343
  function createBaseSpanStarted(): SpanStarted {
8211
8344
  return { spanId: "", parentSpanId: undefined, name: "", startTime: undefined, attributes: {} };
8212
8345
  }
@@ -9751,6 +9751,7 @@ source: jspb.Message.getFieldWithDefault(msg, 9, 0),
9751
9751
  category: jspb.Message.getFieldWithDefault(msg, 11, 0),
9752
9752
  spanId: jspb.Message.getFieldWithDefault(msg, 13, ""),
9753
9753
  parentSpanId: jspb.Message.getFieldWithDefault(msg, 14, ""),
9754
+ attributesMap: (f = msg.getAttributesMap()) ? f.toObject(includeInstance, undefined) : [],
9754
9755
  traceStarted: (f = msg.getTraceStarted()) && proto.gateway.web.v1.TraceStarted.toObject(includeInstance, f),
9755
9756
  traceFinished: (f = msg.getTraceFinished()) && proto.gateway.web.v1.TraceFinished.toObject(includeInstance, f),
9756
9757
  infoEventAdded: (f = msg.getInfoEventAdded()) && proto.gateway.web.v1.InfoEventAdded.toObject(includeInstance, f),
@@ -9888,6 +9889,12 @@ proto.gateway.web.v1.TraceEventEnvelope.deserializeBinaryFromReader = function(m
9888
9889
  var value = /** @type {string} */ (reader.readString());
9889
9890
  msg.setParentSpanId(value);
9890
9891
  break;
9892
+ case 15:
9893
+ var value = msg.getAttributesMap();
9894
+ reader.readMessage(value, function(message, reader) {
9895
+ jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", "");
9896
+ });
9897
+ break;
9891
9898
  case 20:
9892
9899
  var value = new proto.gateway.web.v1.TraceStarted;
9893
9900
  reader.readMessage(value,proto.gateway.web.v1.TraceStarted.deserializeBinaryFromReader);
@@ -10258,6 +10265,10 @@ proto.gateway.web.v1.TraceEventEnvelope.serializeBinaryToWriter = function(messa
10258
10265
  f
10259
10266
  );
10260
10267
  }
10268
+ f = message.getAttributesMap(true);
10269
+ if (f && f.getLength() > 0) {
10270
+ f.serializeBinary(15, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString);
10271
+ }
10261
10272
  f = message.getTraceStarted();
10262
10273
  if (f != null) {
10263
10274
  writer.writeMessage(
@@ -10923,6 +10934,29 @@ proto.gateway.web.v1.TraceEventEnvelope.prototype.setParentSpanId = function(val
10923
10934
  };
10924
10935
 
10925
10936
 
10937
+ /**
10938
+ * map<string, string> attributes = 15;
10939
+ * @param {boolean=} opt_noLazyCreate Do not create the map if
10940
+ * empty, instead returning `undefined`
10941
+ * @return {!jspb.Map<string,string>}
10942
+ */
10943
+ proto.gateway.web.v1.TraceEventEnvelope.prototype.getAttributesMap = function(opt_noLazyCreate) {
10944
+ return /** @type {!jspb.Map<string,string>} */ (
10945
+ jspb.Message.getMapField(this, 15, opt_noLazyCreate,
10946
+ null));
10947
+ };
10948
+
10949
+
10950
+ /**
10951
+ * Clears values from the map. The map will be non-null.
10952
+ * @return {!proto.gateway.web.v1.TraceEventEnvelope} returns this
10953
+ */
10954
+ proto.gateway.web.v1.TraceEventEnvelope.prototype.clearAttributesMap = function() {
10955
+ this.getAttributesMap().clear();
10956
+ return this;
10957
+ };
10958
+
10959
+
10926
10960
  /**
10927
10961
  * optional TraceStarted trace_started = 20;
10928
10962
  * @return {?proto.gateway.web.v1.TraceStarted}