@miradorlabs/web-grpc 2.13.0 → 2.15.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/automation_gateway.ts +276 -0
- package/proto/gateway/web/v1/automation_gateway_pb.js +585 -12
- package/proto/gateway/web/v1/derived_metric_gateway.ts +0 -602
- package/proto/gateway/web/v1/derived_metric_gateway_grpc_pb.js +0 -35
- package/proto/gateway/web/v1/derived_metric_gateway_pb.js +5 -1105
- package/proto/gateway/web/v1/oauth_gateway.ts +908 -41
- package/proto/gateway/web/v1/oauth_gateway_grpc_pb.js +99 -0
- package/proto/gateway/web/v1/oauth_gateway_pb.js +1719 -1
- package/proto/gateway/web/v1/trace_gateway.ts +81 -72
- package/proto/gateway/web/v1/trace_gateway_grpc_pb.js +1 -0
- package/proto/gateway/web/v1/trace_gateway_pb.js +30 -28
- package/proto/gateway/web/v1/stream_gateway.ts +0 -2354
- package/proto/gateway/web/v1/stream_gateway_grpc_pb.js +0 -145
- package/proto/gateway/web/v1/stream_gateway_pb.js +0 -4593
|
@@ -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,59 +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
|
-
/**
|
|
413
|
-
* The bucket key: the event's sequencer-stamped selector (mirador_* platform slug, or the
|
|
414
|
-
* slugified author name for info/warn/error events).
|
|
415
|
-
*/
|
|
416
|
-
selector: string;
|
|
417
|
-
attributes: DerivedMetricAttribute[];
|
|
418
|
-
/**
|
|
419
|
-
* Raw author names observed under this selector (info/warn/error only; sorted, bounded).
|
|
420
|
-
* More than one means distinct spellings slugified to the same selector -- match a specific
|
|
421
|
-
* spelling with an e.name predicate.
|
|
422
|
-
*/
|
|
423
|
-
observedNames: string[];
|
|
424
|
-
/** True when more raw names were seen than observed_names holds. */
|
|
425
|
-
observedNamesTruncated: boolean;
|
|
426
|
-
}
|
|
427
|
-
|
|
428
317
|
function createBaseDerivedMetric(): DerivedMetric {
|
|
429
318
|
return {
|
|
430
319
|
id: "",
|
|
@@ -2633,479 +2522,6 @@ export const DerivedMetricOutcomeCount: MessageFns<DerivedMetricOutcomeCount> =
|
|
|
2633
2522
|
},
|
|
2634
2523
|
};
|
|
2635
2524
|
|
|
2636
|
-
function createBaseListDerivedMetricAttributesRequest(): ListDerivedMetricAttributesRequest {
|
|
2637
|
-
return { organizationId: "", projectId: "" };
|
|
2638
|
-
}
|
|
2639
|
-
|
|
2640
|
-
export const ListDerivedMetricAttributesRequest: MessageFns<ListDerivedMetricAttributesRequest> = {
|
|
2641
|
-
encode(message: ListDerivedMetricAttributesRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2642
|
-
if (message.organizationId !== "") {
|
|
2643
|
-
writer.uint32(10).string(message.organizationId);
|
|
2644
|
-
}
|
|
2645
|
-
if (message.projectId !== "") {
|
|
2646
|
-
writer.uint32(18).string(message.projectId);
|
|
2647
|
-
}
|
|
2648
|
-
return writer;
|
|
2649
|
-
},
|
|
2650
|
-
|
|
2651
|
-
decode(input: BinaryReader | Uint8Array, length?: number): ListDerivedMetricAttributesRequest {
|
|
2652
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2653
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2654
|
-
const message = createBaseListDerivedMetricAttributesRequest();
|
|
2655
|
-
while (reader.pos < end) {
|
|
2656
|
-
const tag = reader.uint32();
|
|
2657
|
-
switch (tag >>> 3) {
|
|
2658
|
-
case 1: {
|
|
2659
|
-
if (tag !== 10) {
|
|
2660
|
-
break;
|
|
2661
|
-
}
|
|
2662
|
-
|
|
2663
|
-
message.organizationId = reader.string();
|
|
2664
|
-
continue;
|
|
2665
|
-
}
|
|
2666
|
-
case 2: {
|
|
2667
|
-
if (tag !== 18) {
|
|
2668
|
-
break;
|
|
2669
|
-
}
|
|
2670
|
-
|
|
2671
|
-
message.projectId = reader.string();
|
|
2672
|
-
continue;
|
|
2673
|
-
}
|
|
2674
|
-
}
|
|
2675
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2676
|
-
break;
|
|
2677
|
-
}
|
|
2678
|
-
reader.skip(tag & 7);
|
|
2679
|
-
}
|
|
2680
|
-
return message;
|
|
2681
|
-
},
|
|
2682
|
-
|
|
2683
|
-
fromJSON(object: any): ListDerivedMetricAttributesRequest {
|
|
2684
|
-
return {
|
|
2685
|
-
organizationId: isSet(object.organizationId)
|
|
2686
|
-
? globalThis.String(object.organizationId)
|
|
2687
|
-
: isSet(object.organization_id)
|
|
2688
|
-
? globalThis.String(object.organization_id)
|
|
2689
|
-
: "",
|
|
2690
|
-
projectId: isSet(object.projectId)
|
|
2691
|
-
? globalThis.String(object.projectId)
|
|
2692
|
-
: isSet(object.project_id)
|
|
2693
|
-
? globalThis.String(object.project_id)
|
|
2694
|
-
: "",
|
|
2695
|
-
};
|
|
2696
|
-
},
|
|
2697
|
-
|
|
2698
|
-
toJSON(message: ListDerivedMetricAttributesRequest): unknown {
|
|
2699
|
-
const obj: any = {};
|
|
2700
|
-
if (message.organizationId !== "") {
|
|
2701
|
-
obj.organizationId = message.organizationId;
|
|
2702
|
-
}
|
|
2703
|
-
if (message.projectId !== "") {
|
|
2704
|
-
obj.projectId = message.projectId;
|
|
2705
|
-
}
|
|
2706
|
-
return obj;
|
|
2707
|
-
},
|
|
2708
|
-
|
|
2709
|
-
create<I extends Exact<DeepPartial<ListDerivedMetricAttributesRequest>, I>>(
|
|
2710
|
-
base?: I,
|
|
2711
|
-
): ListDerivedMetricAttributesRequest {
|
|
2712
|
-
return ListDerivedMetricAttributesRequest.fromPartial(base ?? ({} as any));
|
|
2713
|
-
},
|
|
2714
|
-
fromPartial<I extends Exact<DeepPartial<ListDerivedMetricAttributesRequest>, I>>(
|
|
2715
|
-
object: I,
|
|
2716
|
-
): ListDerivedMetricAttributesRequest {
|
|
2717
|
-
const message = createBaseListDerivedMetricAttributesRequest();
|
|
2718
|
-
message.organizationId = object.organizationId ?? "";
|
|
2719
|
-
message.projectId = object.projectId ?? "";
|
|
2720
|
-
return message;
|
|
2721
|
-
},
|
|
2722
|
-
};
|
|
2723
|
-
|
|
2724
|
-
function createBaseListDerivedMetricAttributesResponse(): ListDerivedMetricAttributesResponse {
|
|
2725
|
-
return {
|
|
2726
|
-
status: undefined,
|
|
2727
|
-
traceAttributes: [],
|
|
2728
|
-
events: [],
|
|
2729
|
-
tracesSampled: 0,
|
|
2730
|
-
tracesSelected: 0,
|
|
2731
|
-
catalogCapped: false,
|
|
2732
|
-
};
|
|
2733
|
-
}
|
|
2734
|
-
|
|
2735
|
-
export const ListDerivedMetricAttributesResponse: MessageFns<ListDerivedMetricAttributesResponse> = {
|
|
2736
|
-
encode(message: ListDerivedMetricAttributesResponse, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2737
|
-
if (message.status !== undefined) {
|
|
2738
|
-
ResponseStatus.encode(message.status, writer.uint32(10).fork()).join();
|
|
2739
|
-
}
|
|
2740
|
-
for (const v of message.traceAttributes) {
|
|
2741
|
-
DerivedMetricAttribute.encode(v!, writer.uint32(18).fork()).join();
|
|
2742
|
-
}
|
|
2743
|
-
for (const v of message.events) {
|
|
2744
|
-
DerivedMetricEventAttributes.encode(v!, writer.uint32(26).fork()).join();
|
|
2745
|
-
}
|
|
2746
|
-
if (message.tracesSampled !== 0) {
|
|
2747
|
-
writer.uint32(32).uint32(message.tracesSampled);
|
|
2748
|
-
}
|
|
2749
|
-
if (message.tracesSelected !== 0) {
|
|
2750
|
-
writer.uint32(40).uint32(message.tracesSelected);
|
|
2751
|
-
}
|
|
2752
|
-
if (message.catalogCapped !== false) {
|
|
2753
|
-
writer.uint32(48).bool(message.catalogCapped);
|
|
2754
|
-
}
|
|
2755
|
-
return writer;
|
|
2756
|
-
},
|
|
2757
|
-
|
|
2758
|
-
decode(input: BinaryReader | Uint8Array, length?: number): ListDerivedMetricAttributesResponse {
|
|
2759
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2760
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2761
|
-
const message = createBaseListDerivedMetricAttributesResponse();
|
|
2762
|
-
while (reader.pos < end) {
|
|
2763
|
-
const tag = reader.uint32();
|
|
2764
|
-
switch (tag >>> 3) {
|
|
2765
|
-
case 1: {
|
|
2766
|
-
if (tag !== 10) {
|
|
2767
|
-
break;
|
|
2768
|
-
}
|
|
2769
|
-
|
|
2770
|
-
message.status = ResponseStatus.decode(reader, reader.uint32());
|
|
2771
|
-
continue;
|
|
2772
|
-
}
|
|
2773
|
-
case 2: {
|
|
2774
|
-
if (tag !== 18) {
|
|
2775
|
-
break;
|
|
2776
|
-
}
|
|
2777
|
-
|
|
2778
|
-
message.traceAttributes.push(DerivedMetricAttribute.decode(reader, reader.uint32()));
|
|
2779
|
-
continue;
|
|
2780
|
-
}
|
|
2781
|
-
case 3: {
|
|
2782
|
-
if (tag !== 26) {
|
|
2783
|
-
break;
|
|
2784
|
-
}
|
|
2785
|
-
|
|
2786
|
-
message.events.push(DerivedMetricEventAttributes.decode(reader, reader.uint32()));
|
|
2787
|
-
continue;
|
|
2788
|
-
}
|
|
2789
|
-
case 4: {
|
|
2790
|
-
if (tag !== 32) {
|
|
2791
|
-
break;
|
|
2792
|
-
}
|
|
2793
|
-
|
|
2794
|
-
message.tracesSampled = reader.uint32();
|
|
2795
|
-
continue;
|
|
2796
|
-
}
|
|
2797
|
-
case 5: {
|
|
2798
|
-
if (tag !== 40) {
|
|
2799
|
-
break;
|
|
2800
|
-
}
|
|
2801
|
-
|
|
2802
|
-
message.tracesSelected = reader.uint32();
|
|
2803
|
-
continue;
|
|
2804
|
-
}
|
|
2805
|
-
case 6: {
|
|
2806
|
-
if (tag !== 48) {
|
|
2807
|
-
break;
|
|
2808
|
-
}
|
|
2809
|
-
|
|
2810
|
-
message.catalogCapped = reader.bool();
|
|
2811
|
-
continue;
|
|
2812
|
-
}
|
|
2813
|
-
}
|
|
2814
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2815
|
-
break;
|
|
2816
|
-
}
|
|
2817
|
-
reader.skip(tag & 7);
|
|
2818
|
-
}
|
|
2819
|
-
return message;
|
|
2820
|
-
},
|
|
2821
|
-
|
|
2822
|
-
fromJSON(object: any): ListDerivedMetricAttributesResponse {
|
|
2823
|
-
return {
|
|
2824
|
-
status: isSet(object.status) ? ResponseStatus.fromJSON(object.status) : undefined,
|
|
2825
|
-
traceAttributes: globalThis.Array.isArray(object?.traceAttributes)
|
|
2826
|
-
? object.traceAttributes.map((e: any) => DerivedMetricAttribute.fromJSON(e))
|
|
2827
|
-
: globalThis.Array.isArray(object?.trace_attributes)
|
|
2828
|
-
? object.trace_attributes.map((e: any) => DerivedMetricAttribute.fromJSON(e))
|
|
2829
|
-
: [],
|
|
2830
|
-
events: globalThis.Array.isArray(object?.events)
|
|
2831
|
-
? object.events.map((e: any) => DerivedMetricEventAttributes.fromJSON(e))
|
|
2832
|
-
: [],
|
|
2833
|
-
tracesSampled: isSet(object.tracesSampled)
|
|
2834
|
-
? globalThis.Number(object.tracesSampled)
|
|
2835
|
-
: isSet(object.traces_sampled)
|
|
2836
|
-
? globalThis.Number(object.traces_sampled)
|
|
2837
|
-
: 0,
|
|
2838
|
-
tracesSelected: isSet(object.tracesSelected)
|
|
2839
|
-
? globalThis.Number(object.tracesSelected)
|
|
2840
|
-
: isSet(object.traces_selected)
|
|
2841
|
-
? globalThis.Number(object.traces_selected)
|
|
2842
|
-
: 0,
|
|
2843
|
-
catalogCapped: isSet(object.catalogCapped)
|
|
2844
|
-
? globalThis.Boolean(object.catalogCapped)
|
|
2845
|
-
: isSet(object.catalog_capped)
|
|
2846
|
-
? globalThis.Boolean(object.catalog_capped)
|
|
2847
|
-
: false,
|
|
2848
|
-
};
|
|
2849
|
-
},
|
|
2850
|
-
|
|
2851
|
-
toJSON(message: ListDerivedMetricAttributesResponse): unknown {
|
|
2852
|
-
const obj: any = {};
|
|
2853
|
-
if (message.status !== undefined) {
|
|
2854
|
-
obj.status = ResponseStatus.toJSON(message.status);
|
|
2855
|
-
}
|
|
2856
|
-
if (message.traceAttributes?.length) {
|
|
2857
|
-
obj.traceAttributes = message.traceAttributes.map((e) => DerivedMetricAttribute.toJSON(e));
|
|
2858
|
-
}
|
|
2859
|
-
if (message.events?.length) {
|
|
2860
|
-
obj.events = message.events.map((e) => DerivedMetricEventAttributes.toJSON(e));
|
|
2861
|
-
}
|
|
2862
|
-
if (message.tracesSampled !== 0) {
|
|
2863
|
-
obj.tracesSampled = Math.round(message.tracesSampled);
|
|
2864
|
-
}
|
|
2865
|
-
if (message.tracesSelected !== 0) {
|
|
2866
|
-
obj.tracesSelected = Math.round(message.tracesSelected);
|
|
2867
|
-
}
|
|
2868
|
-
if (message.catalogCapped !== false) {
|
|
2869
|
-
obj.catalogCapped = message.catalogCapped;
|
|
2870
|
-
}
|
|
2871
|
-
return obj;
|
|
2872
|
-
},
|
|
2873
|
-
|
|
2874
|
-
create<I extends Exact<DeepPartial<ListDerivedMetricAttributesResponse>, I>>(
|
|
2875
|
-
base?: I,
|
|
2876
|
-
): ListDerivedMetricAttributesResponse {
|
|
2877
|
-
return ListDerivedMetricAttributesResponse.fromPartial(base ?? ({} as any));
|
|
2878
|
-
},
|
|
2879
|
-
fromPartial<I extends Exact<DeepPartial<ListDerivedMetricAttributesResponse>, I>>(
|
|
2880
|
-
object: I,
|
|
2881
|
-
): ListDerivedMetricAttributesResponse {
|
|
2882
|
-
const message = createBaseListDerivedMetricAttributesResponse();
|
|
2883
|
-
message.status = (object.status !== undefined && object.status !== null)
|
|
2884
|
-
? ResponseStatus.fromPartial(object.status)
|
|
2885
|
-
: undefined;
|
|
2886
|
-
message.traceAttributes = object.traceAttributes?.map((e) => DerivedMetricAttribute.fromPartial(e)) || [];
|
|
2887
|
-
message.events = object.events?.map((e) => DerivedMetricEventAttributes.fromPartial(e)) || [];
|
|
2888
|
-
message.tracesSampled = object.tracesSampled ?? 0;
|
|
2889
|
-
message.tracesSelected = object.tracesSelected ?? 0;
|
|
2890
|
-
message.catalogCapped = object.catalogCapped ?? false;
|
|
2891
|
-
return message;
|
|
2892
|
-
},
|
|
2893
|
-
};
|
|
2894
|
-
|
|
2895
|
-
function createBaseDerivedMetricAttribute(): DerivedMetricAttribute {
|
|
2896
|
-
return { key: "", type: 0, sampleValues: [] };
|
|
2897
|
-
}
|
|
2898
|
-
|
|
2899
|
-
export const DerivedMetricAttribute: MessageFns<DerivedMetricAttribute> = {
|
|
2900
|
-
encode(message: DerivedMetricAttribute, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2901
|
-
if (message.key !== "") {
|
|
2902
|
-
writer.uint32(10).string(message.key);
|
|
2903
|
-
}
|
|
2904
|
-
if (message.type !== 0) {
|
|
2905
|
-
writer.uint32(16).int32(message.type);
|
|
2906
|
-
}
|
|
2907
|
-
for (const v of message.sampleValues) {
|
|
2908
|
-
writer.uint32(26).string(v!);
|
|
2909
|
-
}
|
|
2910
|
-
return writer;
|
|
2911
|
-
},
|
|
2912
|
-
|
|
2913
|
-
decode(input: BinaryReader | Uint8Array, length?: number): DerivedMetricAttribute {
|
|
2914
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
2915
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
2916
|
-
const message = createBaseDerivedMetricAttribute();
|
|
2917
|
-
while (reader.pos < end) {
|
|
2918
|
-
const tag = reader.uint32();
|
|
2919
|
-
switch (tag >>> 3) {
|
|
2920
|
-
case 1: {
|
|
2921
|
-
if (tag !== 10) {
|
|
2922
|
-
break;
|
|
2923
|
-
}
|
|
2924
|
-
|
|
2925
|
-
message.key = reader.string();
|
|
2926
|
-
continue;
|
|
2927
|
-
}
|
|
2928
|
-
case 2: {
|
|
2929
|
-
if (tag !== 16) {
|
|
2930
|
-
break;
|
|
2931
|
-
}
|
|
2932
|
-
|
|
2933
|
-
message.type = reader.int32() as any;
|
|
2934
|
-
continue;
|
|
2935
|
-
}
|
|
2936
|
-
case 3: {
|
|
2937
|
-
if (tag !== 26) {
|
|
2938
|
-
break;
|
|
2939
|
-
}
|
|
2940
|
-
|
|
2941
|
-
message.sampleValues.push(reader.string());
|
|
2942
|
-
continue;
|
|
2943
|
-
}
|
|
2944
|
-
}
|
|
2945
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
2946
|
-
break;
|
|
2947
|
-
}
|
|
2948
|
-
reader.skip(tag & 7);
|
|
2949
|
-
}
|
|
2950
|
-
return message;
|
|
2951
|
-
},
|
|
2952
|
-
|
|
2953
|
-
fromJSON(object: any): DerivedMetricAttribute {
|
|
2954
|
-
return {
|
|
2955
|
-
key: isSet(object.key) ? globalThis.String(object.key) : "",
|
|
2956
|
-
type: isSet(object.type) ? derivedMetricAttributeTypeFromJSON(object.type) : 0,
|
|
2957
|
-
sampleValues: globalThis.Array.isArray(object?.sampleValues)
|
|
2958
|
-
? object.sampleValues.map((e: any) => globalThis.String(e))
|
|
2959
|
-
: globalThis.Array.isArray(object?.sample_values)
|
|
2960
|
-
? object.sample_values.map((e: any) => globalThis.String(e))
|
|
2961
|
-
: [],
|
|
2962
|
-
};
|
|
2963
|
-
},
|
|
2964
|
-
|
|
2965
|
-
toJSON(message: DerivedMetricAttribute): unknown {
|
|
2966
|
-
const obj: any = {};
|
|
2967
|
-
if (message.key !== "") {
|
|
2968
|
-
obj.key = message.key;
|
|
2969
|
-
}
|
|
2970
|
-
if (message.type !== 0) {
|
|
2971
|
-
obj.type = derivedMetricAttributeTypeToJSON(message.type);
|
|
2972
|
-
}
|
|
2973
|
-
if (message.sampleValues?.length) {
|
|
2974
|
-
obj.sampleValues = message.sampleValues;
|
|
2975
|
-
}
|
|
2976
|
-
return obj;
|
|
2977
|
-
},
|
|
2978
|
-
|
|
2979
|
-
create<I extends Exact<DeepPartial<DerivedMetricAttribute>, I>>(base?: I): DerivedMetricAttribute {
|
|
2980
|
-
return DerivedMetricAttribute.fromPartial(base ?? ({} as any));
|
|
2981
|
-
},
|
|
2982
|
-
fromPartial<I extends Exact<DeepPartial<DerivedMetricAttribute>, I>>(object: I): DerivedMetricAttribute {
|
|
2983
|
-
const message = createBaseDerivedMetricAttribute();
|
|
2984
|
-
message.key = object.key ?? "";
|
|
2985
|
-
message.type = object.type ?? 0;
|
|
2986
|
-
message.sampleValues = object.sampleValues?.map((e) => e) || [];
|
|
2987
|
-
return message;
|
|
2988
|
-
},
|
|
2989
|
-
};
|
|
2990
|
-
|
|
2991
|
-
function createBaseDerivedMetricEventAttributes(): DerivedMetricEventAttributes {
|
|
2992
|
-
return { selector: "", attributes: [], observedNames: [], observedNamesTruncated: false };
|
|
2993
|
-
}
|
|
2994
|
-
|
|
2995
|
-
export const DerivedMetricEventAttributes: MessageFns<DerivedMetricEventAttributes> = {
|
|
2996
|
-
encode(message: DerivedMetricEventAttributes, writer: BinaryWriter = new BinaryWriter()): BinaryWriter {
|
|
2997
|
-
if (message.selector !== "") {
|
|
2998
|
-
writer.uint32(10).string(message.selector);
|
|
2999
|
-
}
|
|
3000
|
-
for (const v of message.attributes) {
|
|
3001
|
-
DerivedMetricAttribute.encode(v!, writer.uint32(18).fork()).join();
|
|
3002
|
-
}
|
|
3003
|
-
for (const v of message.observedNames) {
|
|
3004
|
-
writer.uint32(26).string(v!);
|
|
3005
|
-
}
|
|
3006
|
-
if (message.observedNamesTruncated !== false) {
|
|
3007
|
-
writer.uint32(32).bool(message.observedNamesTruncated);
|
|
3008
|
-
}
|
|
3009
|
-
return writer;
|
|
3010
|
-
},
|
|
3011
|
-
|
|
3012
|
-
decode(input: BinaryReader | Uint8Array, length?: number): DerivedMetricEventAttributes {
|
|
3013
|
-
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
3014
|
-
const end = length === undefined ? reader.len : reader.pos + length;
|
|
3015
|
-
const message = createBaseDerivedMetricEventAttributes();
|
|
3016
|
-
while (reader.pos < end) {
|
|
3017
|
-
const tag = reader.uint32();
|
|
3018
|
-
switch (tag >>> 3) {
|
|
3019
|
-
case 1: {
|
|
3020
|
-
if (tag !== 10) {
|
|
3021
|
-
break;
|
|
3022
|
-
}
|
|
3023
|
-
|
|
3024
|
-
message.selector = reader.string();
|
|
3025
|
-
continue;
|
|
3026
|
-
}
|
|
3027
|
-
case 2: {
|
|
3028
|
-
if (tag !== 18) {
|
|
3029
|
-
break;
|
|
3030
|
-
}
|
|
3031
|
-
|
|
3032
|
-
message.attributes.push(DerivedMetricAttribute.decode(reader, reader.uint32()));
|
|
3033
|
-
continue;
|
|
3034
|
-
}
|
|
3035
|
-
case 3: {
|
|
3036
|
-
if (tag !== 26) {
|
|
3037
|
-
break;
|
|
3038
|
-
}
|
|
3039
|
-
|
|
3040
|
-
message.observedNames.push(reader.string());
|
|
3041
|
-
continue;
|
|
3042
|
-
}
|
|
3043
|
-
case 4: {
|
|
3044
|
-
if (tag !== 32) {
|
|
3045
|
-
break;
|
|
3046
|
-
}
|
|
3047
|
-
|
|
3048
|
-
message.observedNamesTruncated = reader.bool();
|
|
3049
|
-
continue;
|
|
3050
|
-
}
|
|
3051
|
-
}
|
|
3052
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
3053
|
-
break;
|
|
3054
|
-
}
|
|
3055
|
-
reader.skip(tag & 7);
|
|
3056
|
-
}
|
|
3057
|
-
return message;
|
|
3058
|
-
},
|
|
3059
|
-
|
|
3060
|
-
fromJSON(object: any): DerivedMetricEventAttributes {
|
|
3061
|
-
return {
|
|
3062
|
-
selector: isSet(object.selector) ? globalThis.String(object.selector) : "",
|
|
3063
|
-
attributes: globalThis.Array.isArray(object?.attributes)
|
|
3064
|
-
? object.attributes.map((e: any) => DerivedMetricAttribute.fromJSON(e))
|
|
3065
|
-
: [],
|
|
3066
|
-
observedNames: globalThis.Array.isArray(object?.observedNames)
|
|
3067
|
-
? object.observedNames.map((e: any) => globalThis.String(e))
|
|
3068
|
-
: globalThis.Array.isArray(object?.observed_names)
|
|
3069
|
-
? object.observed_names.map((e: any) => globalThis.String(e))
|
|
3070
|
-
: [],
|
|
3071
|
-
observedNamesTruncated: isSet(object.observedNamesTruncated)
|
|
3072
|
-
? globalThis.Boolean(object.observedNamesTruncated)
|
|
3073
|
-
: isSet(object.observed_names_truncated)
|
|
3074
|
-
? globalThis.Boolean(object.observed_names_truncated)
|
|
3075
|
-
: false,
|
|
3076
|
-
};
|
|
3077
|
-
},
|
|
3078
|
-
|
|
3079
|
-
toJSON(message: DerivedMetricEventAttributes): unknown {
|
|
3080
|
-
const obj: any = {};
|
|
3081
|
-
if (message.selector !== "") {
|
|
3082
|
-
obj.selector = message.selector;
|
|
3083
|
-
}
|
|
3084
|
-
if (message.attributes?.length) {
|
|
3085
|
-
obj.attributes = message.attributes.map((e) => DerivedMetricAttribute.toJSON(e));
|
|
3086
|
-
}
|
|
3087
|
-
if (message.observedNames?.length) {
|
|
3088
|
-
obj.observedNames = message.observedNames;
|
|
3089
|
-
}
|
|
3090
|
-
if (message.observedNamesTruncated !== false) {
|
|
3091
|
-
obj.observedNamesTruncated = message.observedNamesTruncated;
|
|
3092
|
-
}
|
|
3093
|
-
return obj;
|
|
3094
|
-
},
|
|
3095
|
-
|
|
3096
|
-
create<I extends Exact<DeepPartial<DerivedMetricEventAttributes>, I>>(base?: I): DerivedMetricEventAttributes {
|
|
3097
|
-
return DerivedMetricEventAttributes.fromPartial(base ?? ({} as any));
|
|
3098
|
-
},
|
|
3099
|
-
fromPartial<I extends Exact<DeepPartial<DerivedMetricEventAttributes>, I>>(object: I): DerivedMetricEventAttributes {
|
|
3100
|
-
const message = createBaseDerivedMetricEventAttributes();
|
|
3101
|
-
message.selector = object.selector ?? "";
|
|
3102
|
-
message.attributes = object.attributes?.map((e) => DerivedMetricAttribute.fromPartial(e)) || [];
|
|
3103
|
-
message.observedNames = object.observedNames?.map((e) => e) || [];
|
|
3104
|
-
message.observedNamesTruncated = object.observedNamesTruncated ?? false;
|
|
3105
|
-
return message;
|
|
3106
|
-
},
|
|
3107
|
-
};
|
|
3108
|
-
|
|
3109
2525
|
/**
|
|
3110
2526
|
* DerivedMetricGatewayService provides web client access to derived metrics: definitions that turn
|
|
3111
2527
|
* each finished trace into one gauge datapoint. The resulting series is queried through
|
|
@@ -3119,14 +2535,6 @@ export interface DerivedMetricGatewayService {
|
|
|
3119
2535
|
DeleteDerivedMetric(request: DeleteDerivedMetricRequest, metadata?: Metadata): Promise<DeleteDerivedMetricResponse>;
|
|
3120
2536
|
/** Evaluates an unsaved program against recent finished traces; persists nothing. */
|
|
3121
2537
|
DryRunDerivedMetric(request: DryRunDerivedMetricRequest, metadata?: Metadata): Promise<DryRunDerivedMetricResponse>;
|
|
3122
|
-
/**
|
|
3123
|
-
* The authoring catalog: attribute keys, types and sample values observed on recent finished
|
|
3124
|
-
* traces -- trace-level and per-event -- so a builder offers real keys instead of free text.
|
|
3125
|
-
*/
|
|
3126
|
-
ListDerivedMetricAttributes(
|
|
3127
|
-
request: ListDerivedMetricAttributesRequest,
|
|
3128
|
-
metadata?: Metadata,
|
|
3129
|
-
): Promise<ListDerivedMetricAttributesResponse>;
|
|
3130
2538
|
}
|
|
3131
2539
|
|
|
3132
2540
|
export const DerivedMetricGatewayServiceServiceName = "gateway.web.v1.DerivedMetricGatewayService";
|
|
@@ -3142,7 +2550,6 @@ export class DerivedMetricGatewayServiceClientImpl implements DerivedMetricGatew
|
|
|
3142
2550
|
this.UpdateDerivedMetric = this.UpdateDerivedMetric.bind(this);
|
|
3143
2551
|
this.DeleteDerivedMetric = this.DeleteDerivedMetric.bind(this);
|
|
3144
2552
|
this.DryRunDerivedMetric = this.DryRunDerivedMetric.bind(this);
|
|
3145
|
-
this.ListDerivedMetricAttributes = this.ListDerivedMetricAttributes.bind(this);
|
|
3146
2553
|
}
|
|
3147
2554
|
CreateDerivedMetric(request: CreateDerivedMetricRequest, metadata?: Metadata): Promise<CreateDerivedMetricResponse> {
|
|
3148
2555
|
const data = CreateDerivedMetricRequest.encode(request).finish();
|
|
@@ -3179,15 +2586,6 @@ export class DerivedMetricGatewayServiceClientImpl implements DerivedMetricGatew
|
|
|
3179
2586
|
const promise = this.rpc.request(this.service, "DryRunDerivedMetric", data, metadata);
|
|
3180
2587
|
return promise.then((data) => DryRunDerivedMetricResponse.decode(new BinaryReader(data)));
|
|
3181
2588
|
}
|
|
3182
|
-
|
|
3183
|
-
ListDerivedMetricAttributes(
|
|
3184
|
-
request: ListDerivedMetricAttributesRequest,
|
|
3185
|
-
metadata?: Metadata,
|
|
3186
|
-
): Promise<ListDerivedMetricAttributesResponse> {
|
|
3187
|
-
const data = ListDerivedMetricAttributesRequest.encode(request).finish();
|
|
3188
|
-
const promise = this.rpc.request(this.service, "ListDerivedMetricAttributes", data, metadata);
|
|
3189
|
-
return promise.then((data) => ListDerivedMetricAttributesResponse.decode(new BinaryReader(data)));
|
|
3190
|
-
}
|
|
3191
2589
|
}
|
|
3192
2590
|
|
|
3193
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');
|