@daocloud-proto/insight 0.7.8 → 0.8.0-13
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.
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import * as fm from "../../fetch.pb"
|
|
8
|
+
import * as InsightIoApiMetricV1alpha1Metric from "../../metric/v1alpha1/metric.pb"
|
|
8
9
|
|
|
9
10
|
export enum NodeType {
|
|
10
11
|
NODE_TYPE_UNSPECIFIED = "NODE_TYPE_UNSPECIFIED",
|
|
@@ -90,8 +91,28 @@ export type BaseGraphQuery = {
|
|
|
90
91
|
extensionFilters?: string
|
|
91
92
|
}
|
|
92
93
|
|
|
94
|
+
export type BaseMetricsQuery = {
|
|
95
|
+
clusters?: string
|
|
96
|
+
namespaces?: string
|
|
97
|
+
services?: string
|
|
98
|
+
extensionFilters?: string
|
|
99
|
+
endTime?: string
|
|
100
|
+
lookback?: string
|
|
101
|
+
step?: string
|
|
102
|
+
ratePer?: string
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export type ServiceREDMetricResponse = {
|
|
106
|
+
reqRateMetric?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
|
|
107
|
+
errorsRateMetrics?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
|
|
108
|
+
repLatencyMetric?: InsightIoApiMetricV1alpha1Metric.SampleStream[]
|
|
109
|
+
}
|
|
110
|
+
|
|
93
111
|
export class GraphQueryService {
|
|
94
112
|
static GetGraph(req: BaseGraphQuery, initReq?: fm.InitReq): Promise<Graph> {
|
|
95
113
|
return fm.fetchReq<BaseGraphQuery, Graph>(`/apis/insight.io/v1alpha1/service_graph/graph?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
96
114
|
}
|
|
115
|
+
static GetREDMetrics(req: BaseMetricsQuery, initReq?: fm.InitReq): Promise<ServiceREDMetricResponse> {
|
|
116
|
+
return fm.fetchReq<BaseMetricsQuery, ServiceREDMetricResponse>(`/apis/insight.io/v1alpha1/service_graph/service-RED-metrics?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
117
|
+
}
|
|
97
118
|
}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import * as InsightIoApiFeature_gateV1alpha1Feature_gate from "../../feature_gate/v1alpha1/feature_gate.pb"
|
|
8
8
|
import * as fm from "../../fetch.pb"
|
|
9
|
+
import * as InsightIoApiGraphV1alpha1Graph from "../../graph/v1alpha1/graph.pb"
|
|
9
10
|
import * as InsightIoApiLogV1alpha1Log from "../../log/v1alpha1/log.pb"
|
|
10
11
|
import * as InsightIoApiMetricV1alpha1Metric from "../../metric/v1alpha1/metric.pb"
|
|
11
12
|
import * as InsightIoApiResourceV1alpha1Cluster from "../../resource/v1alpha1/cluster.pb"
|
|
@@ -42,6 +43,19 @@ export type GlobalConfig = {
|
|
|
42
43
|
traceApdexThreshold?: string
|
|
43
44
|
}
|
|
44
45
|
|
|
46
|
+
export type userinfo = {
|
|
47
|
+
name?: string
|
|
48
|
+
isAdmin?: boolean
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type helmInstallConfigRequest = {
|
|
52
|
+
version?: string
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type helmInstallConfigResponse = {
|
|
56
|
+
values?: string
|
|
57
|
+
}
|
|
58
|
+
|
|
45
59
|
export class Insight {
|
|
46
60
|
static GetVersion(req: empty, initReq?: fm.InitReq): Promise<VersionInfo> {
|
|
47
61
|
return fm.fetchReq<empty, VersionInfo>(`/apis/insight.io/v1alpha1/version?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
@@ -49,6 +63,12 @@ export class Insight {
|
|
|
49
63
|
static GetGlobalConfig(req: empty, initReq?: fm.InitReq): Promise<GlobalConfig> {
|
|
50
64
|
return fm.fetchReq<empty, GlobalConfig>(`/apis/insight.io/v1alpha1/config?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
51
65
|
}
|
|
66
|
+
static GetUserinfo(req: empty, initReq?: fm.InitReq): Promise<userinfo> {
|
|
67
|
+
return fm.fetchReq<empty, userinfo>(`/apis/insight.io/v1alpha1/userinfo?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
68
|
+
}
|
|
69
|
+
static GetHelmInstallConfig(req: helmInstallConfigRequest, initReq?: fm.InitReq): Promise<helmInstallConfigResponse> {
|
|
70
|
+
return fm.fetchReq<helmInstallConfigRequest, helmInstallConfigResponse>(`/apis/insight.io/v1alpha1/agentinstallparam?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
71
|
+
}
|
|
52
72
|
}
|
|
53
73
|
export class FeatureGatesService {
|
|
54
74
|
static GetFeatureGates(req: empty, initReq?: fm.InitReq): Promise<InsightIoApiFeature_gateV1alpha1Feature_gate.FeatureGatesResp> {
|
|
@@ -130,6 +150,9 @@ export class Log {
|
|
|
130
150
|
static QueryLogContext(req: InsightIoApiLogV1alpha1Log.QueryLogContextRequest, initReq?: fm.InitReq): Promise<InsightIoApiLogV1alpha1Log.QueryLogResponse> {
|
|
131
151
|
return fm.fetchReq<InsightIoApiLogV1alpha1Log.QueryLogContextRequest, InsightIoApiLogV1alpha1Log.QueryLogResponse>(`/apis/insight.io/v1alpha1/log/context`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
132
152
|
}
|
|
153
|
+
static DownloadLog(req: InsightIoApiLogV1alpha1Log.DownloadLogRequest, initReq?: fm.InitReq): Promise<InsightIoApiLogV1alpha1Log.DownloadLogResponse> {
|
|
154
|
+
return fm.fetchReq<InsightIoApiLogV1alpha1Log.DownloadLogRequest, InsightIoApiLogV1alpha1Log.DownloadLogResponse>(`/apis/insight.io/v1alpha1/log/export`, {...initReq, method: "POST", body: JSON.stringify(req)})
|
|
155
|
+
}
|
|
133
156
|
static ListLogFilePaths(req: empty, initReq?: fm.InitReq): Promise<InsightIoApiLogV1alpha1Log.ListLogFilePathsResponse> {
|
|
134
157
|
return fm.fetchReq<empty, InsightIoApiLogV1alpha1Log.ListLogFilePathsResponse>(`/apis/insight.io/v1alpha1/log/filepaths?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
135
158
|
}
|
|
@@ -247,4 +270,9 @@ export class Tracing {
|
|
|
247
270
|
static GetOperationDetail(req: InsightIoApiSpan_metricV1alpha1Span_metric.MetricsQueryBaseRequest, initReq?: fm.InitReq): Promise<InsightIoApiSpan_metricV1alpha1Span_metric.GetOperationDetailResponse> {
|
|
248
271
|
return fm.fetchReq<InsightIoApiSpan_metricV1alpha1Span_metric.MetricsQueryBaseRequest, InsightIoApiSpan_metricV1alpha1Span_metric.GetOperationDetailResponse>(`/apis/insight.io/v1alpha1/traces/operation-detail?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
249
272
|
}
|
|
273
|
+
}
|
|
274
|
+
export class GraphQueryService {
|
|
275
|
+
static GetGraph(req: InsightIoApiGraphV1alpha1Graph.BaseGraphQuery, initReq?: fm.InitReq): Promise<InsightIoApiGraphV1alpha1Graph.Graph> {
|
|
276
|
+
return fm.fetchReq<InsightIoApiGraphV1alpha1Graph.BaseGraphQuery, InsightIoApiGraphV1alpha1Graph.Graph>(`/apis/insight.io/v1alpha1/service_graph/graph?${fm.renderURLSearchParams(req, [])}`, {...initReq, method: "GET"})
|
|
277
|
+
}
|
|
250
278
|
}
|
package/log/v1alpha1/log.pb.ts
CHANGED
|
@@ -14,6 +14,13 @@ type OneOf<T> =
|
|
|
14
14
|
(K extends string & keyof T ? { [k in K]: T[K] } & Absent<T, K>
|
|
15
15
|
: never)
|
|
16
16
|
: never);
|
|
17
|
+
|
|
18
|
+
export enum DownloadFileType {
|
|
19
|
+
TEXT = "TEXT",
|
|
20
|
+
CSV = "CSV",
|
|
21
|
+
JSON = "JSON",
|
|
22
|
+
}
|
|
23
|
+
|
|
17
24
|
export type SearchLogRequest = {
|
|
18
25
|
index?: string
|
|
19
26
|
query?: string
|
|
@@ -117,6 +124,16 @@ export type LogHistogramResult = {
|
|
|
117
124
|
count?: string
|
|
118
125
|
}
|
|
119
126
|
|
|
127
|
+
export type DownloadLogRequest = {
|
|
128
|
+
type?: DownloadFileType
|
|
129
|
+
queryLog?: QueryLogRequest
|
|
130
|
+
queryLogConext?: QueryLogContextRequest
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export type DownloadLogResponse = {
|
|
134
|
+
url?: string
|
|
135
|
+
}
|
|
136
|
+
|
|
120
137
|
export type ListLogFilePathsResponse = {
|
|
121
138
|
paths?: string[]
|
|
122
139
|
}
|
package/package.json
CHANGED