@daocloud-proto/insight 0.12.2-100 → 0.12.2-104

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.
@@ -270,8 +270,11 @@ export class Resource {
270
270
  }
271
271
  }
272
272
  export class Tracing {
273
- static ListServices(req: InsightIoApiTracingV1alpha1Tracing.ListServicesRequest, initReq?: fm.InitReq): Promise<InsightIoApiTracingV1alpha1Query.GetServicesResponse> {
274
- return fm.fetchReq<InsightIoApiTracingV1alpha1Tracing.ListServicesRequest, InsightIoApiTracingV1alpha1Query.GetServicesResponse>(`/apis/insight.io/v1alpha1/traces/clusters/${req["cluster"]}/services?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
273
+ static ListServiceNames(req: InsightIoApiTracingV1alpha1Tracing.ListServiceNamesRequest, initReq?: fm.InitReq): Promise<InsightIoApiTracingV1alpha1Tracing.GetServiceNamesResponse> {
274
+ return fm.fetchReq<InsightIoApiTracingV1alpha1Tracing.ListServiceNamesRequest, InsightIoApiTracingV1alpha1Tracing.GetServiceNamesResponse>(`/apis/insight.io/v1alpha1/traces/clusters/${req["clusterName"]}/service-names?${fm.renderURLSearchParams(req, ["clusterName"])}`, {...initReq, method: "GET"})
275
+ }
276
+ static GetServices(req: InsightIoApiSpan_metricV1alpha1Span_metric.GetServicesRequest, initReq?: fm.InitReq): Promise<InsightIoApiSpan_metricV1alpha1Span_metric.GetServicesResponse> {
277
+ return fm.fetchReq<InsightIoApiSpan_metricV1alpha1Span_metric.GetServicesRequest, InsightIoApiSpan_metricV1alpha1Span_metric.GetServicesResponse>(`/apis/insight.io/v1alpha1/traces/clusters/${req["clusterName"]}/services?${fm.renderURLSearchParams(req, ["clusterName"])}`, {...initReq, method: "GET"})
275
278
  }
276
279
  static QueryOperations(req: InsightIoApiTracingV1alpha1Tracing.QueryBaseRequest, initReq?: fm.InitReq): Promise<InsightIoApiTracingV1alpha1Tracing.OperationsQueryResponse> {
277
280
  return fm.fetchReq<InsightIoApiTracingV1alpha1Tracing.QueryBaseRequest, InsightIoApiTracingV1alpha1Tracing.OperationsQueryResponse>(`/apis/insight.io/v1alpha1/traces/operations?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/insight",
3
- "version":"0.12.2-100",
3
+ "version":"0.12.2-104",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -5,6 +5,7 @@
5
5
  */
6
6
 
7
7
  import * as InsightIoApiMetricV1alpha1Metric from "../../metric/v1alpha1/metric.pb"
8
+ import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb"
8
9
  import * as InsightIoApiSpan_metricV1alpha1Otelspankind from "./otelspankind.pb"
9
10
 
10
11
  type Absent<T, K extends keyof T> = { [k in Exclude<keyof T, K>]?: undefined };
@@ -74,4 +75,29 @@ export type GetServiceDetailResponse = {
74
75
 
75
76
  export type GetOperationDetailResponse = {
76
77
  metrics?: MetricsWithOperation[]
78
+ }
79
+
80
+ export type GetServicesRequest = {
81
+ namespace?: string
82
+ extensionFilters?: string
83
+ endTime?: string
84
+ lookback?: string
85
+ spanKinds?: InsightIoApiSpan_metricV1alpha1Otelspankind.SpanKind[]
86
+ page?: number
87
+ pageSize?: number
88
+ sort?: string
89
+ clusterName?: string
90
+ }
91
+
92
+ export type ServiceItem = {
93
+ serviceName?: string
94
+ namespace?: string
95
+ reqRate?: number
96
+ repLatency?: number
97
+ errorRate?: number
98
+ }
99
+
100
+ export type GetServicesResponse = {
101
+ items?: ServiceItem[]
102
+ pagination?: InsightIoApiTypeV1alpha1Page.Pagination
77
103
  }
@@ -40,11 +40,4 @@ export type TraceQueryParameters = BaseTraceQueryParameters
40
40
 
41
41
  export type FindTracesRequest = {
42
42
  query?: TraceQueryParameters
43
- }
44
-
45
- export type GetServicesRequest = {
46
- }
47
-
48
- export type GetServicesResponse = {
49
- services?: string[]
50
43
  }
@@ -51,11 +51,15 @@ type BaseTraceRequestById = {
51
51
  export type TraceRequestById = BaseTraceRequestById
52
52
  & OneOf<{ cluster: string; clusterName: string }>
53
53
 
54
- export type ListServicesRequest = {
55
- cluster?: string
54
+ export type ListServiceNamesRequest = {
55
+ clusterName?: string
56
56
  namespace?: string
57
57
  serviceName?: string
58
58
  spanKind?: InsightIoApiSpan_metricV1alpha1Otelspankind.SpanKind[]
59
59
  start?: string
60
60
  end?: string
61
+ }
62
+
63
+ export type GetServiceNamesResponse = {
64
+ services?: string[]
61
65
  }