@daocloud-proto/insight 0.17.2 → 0.18.0-dev1

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.
@@ -4,6 +4,7 @@
4
4
  * This file is a generated Typescript file for GRPC Gateway, DO NOT MODIFY
5
5
  */
6
6
 
7
+ import * as InsightIoApiMetricV1alpha1Metric from "../../metric/v1alpha1/metric.pb"
7
8
  import * as InsightIoApiTypeV1alpha1Page from "../../type/v1alpha1/page.pb"
8
9
  import * as InsightIoApiAlertV1alpha1Notify from "./notify.pb"
9
10
  import * as InsightIoApiAlertV1alpha1Type from "./type.pb"
@@ -120,7 +121,7 @@ export type RuleSummary = {
120
121
  status?: InsightIoApiAlertV1alpha1Type.RuleStatus
121
122
  description?: string
122
123
  createAt?: string
123
- logFilterCondition?: string
124
+ logFilterCondition?: InsightIoApiAlertV1alpha1Type.RuleFilterCondition
124
125
  logQueryString?: string
125
126
  }
126
127
 
@@ -310,4 +311,31 @@ export type AlertHistoryRetentionPeriod = {
310
311
 
311
312
  export type CleanAlertHistoryResponse = {
312
313
  num?: string
314
+ }
315
+
316
+ export type PreviewRuleRequestGroup = {
317
+ clusterName?: string
318
+ namespace?: string
319
+ targetType?: InsightIoApiAlertV1alpha1Type.TargetType
320
+ targets?: string[]
321
+ }
322
+
323
+ export type PreviewRuleRequestParam = {
324
+ start?: string
325
+ end?: string
326
+ step?: number
327
+ }
328
+
329
+ export type PreviewRuleRequest = {
330
+ param?: PreviewRuleRequestParam
331
+ group?: PreviewRuleRequestGroup
332
+ rule?: CreateGroupRule
333
+ }
334
+
335
+ export type PreviewRuleResponse = {
336
+ matrix?: InsightIoApiMetricV1alpha1Metric.SampleStream
337
+ }
338
+
339
+ export type GetSMTPStatusResponse = {
340
+ enabled?: boolean
313
341
  }
@@ -107,6 +107,9 @@ export class Alert {
107
107
  static CreateGroup(req: InsightIoApiAlertV1alpha1Alert.CreateGroupRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.Group> {
108
108
  return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.CreateGroupRequest, InsightIoApiAlertV1alpha1Alert.Group>(`/apis/insight.io/v1alpha1/alert/groups`, {...initReq, method: "POST", body: JSON.stringify(req)})
109
109
  }
110
+ static PreviewRule(req: InsightIoApiAlertV1alpha1Alert.PreviewRuleRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.PreviewRuleResponse> {
111
+ return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.PreviewRuleRequest, InsightIoApiAlertV1alpha1Alert.PreviewRuleResponse>(`/apis/insight.io/v1alpha1/alert/rules/preview`, {...initReq, method: "POST", body: JSON.stringify(req)})
112
+ }
110
113
  static GetGroup(req: InsightIoApiAlertV1alpha1Alert.ID, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.Group> {
111
114
  return fm.fetchReq<InsightIoApiAlertV1alpha1Alert.ID, InsightIoApiAlertV1alpha1Alert.Group>(`/apis/insight.io/v1alpha1/alert/groups/${req["id"]}?${fm.renderURLSearchParams(req, ["id"])}`, {...initReq, method: "GET"})
112
115
  }
@@ -170,6 +173,9 @@ export class Alert {
170
173
  static DeleteReceiver(req: InsightIoApiAlertV1alpha1Notify.DeleteReceiversRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Notify.ReceiverDataResponse> {
171
174
  return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.DeleteReceiversRequest, InsightIoApiAlertV1alpha1Notify.ReceiverDataResponse>(`/apis/insight.io/v1alpha1/alert/receivers/${req["name"]}`, {...initReq, method: "DELETE"})
172
175
  }
176
+ static GetSMTPStatus(req: empty, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Alert.GetSMTPStatusResponse> {
177
+ return fm.fetchReq<empty, InsightIoApiAlertV1alpha1Alert.GetSMTPStatusResponse>(`/apis/insight.io/v1alpha1/alert/smtp?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
178
+ }
173
179
  static ListProviders(req: InsightIoApiAlertV1alpha1Notify.ListProvidersRequest, initReq?: fm.InitReq): Promise<InsightIoApiAlertV1alpha1Notify.ListProvidersResponse> {
174
180
  return fm.fetchReq<InsightIoApiAlertV1alpha1Notify.ListProvidersRequest, InsightIoApiAlertV1alpha1Notify.ListProvidersResponse>(`/apis/insight.io/v1alpha1/alert/providers?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
175
181
  }
@@ -349,8 +355,8 @@ export class Tracing {
349
355
  static GetServices(req: InsightIoApiSpan_metricV1alpha1Span_metric.GetServicesRequest, initReq?: fm.InitReq): Promise<InsightIoApiSpan_metricV1alpha1Span_metric.GetServicesResponse> {
350
356
  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"})
351
357
  }
352
- static QueryOperations(req: InsightIoApiTracingV1alpha1Tracing.QueryBaseRequest, initReq?: fm.InitReq): Promise<InsightIoApiTracingV1alpha1Tracing.OperationsQueryResponse> {
353
- return fm.fetchReq<InsightIoApiTracingV1alpha1Tracing.QueryBaseRequest, InsightIoApiTracingV1alpha1Tracing.OperationsQueryResponse>(`/apis/insight.io/v1alpha1/traces/operations?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
358
+ static QueryOperations(req: InsightIoApiTracingV1alpha1Tracing.QueryOperationsRequest, initReq?: fm.InitReq): Promise<InsightIoApiTracingV1alpha1Tracing.QueryOperationsResponse> {
359
+ return fm.fetchReq<InsightIoApiTracingV1alpha1Tracing.QueryOperationsRequest, InsightIoApiTracingV1alpha1Tracing.QueryOperationsResponse>(`/apis/insight.io/v1alpha1/traces/clusters/${req["clusterName"]}/operations?${fm.renderURLSearchParams(req, ["clusterName"])}`, {...initReq, method: "GET"})
354
360
  }
355
361
  static FindJaegerTraces(req: InsightIoApiTracingV1alpha1Query.TraceQueryParameters, initReq?: fm.InitReq): Promise<InsightIoApiTracingV1alpha1Query.TracesResponseChunk> {
356
362
  return fm.fetchReq<InsightIoApiTracingV1alpha1Query.TraceQueryParameters, InsightIoApiTracingV1alpha1Query.TracesResponseChunk>(`/apis/insight.io/v1alpha1/jaeger/v2/traces?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
@@ -364,8 +370,8 @@ export class Tracing {
364
370
  static GetServiceDetail(req: InsightIoApiSpan_metricV1alpha1Span_metric.MetricsQueryBaseRequest, initReq?: fm.InitReq): Promise<InsightIoApiSpan_metricV1alpha1Span_metric.GetServiceDetailResponse> {
365
371
  return fm.fetchReq<InsightIoApiSpan_metricV1alpha1Span_metric.MetricsQueryBaseRequest, InsightIoApiSpan_metricV1alpha1Span_metric.GetServiceDetailResponse>(`/apis/insight.io/v1alpha1/traces/service-detail?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
366
372
  }
367
- static GetOperationDetail(req: InsightIoApiSpan_metricV1alpha1Span_metric.MetricsQueryBaseRequest, initReq?: fm.InitReq): Promise<InsightIoApiSpan_metricV1alpha1Span_metric.GetOperationDetailResponse> {
368
- return fm.fetchReq<InsightIoApiSpan_metricV1alpha1Span_metric.MetricsQueryBaseRequest, InsightIoApiSpan_metricV1alpha1Span_metric.GetOperationDetailResponse>(`/apis/insight.io/v1alpha1/traces/operation-detail?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
373
+ static GetOperationDetail(req: InsightIoApiSpan_metricV1alpha1Span_metric.GetOperationDetailRequest, initReq?: fm.InitReq): Promise<InsightIoApiSpan_metricV1alpha1Span_metric.GetOperationDetailResponse> {
374
+ return fm.fetchReq<InsightIoApiSpan_metricV1alpha1Span_metric.GetOperationDetailRequest, InsightIoApiSpan_metricV1alpha1Span_metric.GetOperationDetailResponse>(`/apis/insight.io/v1alpha1/traces/operation-detail?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
369
375
  }
370
376
  }
371
377
  export class ServiceGraph {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/insight",
3
- "version":"0.17.2",
3
+ "version":"0.18.0-dev1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -46,35 +46,43 @@ type BaseGetApdexRequest = {
46
46
  export type GetApdexRequest = BaseGetApdexRequest
47
47
  & OneOf<{ cluster: string; clusterName: string }>
48
48
 
49
+ export type GetServiceDetailResponse = {
50
+ p95Metrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
51
+ p75Metrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
52
+ p50Metrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
53
+ reqRateMetric?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
54
+ errorsRateMetrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
55
+ }
56
+
57
+ export type GetOperationDetailRequest = {
58
+ clusterName?: string
59
+ namespace?: string
60
+ serviceName?: string
61
+ sort?: string
62
+ page?: number
63
+ pageSize?: number
64
+ extensionFilters?: string
65
+ endTime?: string
66
+ lookback?: string
67
+ step?: string
68
+ ratePer?: string
69
+ spanKinds?: InsightIoApiSpan_metricV1alpha1Otelspankind.SpanKind[]
70
+ }
71
+
49
72
  export type MetricsWithOperation = {
50
73
  operationName?: string
74
+ metricsMap?: {[key: string]: MetricsEntity}
51
75
  spanKind?: InsightIoApiSpan_metricV1alpha1Otelspankind.SpanKind
52
- metricGroups?: MetricsGroup[]
53
76
  }
54
77
 
55
- export type MetricsGroup = {
78
+ export type MetricsEntity = {
56
79
  metrics?: InsightIoApiMetricV1alpha1Metric.samplePair[]
57
- metricsLabel?: string
58
80
  metricsAvg?: number
59
81
  }
60
82
 
61
- export type GetServiceDetailResponse = {
62
- p95Metrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
63
- p75Metrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
64
- p50Metrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
65
- reqRateMetric?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
66
- repLatencyMetric?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
67
- errorsRateMetrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
68
- totalCallsMetrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
69
- avgReqRate?: number
70
- avgRepLatency?: number
71
- avgErrorRate?: number
72
- totalCalls?: number
73
- apdex?: number
74
- }
75
-
76
83
  export type GetOperationDetailResponse = {
77
84
  metrics?: MetricsWithOperation[]
85
+ pagination?: InsightIoApiTypeV1alpha1Page.Pagination
78
86
  }
79
87
 
80
88
  export type GetServicesRequest = {
@@ -78,7 +78,7 @@ export type Trace = {
78
78
  traceId?: string
79
79
  status?: TraceTraceStatus
80
80
  spanCount?: number
81
- startTime?: GoogleProtobufTimestamp.Timestamp
81
+ startTime?: string
82
82
  duration?: string
83
83
  }
84
84
 
@@ -32,7 +32,13 @@ export type BatchQueryBaseRequest = {
32
32
  serviceName?: string[]
33
33
  }
34
34
 
35
- export type OperationsQueryResponse = {
35
+ export type QueryOperationsRequest = {
36
+ clusterName?: string
37
+ namespace?: string
38
+ serviceName?: string
39
+ }
40
+
41
+ export type QueryOperationsResponse = {
36
42
  operations?: string[]
37
43
  }
38
44
 
@@ -48,10 +54,6 @@ export type TraceRequestById = BaseTraceRequestById
48
54
  export type ListServiceNamesRequest = {
49
55
  clusterName?: string
50
56
  namespace?: string
51
- serviceName?: string
52
- spanKind?: InsightIoApiSpan_metricV1alpha1Otelspankind.SpanKind[]
53
- start?: string
54
- end?: string
55
57
  }
56
58
 
57
59
  export type GetServiceNamesResponse = {