@miradorlabs/web-grpc 2.12.0 → 2.14.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 +1 -1
- package/proto/gateway/web/v1/attribute_value.ts +496 -0
- package/proto/gateway/web/v1/attribute_value_grpc_pb.js +1 -0
- package/proto/gateway/web/v1/attribute_value_pb.js +1111 -0
- package/proto/gateway/web/v1/derived_metric_gateway.ts +0 -551
- package/proto/gateway/web/v1/derived_metric_gateway_grpc_pb.js +0 -35
- package/proto/gateway/web/v1/derived_metric_gateway_pb.js +5 -1026
- package/proto/gateway/web/v1/trace_gateway.ts +104 -72
- package/proto/gateway/web/v1/trace_gateway_grpc_pb.js +1 -0
- package/proto/gateway/web/v1/trace_gateway_pb.js +60 -28
|
@@ -150,64 +150,6 @@ export function derivedMetricOutcomeToJSON(object: DerivedMetricOutcome): string
|
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
export enum DerivedMetricAttributeType {
|
|
154
|
-
DERIVED_METRIC_ATTRIBUTE_TYPE_UNSPECIFIED = 0,
|
|
155
|
-
DERIVED_METRIC_ATTRIBUTE_TYPE_STRING = 1,
|
|
156
|
-
DERIVED_METRIC_ATTRIBUTE_TYPE_BOOL = 2,
|
|
157
|
-
DERIVED_METRIC_ATTRIBUTE_TYPE_INT = 3,
|
|
158
|
-
DERIVED_METRIC_ATTRIBUTE_TYPE_DOUBLE = 4,
|
|
159
|
-
/** DERIVED_METRIC_ATTRIBUTE_TYPE_MIXED - The key was observed with more than one type across traces. */
|
|
160
|
-
DERIVED_METRIC_ATTRIBUTE_TYPE_MIXED = 5,
|
|
161
|
-
UNRECOGNIZED = -1,
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
export function derivedMetricAttributeTypeFromJSON(object: any): DerivedMetricAttributeType {
|
|
165
|
-
switch (object) {
|
|
166
|
-
case 0:
|
|
167
|
-
case "DERIVED_METRIC_ATTRIBUTE_TYPE_UNSPECIFIED":
|
|
168
|
-
return DerivedMetricAttributeType.DERIVED_METRIC_ATTRIBUTE_TYPE_UNSPECIFIED;
|
|
169
|
-
case 1:
|
|
170
|
-
case "DERIVED_METRIC_ATTRIBUTE_TYPE_STRING":
|
|
171
|
-
return DerivedMetricAttributeType.DERIVED_METRIC_ATTRIBUTE_TYPE_STRING;
|
|
172
|
-
case 2:
|
|
173
|
-
case "DERIVED_METRIC_ATTRIBUTE_TYPE_BOOL":
|
|
174
|
-
return DerivedMetricAttributeType.DERIVED_METRIC_ATTRIBUTE_TYPE_BOOL;
|
|
175
|
-
case 3:
|
|
176
|
-
case "DERIVED_METRIC_ATTRIBUTE_TYPE_INT":
|
|
177
|
-
return DerivedMetricAttributeType.DERIVED_METRIC_ATTRIBUTE_TYPE_INT;
|
|
178
|
-
case 4:
|
|
179
|
-
case "DERIVED_METRIC_ATTRIBUTE_TYPE_DOUBLE":
|
|
180
|
-
return DerivedMetricAttributeType.DERIVED_METRIC_ATTRIBUTE_TYPE_DOUBLE;
|
|
181
|
-
case 5:
|
|
182
|
-
case "DERIVED_METRIC_ATTRIBUTE_TYPE_MIXED":
|
|
183
|
-
return DerivedMetricAttributeType.DERIVED_METRIC_ATTRIBUTE_TYPE_MIXED;
|
|
184
|
-
case -1:
|
|
185
|
-
case "UNRECOGNIZED":
|
|
186
|
-
default:
|
|
187
|
-
return DerivedMetricAttributeType.UNRECOGNIZED;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export function derivedMetricAttributeTypeToJSON(object: DerivedMetricAttributeType): string {
|
|
192
|
-
switch (object) {
|
|
193
|
-
case DerivedMetricAttributeType.DERIVED_METRIC_ATTRIBUTE_TYPE_UNSPECIFIED:
|
|
194
|
-
return "DERIVED_METRIC_ATTRIBUTE_TYPE_UNSPECIFIED";
|
|
195
|
-
case DerivedMetricAttributeType.DERIVED_METRIC_ATTRIBUTE_TYPE_STRING:
|
|
196
|
-
return "DERIVED_METRIC_ATTRIBUTE_TYPE_STRING";
|
|
197
|
-
case DerivedMetricAttributeType.DERIVED_METRIC_ATTRIBUTE_TYPE_BOOL:
|
|
198
|
-
return "DERIVED_METRIC_ATTRIBUTE_TYPE_BOOL";
|
|
199
|
-
case DerivedMetricAttributeType.DERIVED_METRIC_ATTRIBUTE_TYPE_INT:
|
|
200
|
-
return "DERIVED_METRIC_ATTRIBUTE_TYPE_INT";
|
|
201
|
-
case DerivedMetricAttributeType.DERIVED_METRIC_ATTRIBUTE_TYPE_DOUBLE:
|
|
202
|
-
return "DERIVED_METRIC_ATTRIBUTE_TYPE_DOUBLE";
|
|
203
|
-
case DerivedMetricAttributeType.DERIVED_METRIC_ATTRIBUTE_TYPE_MIXED:
|
|
204
|
-
return "DERIVED_METRIC_ATTRIBUTE_TYPE_MIXED";
|
|
205
|
-
case DerivedMetricAttributeType.UNRECOGNIZED:
|
|
206
|
-
default:
|
|
207
|
-
return "UNRECOGNIZED";
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
153
|
export interface DerivedMetric {
|
|
212
154
|
id: string;
|
|
213
155
|
organizationId: string;
|
|
@@ -372,48 +314,6 @@ export interface DerivedMetricOutcomeCount {
|
|
|
372
314
|
count: number;
|
|
373
315
|
}
|
|
374
316
|
|
|
375
|
-
export interface ListDerivedMetricAttributesRequest {
|
|
376
|
-
organizationId: string;
|
|
377
|
-
projectId: string;
|
|
378
|
-
}
|
|
379
|
-
|
|
380
|
-
export interface ListDerivedMetricAttributesResponse {
|
|
381
|
-
status:
|
|
382
|
-
| ResponseStatus
|
|
383
|
-
| undefined;
|
|
384
|
-
/** Trace-level attributes: usable as dimensions, population filters, or trace-attribute operands. */
|
|
385
|
-
traceAttributes: DerivedMetricAttribute[];
|
|
386
|
-
/** Events observed on recent traces, each with the attribute keys seen on that event name. */
|
|
387
|
-
events: DerivedMetricEventAttributes[];
|
|
388
|
-
/**
|
|
389
|
-
* Finished traces the walk covered (oversized/unreadable histories count -- permanent skips are
|
|
390
|
-
* not truncation). traces_sampled < traces_selected means the request budget expired mid-walk and
|
|
391
|
-
* the catalog is a truncated sample a retry can improve on, same contract as the dry run.
|
|
392
|
-
*/
|
|
393
|
-
tracesSampled: number;
|
|
394
|
-
/** Finished traces the walk selected; zero means the project has no history yet. */
|
|
395
|
-
tracesSelected: number;
|
|
396
|
-
/**
|
|
397
|
-
* True when an output cap (distinct event names or total keys) dropped entries -- the catalog is
|
|
398
|
-
* complete for what it lists, but more keys exist than fit in one response.
|
|
399
|
-
*/
|
|
400
|
-
catalogCapped: boolean;
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
export interface DerivedMetricAttribute {
|
|
404
|
-
key: string;
|
|
405
|
-
/** The stored type, from the typed attribute payloads -- not inferred from rendered strings. */
|
|
406
|
-
type: DerivedMetricAttributeType;
|
|
407
|
-
/** A few observed values, rendered canonically. Never exhaustive. */
|
|
408
|
-
sampleValues: string[];
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
export interface DerivedMetricEventAttributes {
|
|
412
|
-
/** The event's author-facing name; only info/warn/error events carry one. */
|
|
413
|
-
name: string;
|
|
414
|
-
attributes: DerivedMetricAttribute[];
|
|
415
|
-
}
|
|
416
|
-
|
|
417
317
|
function createBaseDerivedMetric(): DerivedMetric {
|
|
418
318
|
return {
|
|
419
319
|
id: "",
|
|
@@ -2622,439 +2522,6 @@ export const DerivedMetricOutcomeCount: MessageFns<DerivedMetricOutcomeCount> =
|
|
|
2622
2522
|
},
|
|
2623
2523
|
};
|
|
2624
2524
|
|
|
2625
|
-
function createBaseListDerivedMetricAttributesRequest(): ListDerivedMetricAttributesRequest {
|
|
2626
|
-
return { organizationId: "", projectId: "" };
|
|
2627
|
-
}
|
|
2628
|
-
|
|
2629
|
-
export const ListDerivedMetricAttributesRequest: MessageFns<ListDerivedMetricAttributesRequest> = {
|
|
2630
|
-
encode(message: ListDerivedMetricAttributesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2631
|
-
if (message.organizationId !== "") {
|
|
2632
|
-
writer.uint32(10).string(message.organizationId);
|
|
2633
|
-
}
|
|
2634
|
-
if (message.projectId !== "") {
|
|
2635
|
-
writer.uint32(18).string(message.projectId);
|
|
2636
|
-
}
|
|
2637
|
-
return writer;
|
|
2638
|
-
},
|
|
2639
|
-
|
|
2640
|
-
decode(input: BinaryReader | Uint8Array, length?: number): ListDerivedMetricAttributesRequest {
|
|
2641
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2642
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2643
|
-
const message = createBaseListDerivedMetricAttributesRequest();
|
|
2644
|
-
while (reader.pos < end) {
|
|
2645
|
-
const tag = reader.uint32();
|
|
2646
|
-
switch (tag >>> 3) {
|
|
2647
|
-
case 1: {
|
|
2648
|
-
if (tag !== 10) {
|
|
2649
|
-
break;
|
|
2650
|
-
}
|
|
2651
|
-
|
|
2652
|
-
message.organizationId = reader.string();
|
|
2653
|
-
continue;
|
|
2654
|
-
}
|
|
2655
|
-
case 2: {
|
|
2656
|
-
if (tag !== 18) {
|
|
2657
|
-
break;
|
|
2658
|
-
}
|
|
2659
|
-
|
|
2660
|
-
message.projectId = reader.string();
|
|
2661
|
-
continue;
|
|
2662
|
-
}
|
|
2663
|
-
}
|
|
2664
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2665
|
-
break;
|
|
2666
|
-
}
|
|
2667
|
-
reader.skip(tag & 7);
|
|
2668
|
-
}
|
|
2669
|
-
return message;
|
|
2670
|
-
},
|
|
2671
|
-
|
|
2672
|
-
fromJSON(object: any): ListDerivedMetricAttributesRequest {
|
|
2673
|
-
return {
|
|
2674
|
-
organizationId: isSet(object.organizationId)
|
|
2675
|
-
? globalThis.String(object.organizationId)
|
|
2676
|
-
: isSet(object.organization_id)
|
|
2677
|
-
? globalThis.String(object.organization_id)
|
|
2678
|
-
: "",
|
|
2679
|
-
projectId: isSet(object.projectId)
|
|
2680
|
-
? globalThis.String(object.projectId)
|
|
2681
|
-
: isSet(object.project_id)
|
|
2682
|
-
? globalThis.String(object.project_id)
|
|
2683
|
-
: "",
|
|
2684
|
-
};
|
|
2685
|
-
},
|
|
2686
|
-
|
|
2687
|
-
toJSON(message: ListDerivedMetricAttributesRequest): unknown {
|
|
2688
|
-
const obj: any = {};
|
|
2689
|
-
if (message.organizationId !== "") {
|
|
2690
|
-
obj.organizationId = message.organizationId;
|
|
2691
|
-
}
|
|
2692
|
-
if (message.projectId !== "") {
|
|
2693
|
-
obj.projectId = message.projectId;
|
|
2694
|
-
}
|
|
2695
|
-
return obj;
|
|
2696
|
-
},
|
|
2697
|
-
|
|
2698
|
-
create<I extends Exact<DeepPartial<ListDerivedMetricAttributesRequest>, I>>(
|
|
2699
|
-
base?: I,
|
|
2700
|
-
): ListDerivedMetricAttributesRequest {
|
|
2701
|
-
return ListDerivedMetricAttributesRequest.fromPartial(base ?? ({} as any));
|
|
2702
|
-
},
|
|
2703
|
-
fromPartial<I extends Exact<DeepPartial<ListDerivedMetricAttributesRequest>, I>>(
|
|
2704
|
-
object: I,
|
|
2705
|
-
): ListDerivedMetricAttributesRequest {
|
|
2706
|
-
const message = createBaseListDerivedMetricAttributesRequest();
|
|
2707
|
-
message.organizationId = object.organizationId ?? "";
|
|
2708
|
-
message.projectId = object.projectId ?? "";
|
|
2709
|
-
return message;
|
|
2710
|
-
},
|
|
2711
|
-
};
|
|
2712
|
-
|
|
2713
|
-
function createBaseListDerivedMetricAttributesResponse(): ListDerivedMetricAttributesResponse {
|
|
2714
|
-
return {
|
|
2715
|
-
status: undefined,
|
|
2716
|
-
traceAttributes: [],
|
|
2717
|
-
events: [],
|
|
2718
|
-
tracesSampled: 0,
|
|
2719
|
-
tracesSelected: 0,
|
|
2720
|
-
catalogCapped: false,
|
|
2721
|
-
};
|
|
2722
|
-
}
|
|
2723
|
-
|
|
2724
|
-
export const ListDerivedMetricAttributesResponse: MessageFns<ListDerivedMetricAttributesResponse> = {
|
|
2725
|
-
encode(message: ListDerivedMetricAttributesResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2726
|
-
if (message.status !== undefined) {
|
|
2727
|
-
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
2728
|
-
}
|
|
2729
|
-
for (const v of message.traceAttributes) {
|
|
2730
|
-
DerivedMetricAttribute.encode(v!, writer.uint32(18).fork()).join();
|
|
2731
|
-
}
|
|
2732
|
-
for (const v of message.events) {
|
|
2733
|
-
DerivedMetricEventAttributes.encode(v!, writer.uint32(26).fork()).join();
|
|
2734
|
-
}
|
|
2735
|
-
if (message.tracesSampled !== 0) {
|
|
2736
|
-
writer.uint32(32).uint32(message.tracesSampled);
|
|
2737
|
-
}
|
|
2738
|
-
if (message.tracesSelected !== 0) {
|
|
2739
|
-
writer.uint32(40).uint32(message.tracesSelected);
|
|
2740
|
-
}
|
|
2741
|
-
if (message.catalogCapped !== false) {
|
|
2742
|
-
writer.uint32(48).bool(message.catalogCapped);
|
|
2743
|
-
}
|
|
2744
|
-
return writer;
|
|
2745
|
-
},
|
|
2746
|
-
|
|
2747
|
-
decode(input: BinaryReader | Uint8Array, length?: number): ListDerivedMetricAttributesResponse {
|
|
2748
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2749
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2750
|
-
const message = createBaseListDerivedMetricAttributesResponse();
|
|
2751
|
-
while (reader.pos < end) {
|
|
2752
|
-
const tag = reader.uint32();
|
|
2753
|
-
switch (tag >>> 3) {
|
|
2754
|
-
case 1: {
|
|
2755
|
-
if (tag !== 10) {
|
|
2756
|
-
break;
|
|
2757
|
-
}
|
|
2758
|
-
|
|
2759
|
-
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
2760
|
-
continue;
|
|
2761
|
-
}
|
|
2762
|
-
case 2: {
|
|
2763
|
-
if (tag !== 18) {
|
|
2764
|
-
break;
|
|
2765
|
-
}
|
|
2766
|
-
|
|
2767
|
-
message.traceAttributes.push(DerivedMetricAttribute.decode(reader, reader.uint32()));
|
|
2768
|
-
continue;
|
|
2769
|
-
}
|
|
2770
|
-
case 3: {
|
|
2771
|
-
if (tag !== 26) {
|
|
2772
|
-
break;
|
|
2773
|
-
}
|
|
2774
|
-
|
|
2775
|
-
message.events.push(DerivedMetricEventAttributes.decode(reader, reader.uint32()));
|
|
2776
|
-
continue;
|
|
2777
|
-
}
|
|
2778
|
-
case 4: {
|
|
2779
|
-
if (tag !== 32) {
|
|
2780
|
-
break;
|
|
2781
|
-
}
|
|
2782
|
-
|
|
2783
|
-
message.tracesSampled = reader.uint32();
|
|
2784
|
-
continue;
|
|
2785
|
-
}
|
|
2786
|
-
case 5: {
|
|
2787
|
-
if (tag !== 40) {
|
|
2788
|
-
break;
|
|
2789
|
-
}
|
|
2790
|
-
|
|
2791
|
-
message.tracesSelected = reader.uint32();
|
|
2792
|
-
continue;
|
|
2793
|
-
}
|
|
2794
|
-
case 6: {
|
|
2795
|
-
if (tag !== 48) {
|
|
2796
|
-
break;
|
|
2797
|
-
}
|
|
2798
|
-
|
|
2799
|
-
message.catalogCapped = reader.bool();
|
|
2800
|
-
continue;
|
|
2801
|
-
}
|
|
2802
|
-
}
|
|
2803
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2804
|
-
break;
|
|
2805
|
-
}
|
|
2806
|
-
reader.skip(tag & 7);
|
|
2807
|
-
}
|
|
2808
|
-
return message;
|
|
2809
|
-
},
|
|
2810
|
-
|
|
2811
|
-
fromJSON(object: any): ListDerivedMetricAttributesResponse {
|
|
2812
|
-
return {
|
|
2813
|
-
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
2814
|
-
traceAttributes: globalThis.Array.isArray(object?.traceAttributes)
|
|
2815
|
-
? object.traceAttributes.map((e: any) => DerivedMetricAttribute.fromJSON(e))
|
|
2816
|
-
: globalThis.Array.isArray(object?.trace_attributes)
|
|
2817
|
-
? object.trace_attributes.map((e: any) => DerivedMetricAttribute.fromJSON(e))
|
|
2818
|
-
: [],
|
|
2819
|
-
events: globalThis.Array.isArray(object?.events)
|
|
2820
|
-
? object.events.map((e: any) => DerivedMetricEventAttributes.fromJSON(e))
|
|
2821
|
-
: [],
|
|
2822
|
-
tracesSampled: isSet(object.tracesSampled)
|
|
2823
|
-
? globalThis.Number(object.tracesSampled)
|
|
2824
|
-
: isSet(object.traces_sampled)
|
|
2825
|
-
? globalThis.Number(object.traces_sampled)
|
|
2826
|
-
: 0,
|
|
2827
|
-
tracesSelected: isSet(object.tracesSelected)
|
|
2828
|
-
? globalThis.Number(object.tracesSelected)
|
|
2829
|
-
: isSet(object.traces_selected)
|
|
2830
|
-
? globalThis.Number(object.traces_selected)
|
|
2831
|
-
: 0,
|
|
2832
|
-
catalogCapped: isSet(object.catalogCapped)
|
|
2833
|
-
? globalThis.Boolean(object.catalogCapped)
|
|
2834
|
-
: isSet(object.catalog_capped)
|
|
2835
|
-
? globalThis.Boolean(object.catalog_capped)
|
|
2836
|
-
: false,
|
|
2837
|
-
};
|
|
2838
|
-
},
|
|
2839
|
-
|
|
2840
|
-
toJSON(message: ListDerivedMetricAttributesResponse): unknown {
|
|
2841
|
-
const obj: any = {};
|
|
2842
|
-
if (message.status !== undefined) {
|
|
2843
|
-
obj.status = ResponseStatus.toJSON(message.status);
|
|
2844
|
-
}
|
|
2845
|
-
if (message.traceAttributes?.length) {
|
|
2846
|
-
obj.traceAttributes = message.traceAttributes.map((e) => DerivedMetricAttribute.toJSON(e));
|
|
2847
|
-
}
|
|
2848
|
-
if (message.events?.length) {
|
|
2849
|
-
obj.events = message.events.map((e) => DerivedMetricEventAttributes.toJSON(e));
|
|
2850
|
-
}
|
|
2851
|
-
if (message.tracesSampled !== 0) {
|
|
2852
|
-
obj.tracesSampled = Math.round(message.tracesSampled);
|
|
2853
|
-
}
|
|
2854
|
-
if (message.tracesSelected !== 0) {
|
|
2855
|
-
obj.tracesSelected = Math.round(message.tracesSelected);
|
|
2856
|
-
}
|
|
2857
|
-
if (message.catalogCapped !== false) {
|
|
2858
|
-
obj.catalogCapped = message.catalogCapped;
|
|
2859
|
-
}
|
|
2860
|
-
return obj;
|
|
2861
|
-
},
|
|
2862
|
-
|
|
2863
|
-
create<I extends Exact<DeepPartial<ListDerivedMetricAttributesResponse>, I>>(
|
|
2864
|
-
base?: I,
|
|
2865
|
-
): ListDerivedMetricAttributesResponse {
|
|
2866
|
-
return ListDerivedMetricAttributesResponse.fromPartial(base ?? ({} as any));
|
|
2867
|
-
},
|
|
2868
|
-
fromPartial<I extends Exact<DeepPartial<ListDerivedMetricAttributesResponse>, I>>(
|
|
2869
|
-
object: I,
|
|
2870
|
-
): ListDerivedMetricAttributesResponse {
|
|
2871
|
-
const message = createBaseListDerivedMetricAttributesResponse();
|
|
2872
|
-
message.status = (object.status !== undefined && object.status !== null)
|
|
2873
|
-
? ResponseStatus.fromPartial(object.status)
|
|
2874
|
-
: undefined;
|
|
2875
|
-
message.traceAttributes = object.traceAttributes?.map((e) => DerivedMetricAttribute.fromPartial(e)) || [];
|
|
2876
|
-
message.events = object.events?.map((e) => DerivedMetricEventAttributes.fromPartial(e)) || [];
|
|
2877
|
-
message.tracesSampled = object.tracesSampled ?? 0;
|
|
2878
|
-
message.tracesSelected = object.tracesSelected ?? 0;
|
|
2879
|
-
message.catalogCapped = object.catalogCapped ?? false;
|
|
2880
|
-
return message;
|
|
2881
|
-
},
|
|
2882
|
-
};
|
|
2883
|
-
|
|
2884
|
-
function createBaseDerivedMetricAttribute(): DerivedMetricAttribute {
|
|
2885
|
-
return { key: "", type: 0, sampleValues: [] };
|
|
2886
|
-
}
|
|
2887
|
-
|
|
2888
|
-
export const DerivedMetricAttribute: MessageFns<DerivedMetricAttribute> = {
|
|
2889
|
-
encode(message: DerivedMetricAttribute, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2890
|
-
if (message.key !== "") {
|
|
2891
|
-
writer.uint32(10).string(message.key);
|
|
2892
|
-
}
|
|
2893
|
-
if (message.type !== 0) {
|
|
2894
|
-
writer.uint32(16).int32(message.type);
|
|
2895
|
-
}
|
|
2896
|
-
for (const v of message.sampleValues) {
|
|
2897
|
-
writer.uint32(26).string(v!);
|
|
2898
|
-
}
|
|
2899
|
-
return writer;
|
|
2900
|
-
},
|
|
2901
|
-
|
|
2902
|
-
decode(input: BinaryReader | Uint8Array, length?: number): DerivedMetricAttribute {
|
|
2903
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2904
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2905
|
-
const message = createBaseDerivedMetricAttribute();
|
|
2906
|
-
while (reader.pos < end) {
|
|
2907
|
-
const tag = reader.uint32();
|
|
2908
|
-
switch (tag >>> 3) {
|
|
2909
|
-
case 1: {
|
|
2910
|
-
if (tag !== 10) {
|
|
2911
|
-
break;
|
|
2912
|
-
}
|
|
2913
|
-
|
|
2914
|
-
message.key = reader.string();
|
|
2915
|
-
continue;
|
|
2916
|
-
}
|
|
2917
|
-
case 2: {
|
|
2918
|
-
if (tag !== 16) {
|
|
2919
|
-
break;
|
|
2920
|
-
}
|
|
2921
|
-
|
|
2922
|
-
message.type = reader.int32() as any;
|
|
2923
|
-
continue;
|
|
2924
|
-
}
|
|
2925
|
-
case 3: {
|
|
2926
|
-
if (tag !== 26) {
|
|
2927
|
-
break;
|
|
2928
|
-
}
|
|
2929
|
-
|
|
2930
|
-
message.sampleValues.push(reader.string());
|
|
2931
|
-
continue;
|
|
2932
|
-
}
|
|
2933
|
-
}
|
|
2934
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2935
|
-
break;
|
|
2936
|
-
}
|
|
2937
|
-
reader.skip(tag & 7);
|
|
2938
|
-
}
|
|
2939
|
-
return message;
|
|
2940
|
-
},
|
|
2941
|
-
|
|
2942
|
-
fromJSON(object: any): DerivedMetricAttribute {
|
|
2943
|
-
return {
|
|
2944
|
-
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
2945
|
-
type: isSet(object.type) ? derivedMetricAttributeTypeFromJSON(object.type) : 0,
|
|
2946
|
-
sampleValues: globalThis.Array.isArray(object?.sampleValues)
|
|
2947
|
-
? object.sampleValues.map((e: any) => globalThis.String(e))
|
|
2948
|
-
: globalThis.Array.isArray(object?.sample_values)
|
|
2949
|
-
? object.sample_values.map((e: any) => globalThis.String(e))
|
|
2950
|
-
: [],
|
|
2951
|
-
};
|
|
2952
|
-
},
|
|
2953
|
-
|
|
2954
|
-
toJSON(message: DerivedMetricAttribute): unknown {
|
|
2955
|
-
const obj: any = {};
|
|
2956
|
-
if (message.key !== "") {
|
|
2957
|
-
obj.key = message.key;
|
|
2958
|
-
}
|
|
2959
|
-
if (message.type !== 0) {
|
|
2960
|
-
obj.type = derivedMetricAttributeTypeToJSON(message.type);
|
|
2961
|
-
}
|
|
2962
|
-
if (message.sampleValues?.length) {
|
|
2963
|
-
obj.sampleValues = message.sampleValues;
|
|
2964
|
-
}
|
|
2965
|
-
return obj;
|
|
2966
|
-
},
|
|
2967
|
-
|
|
2968
|
-
create<I extends Exact<DeepPartial<DerivedMetricAttribute>, I>>(base?: I): DerivedMetricAttribute {
|
|
2969
|
-
return DerivedMetricAttribute.fromPartial(base ?? ({} as any));
|
|
2970
|
-
},
|
|
2971
|
-
fromPartial<I extends Exact<DeepPartial<DerivedMetricAttribute>, I>>(object: I): DerivedMetricAttribute {
|
|
2972
|
-
const message = createBaseDerivedMetricAttribute();
|
|
2973
|
-
message.key = object.key ?? "";
|
|
2974
|
-
message.type = object.type ?? 0;
|
|
2975
|
-
message.sampleValues = object.sampleValues?.map((e) => e) || [];
|
|
2976
|
-
return message;
|
|
2977
|
-
},
|
|
2978
|
-
};
|
|
2979
|
-
|
|
2980
|
-
function createBaseDerivedMetricEventAttributes(): DerivedMetricEventAttributes {
|
|
2981
|
-
return { name: "", attributes: [] };
|
|
2982
|
-
}
|
|
2983
|
-
|
|
2984
|
-
export const DerivedMetricEventAttributes: MessageFns<DerivedMetricEventAttributes> = {
|
|
2985
|
-
encode(message: DerivedMetricEventAttributes, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2986
|
-
if (message.name !== "") {
|
|
2987
|
-
writer.uint32(10).string(message.name);
|
|
2988
|
-
}
|
|
2989
|
-
for (const v of message.attributes) {
|
|
2990
|
-
DerivedMetricAttribute.encode(v!, writer.uint32(18).fork()).join();
|
|
2991
|
-
}
|
|
2992
|
-
return writer;
|
|
2993
|
-
},
|
|
2994
|
-
|
|
2995
|
-
decode(input: BinaryReader | Uint8Array, length?: number): DerivedMetricEventAttributes {
|
|
2996
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2997
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2998
|
-
const message = createBaseDerivedMetricEventAttributes();
|
|
2999
|
-
while (reader.pos < end) {
|
|
3000
|
-
const tag = reader.uint32();
|
|
3001
|
-
switch (tag >>> 3) {
|
|
3002
|
-
case 1: {
|
|
3003
|
-
if (tag !== 10) {
|
|
3004
|
-
break;
|
|
3005
|
-
}
|
|
3006
|
-
|
|
3007
|
-
message.name = reader.string();
|
|
3008
|
-
continue;
|
|
3009
|
-
}
|
|
3010
|
-
case 2: {
|
|
3011
|
-
if (tag !== 18) {
|
|
3012
|
-
break;
|
|
3013
|
-
}
|
|
3014
|
-
|
|
3015
|
-
message.attributes.push(DerivedMetricAttribute.decode(reader, reader.uint32()));
|
|
3016
|
-
continue;
|
|
3017
|
-
}
|
|
3018
|
-
}
|
|
3019
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3020
|
-
break;
|
|
3021
|
-
}
|
|
3022
|
-
reader.skip(tag & 7);
|
|
3023
|
-
}
|
|
3024
|
-
return message;
|
|
3025
|
-
},
|
|
3026
|
-
|
|
3027
|
-
fromJSON(object: any): DerivedMetricEventAttributes {
|
|
3028
|
-
return {
|
|
3029
|
-
name: isSet(object.name) ? globalThis.String(object.name) : "",
|
|
3030
|
-
attributes: globalThis.Array.isArray(object?.attributes)
|
|
3031
|
-
? object.attributes.map((e: any) => DerivedMetricAttribute.fromJSON(e))
|
|
3032
|
-
: [],
|
|
3033
|
-
};
|
|
3034
|
-
},
|
|
3035
|
-
|
|
3036
|
-
toJSON(message: DerivedMetricEventAttributes): unknown {
|
|
3037
|
-
const obj: any = {};
|
|
3038
|
-
if (message.name !== "") {
|
|
3039
|
-
obj.name = message.name;
|
|
3040
|
-
}
|
|
3041
|
-
if (message.attributes?.length) {
|
|
3042
|
-
obj.attributes = message.attributes.map((e) => DerivedMetricAttribute.toJSON(e));
|
|
3043
|
-
}
|
|
3044
|
-
return obj;
|
|
3045
|
-
},
|
|
3046
|
-
|
|
3047
|
-
create<I extends Exact<DeepPartial<DerivedMetricEventAttributes>, I>>(base?: I): DerivedMetricEventAttributes {
|
|
3048
|
-
return DerivedMetricEventAttributes.fromPartial(base ?? ({} as any));
|
|
3049
|
-
},
|
|
3050
|
-
fromPartial<I extends Exact<DeepPartial<DerivedMetricEventAttributes>, I>>(object: I): DerivedMetricEventAttributes {
|
|
3051
|
-
const message = createBaseDerivedMetricEventAttributes();
|
|
3052
|
-
message.name = object.name ?? "";
|
|
3053
|
-
message.attributes = object.attributes?.map((e) => DerivedMetricAttribute.fromPartial(e)) || [];
|
|
3054
|
-
return message;
|
|
3055
|
-
},
|
|
3056
|
-
};
|
|
3057
|
-
|
|
3058
2525
|
/**
|
|
3059
2526
|
* DerivedMetricGatewayService provides web client access to derived metrics: definitions that turn
|
|
3060
2527
|
* each finished trace into one gauge datapoint. The resulting series is queried through
|
|
@@ -3068,14 +2535,6 @@ export interface DerivedMetricGatewayService {
|
|
|
3068
2535
|
DeleteDerivedMetric(request: DeleteDerivedMetricRequest, metadata?: Metadata): Promise<DeleteDerivedMetricResponse>;
|
|
3069
2536
|
/** Evaluates an unsaved program against recent finished traces; persists nothing. */
|
|
3070
2537
|
DryRunDerivedMetric(request: DryRunDerivedMetricRequest, metadata?: Metadata): Promise<DryRunDerivedMetricResponse>;
|
|
3071
|
-
/**
|
|
3072
|
-
* The authoring catalog: attribute keys, types and sample values observed on recent finished
|
|
3073
|
-
* traces -- trace-level and per-event -- so a builder offers real keys instead of free text.
|
|
3074
|
-
*/
|
|
3075
|
-
ListDerivedMetricAttributes(
|
|
3076
|
-
request: ListDerivedMetricAttributesRequest,
|
|
3077
|
-
metadata?: Metadata,
|
|
3078
|
-
): Promise<ListDerivedMetricAttributesResponse>;
|
|
3079
2538
|
}
|
|
3080
2539
|
|
|
3081
2540
|
export const DerivedMetricGatewayServiceServiceName = "gateway.web.v1.DerivedMetricGatewayService";
|
|
@@ -3091,7 +2550,6 @@ export class DerivedMetricGatewayServiceClientImpl implements DerivedMetricGatew
|
|
|
3091
2550
|
this.UpdateDerivedMetric = this.UpdateDerivedMetric.bind(this);
|
|
3092
2551
|
this.DeleteDerivedMetric = this.DeleteDerivedMetric.bind(this);
|
|
3093
2552
|
this.DryRunDerivedMetric = this.DryRunDerivedMetric.bind(this);
|
|
3094
|
-
this.ListDerivedMetricAttributes = this.ListDerivedMetricAttributes.bind(this);
|
|
3095
2553
|
}
|
|
3096
2554
|
CreateDerivedMetric(request: CreateDerivedMetricRequest, metadata?: Metadata): Promise<CreateDerivedMetricResponse> {
|
|
3097
2555
|
const data = CreateDerivedMetricRequest.encode(request).finish();
|
|
@@ -3128,15 +2586,6 @@ export class DerivedMetricGatewayServiceClientImpl implements DerivedMetricGatew
|
|
|
3128
2586
|
const promise = this.rpc.request(this.service, "DryRunDerivedMetric", data, metadata);
|
|
3129
2587
|
return promise.then((data) => DryRunDerivedMetricResponse.decode(new BinaryReader(data)));
|
|
3130
2588
|
}
|
|
3131
|
-
|
|
3132
|
-
ListDerivedMetricAttributes(
|
|
3133
|
-
request: ListDerivedMetricAttributesRequest,
|
|
3134
|
-
metadata?: Metadata,
|
|
3135
|
-
): Promise<ListDerivedMetricAttributesResponse> {
|
|
3136
|
-
const data = ListDerivedMetricAttributesRequest.encode(request).finish();
|
|
3137
|
-
const promise = this.rpc.request(this.service, "ListDerivedMetricAttributes", data, metadata);
|
|
3138
|
-
return promise.then((data) => ListDerivedMetricAttributesResponse.decode(new BinaryReader(data)));
|
|
3139
|
-
}
|
|
3140
2589
|
}
|
|
3141
2590
|
|
|
3142
2591
|
interface Rpc {
|
|
@@ -94,28 +94,6 @@ function deserialize_gateway_web_v1_GetDerivedMetricResponse(buffer_arg) {
|
|
|
94
94
|
return proto_gateway_web_v1_derived_metric_gateway_pb.GetDerivedMetricResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
function serialize_gateway_web_v1_ListDerivedMetricAttributesRequest(arg) {
|
|
98
|
-
if (!(arg instanceof proto_gateway_web_v1_derived_metric_gateway_pb.ListDerivedMetricAttributesRequest)) {
|
|
99
|
-
throw new Error('Expected argument of type gateway.web.v1.ListDerivedMetricAttributesRequest');
|
|
100
|
-
}
|
|
101
|
-
return Buffer.from(arg.serializeBinary());
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
function deserialize_gateway_web_v1_ListDerivedMetricAttributesRequest(buffer_arg) {
|
|
105
|
-
return proto_gateway_web_v1_derived_metric_gateway_pb.ListDerivedMetricAttributesRequest.deserializeBinary(new Uint8Array(buffer_arg));
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function serialize_gateway_web_v1_ListDerivedMetricAttributesResponse(arg) {
|
|
109
|
-
if (!(arg instanceof proto_gateway_web_v1_derived_metric_gateway_pb.ListDerivedMetricAttributesResponse)) {
|
|
110
|
-
throw new Error('Expected argument of type gateway.web.v1.ListDerivedMetricAttributesResponse');
|
|
111
|
-
}
|
|
112
|
-
return Buffer.from(arg.serializeBinary());
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
function deserialize_gateway_web_v1_ListDerivedMetricAttributesResponse(buffer_arg) {
|
|
116
|
-
return proto_gateway_web_v1_derived_metric_gateway_pb.ListDerivedMetricAttributesResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
|
117
|
-
}
|
|
118
|
-
|
|
119
97
|
function serialize_gateway_web_v1_ListDerivedMetricsRequest(arg) {
|
|
120
98
|
if (!(arg instanceof proto_gateway_web_v1_derived_metric_gateway_pb.ListDerivedMetricsRequest)) {
|
|
121
99
|
throw new Error('Expected argument of type gateway.web.v1.ListDerivedMetricsRequest');
|
|
@@ -232,19 +210,6 @@ dryRunDerivedMetric: {
|
|
|
232
210
|
responseSerialize: serialize_gateway_web_v1_DryRunDerivedMetricResponse,
|
|
233
211
|
responseDeserialize: deserialize_gateway_web_v1_DryRunDerivedMetricResponse,
|
|
234
212
|
},
|
|
235
|
-
// The authoring catalog: attribute keys, types and sample values observed on recent finished
|
|
236
|
-
// traces -- trace-level and per-event -- so a builder offers real keys instead of free text.
|
|
237
|
-
listDerivedMetricAttributes: {
|
|
238
|
-
path: '/gateway.web.v1.DerivedMetricGatewayService/ListDerivedMetricAttributes',
|
|
239
|
-
requestStream: false,
|
|
240
|
-
responseStream: false,
|
|
241
|
-
requestType: proto_gateway_web_v1_derived_metric_gateway_pb.ListDerivedMetricAttributesRequest,
|
|
242
|
-
responseType: proto_gateway_web_v1_derived_metric_gateway_pb.ListDerivedMetricAttributesResponse,
|
|
243
|
-
requestSerialize: serialize_gateway_web_v1_ListDerivedMetricAttributesRequest,
|
|
244
|
-
requestDeserialize: deserialize_gateway_web_v1_ListDerivedMetricAttributesRequest,
|
|
245
|
-
responseSerialize: serialize_gateway_web_v1_ListDerivedMetricAttributesResponse,
|
|
246
|
-
responseDeserialize: deserialize_gateway_web_v1_ListDerivedMetricAttributesResponse,
|
|
247
|
-
},
|
|
248
213
|
};
|
|
249
214
|
|
|
250
215
|
exports.DerivedMetricGatewayServiceClient = grpc.makeGenericClientConstructor(DerivedMetricGatewayServiceService, 'DerivedMetricGatewayService');
|