tencentcloud-sdk-nodejs-apm 4.0.340 → 4.0.343

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.
@@ -27,18 +27,6 @@ class Client extends TencentCloudCommon.AbstractClient {
27
27
  constructor(clientConfig) {
28
28
  super("apm.tencentcloudapi.com", "2021-06-22", clientConfig);
29
29
  }
30
- /**
31
- * 业务购买APM实例,调用该接口创建
32
- */
33
- async CreateApmInstance(req, cb) {
34
- return this.request("CreateApmInstance", req, cb);
35
- }
36
- /**
37
- * 拉取通用指标列表
38
- */
39
- async DescribeMetricRecords(req, cb) {
40
- return this.request("DescribeMetricRecords", req, cb);
41
- }
42
30
  /**
43
31
  * APM实例列表拉取
44
32
  */
@@ -51,6 +39,25 @@ class Client extends TencentCloudCommon.AbstractClient {
51
39
  async DescribeApmAgent(req, cb) {
52
40
  return this.request("DescribeApmAgent", req, cb);
53
41
  }
42
+ /**
43
+ * 获取指标数据通用接口。用户根据需要上送请求参数,返回对应的指标数据。
44
+ 接口调用频率限制为:20次/秒,1200次/分钟。单请求的数据点数限制为1440个。
45
+ */
46
+ async DescribeGeneralMetricData(req, cb) {
47
+ return this.request("DescribeGeneralMetricData", req, cb);
48
+ }
49
+ /**
50
+ * 拉取通用指标列表
51
+ */
52
+ async DescribeMetricRecords(req, cb) {
53
+ return this.request("DescribeMetricRecords", req, cb);
54
+ }
55
+ /**
56
+ * 业务购买APM实例,调用该接口创建
57
+ */
58
+ async CreateApmInstance(req, cb) {
59
+ return this.request("CreateApmInstance", req, cb);
60
+ }
54
61
  /**
55
62
  * 服务概览数据拉取
56
63
  */
@@ -1,71 +1,3 @@
1
- /**
2
- * 指标列表单元
3
- */
4
- export interface ApmMetricRecord {
5
- /**
6
- * field数组
7
- */
8
- Fields: Array<ApmField>;
9
- /**
10
- * tag数组
11
- */
12
- Tags: Array<ApmTag>;
13
- }
14
- /**
15
- * CreateApmInstance返回参数结构体
16
- */
17
- export interface CreateApmInstanceResponse {
18
- /**
19
- * 实例ID
20
- 注意:此字段可能返回 null,表示取不到有效值。
21
- */
22
- InstanceId: string;
23
- /**
24
- * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
25
- */
26
- RequestId?: string;
27
- }
28
- /**
29
- * DescribeServiceOverview请求参数结构体
30
- */
31
- export interface DescribeServiceOverviewRequest {
32
- /**
33
- * 过滤条件
34
- */
35
- Filters: Array<Filter>;
36
- /**
37
- * 指标列表
38
- */
39
- Metrics: Array<QueryMetricItem>;
40
- /**
41
- * 聚合维度
42
- */
43
- GroupBy: Array<string>;
44
- /**
45
- * 排序
46
- */
47
- OrderBy?: OrderBy;
48
- /**
49
- * 实例ID
50
- */
51
- InstanceId?: string;
52
- /**
53
- * 每页大小
54
- */
55
- Limit?: number;
56
- /**
57
- * 开始时间
58
- */
59
- StartTime?: number;
60
- /**
61
- * 分页起始点
62
- */
63
- Offset?: number;
64
- /**
65
- * 结束时间
66
- */
67
- EndTime?: number;
68
- }
69
1
  /**
70
2
  * apm实例信息
71
3
  */
@@ -205,9 +137,9 @@ export interface CreateApmInstanceRequest {
205
137
  SpanDailyCounters?: number;
206
138
  }
207
139
  /**
208
- * DescribeMetricRecords返回参数结构体
140
+ * DescribeServiceOverview返回参数结构体
209
141
  */
210
- export interface DescribeMetricRecordsResponse {
142
+ export interface DescribeServiceOverviewResponse {
211
143
  /**
212
144
  * 指标结果集
213
145
  注意:此字段可能返回 null,表示取不到有效值。
@@ -219,131 +151,138 @@ export interface DescribeMetricRecordsResponse {
219
151
  RequestId?: string;
220
152
  }
221
153
  /**
222
- * DescribeApmAgent返回参数结构体
154
+ * 查询
223
155
  */
224
- export interface DescribeApmAgentResponse {
225
- /**
226
- * Agent信息
227
- 注意:此字段可能返回 null,表示取不到有效值。
228
- */
229
- ApmAgent: ApmAgentInfo;
156
+ export interface QueryMetricItem {
230
157
  /**
231
- * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
158
+ * 指标名
232
159
  */
233
- RequestId?: string;
234
- }
235
- /**
236
- * 维度(标签)对象
237
- */
238
- export interface ApmTag {
160
+ MetricName: string;
239
161
  /**
240
- * 维度Key(列名,标签Key)
162
+ * 同比,已弃用,不建议使用
241
163
  */
242
- Key: string;
164
+ Compare?: string;
243
165
  /**
244
- * 维度值(标签值)
166
+ * 同比,支持多种同比方式
245
167
  */
246
- Value: string;
168
+ Compares?: Array<string>;
247
169
  }
248
170
  /**
249
- * DescribeServiceOverview返回参数结构体
171
+ * DescribeApmInstances返回参数结构体
250
172
  */
251
- export interface DescribeServiceOverviewResponse {
173
+ export interface DescribeApmInstancesResponse {
252
174
  /**
253
- * 指标结果集
175
+ * apm实例列表
254
176
  注意:此字段可能返回 null,表示取不到有效值。
255
177
  */
256
- Records: Array<ApmMetricRecord>;
178
+ Instances: Array<ApmInstanceDetail>;
257
179
  /**
258
180
  * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
259
181
  */
260
182
  RequestId?: string;
261
183
  }
262
184
  /**
263
- * DescribeApmInstances返回参数结构体
185
+ * apm Agent信息
264
186
  */
265
- export interface DescribeApmInstancesResponse {
187
+ export interface ApmAgentInfo {
266
188
  /**
267
- * apm实例列表
189
+ * Agent下载地址
268
190
  注意:此字段可能返回 null,表示取不到有效值。
269
191
  */
270
- Instances: Array<ApmInstanceDetail>;
192
+ AgentDownloadURL: string;
271
193
  /**
272
- * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
273
- */
274
- RequestId?: string;
194
+ * Collector上报地址
195
+ 注意:此字段可能返回 null,表示取不到有效值。
196
+ */
197
+ CollectorURL: string;
198
+ /**
199
+ * Token信息
200
+ 注意:此字段可能返回 null,表示取不到有效值。
201
+ */
202
+ Token: string;
203
+ /**
204
+ * 外网上报地址
205
+ 注意:此字段可能返回 null,表示取不到有效值。
206
+ */
207
+ PublicCollectorURL: string;
208
+ /**
209
+ * 自研VPC上报地址
210
+ 注意:此字段可能返回 null,表示取不到有效值。
211
+ */
212
+ InnerCollectorURL: string;
213
+ /**
214
+ * 内网上报地址(Private Link上报地址)
215
+ 注意:此字段可能返回 null,表示取不到有效值。
216
+ */
217
+ PrivateLinkCollectorURL: string;
275
218
  }
276
219
  /**
277
- * 查询过滤参数
220
+ * 指标列表单元
278
221
  */
279
- export interface Filter {
280
- /**
281
- * 过滤方式(=, !=, in)
282
- */
283
- Type: string;
222
+ export interface ApmMetricRecord {
284
223
  /**
285
- * 过滤维度名
224
+ * field数组
286
225
  */
287
- Key: string;
226
+ Fields: Array<ApmField>;
288
227
  /**
289
- * 过滤值,in过滤方式用逗号分割多个值
228
+ * tag数组
290
229
  */
291
- Value: string;
230
+ Tags: Array<ApmTag>;
292
231
  }
293
232
  /**
294
- * DescribeApmAgent请求参数结构体
233
+ * DescribeServiceOverview请求参数结构体
295
234
  */
296
- export interface DescribeApmAgentRequest {
235
+ export interface DescribeServiceOverviewRequest {
297
236
  /**
298
- * 实例ID
237
+ * 过滤条件
299
238
  */
300
- InstanceId: string;
239
+ Filters: Array<Filter>;
301
240
  /**
302
- * 接入方式
241
+ * 指标列表
303
242
  */
304
- AgentType?: string;
243
+ Metrics: Array<QueryMetricItem>;
305
244
  /**
306
- * 环境
245
+ * 聚合维度
307
246
  */
308
- NetworkMode?: string;
247
+ GroupBy: Array<string>;
309
248
  /**
310
- * 语言
249
+ * 排序
311
250
  */
312
- LanguageEnvironment?: string;
313
- }
314
- /**
315
- * sql排序字段
316
- */
317
- export interface OrderBy {
251
+ OrderBy?: OrderBy;
318
252
  /**
319
- * 需要排序的字段
253
+ * 实例ID
320
254
  */
321
- Key: string;
255
+ InstanceId?: string;
322
256
  /**
323
- * 顺序排序/倒序排序
257
+ * 每页大小
324
258
  */
325
- Value: string;
326
- }
327
- /**
328
- * DescribeApmInstances请求参数结构体
329
- */
330
- export interface DescribeApmInstancesRequest {
259
+ Limit?: number;
331
260
  /**
332
- * Tag列表
261
+ * 开始时间
333
262
  */
334
- Tags?: Array<ApmTag>;
263
+ StartTime?: number;
335
264
  /**
336
- * 搜索实例名
265
+ * 分页起始点
337
266
  */
338
- InstanceName?: string;
267
+ Offset?: number;
339
268
  /**
340
- * 过滤实例ID
269
+ * 结束时间
341
270
  */
342
- InstanceIds?: Array<string>;
271
+ EndTime?: number;
272
+ }
273
+ /**
274
+ * DescribeApmAgent返回参数结构体
275
+ */
276
+ export interface DescribeApmAgentResponse {
343
277
  /**
344
- * 是否查询官方demo实例
278
+ * Agent信息
279
+ 注意:此字段可能返回 null,表示取不到有效值。
280
+ */
281
+ ApmAgent: ApmAgentInfo;
282
+ /**
283
+ * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
345
284
  */
346
- DemoInstanceFlag?: number;
285
+ RequestId?: string;
347
286
  }
348
287
  /**
349
288
  * 指标维度信息
@@ -374,6 +313,126 @@ export interface ApmField {
374
313
  */
375
314
  Key: string;
376
315
  }
316
+ /**
317
+ * 指标曲线数据
318
+ */
319
+ export interface Line {
320
+ /**
321
+ * 指标名
322
+ */
323
+ MetricName: string;
324
+ /**
325
+ * 指标中文名
326
+ */
327
+ MetricNameCN: string;
328
+ /**
329
+ * 时间序列
330
+ */
331
+ TimeSerial: Array<number>;
332
+ /**
333
+ * 数据序列
334
+ 注意:此字段可能返回 null,表示取不到有效值。
335
+ */
336
+ DataSerial: Array<number>;
337
+ /**
338
+ * 维度列表
339
+ 注意:此字段可能返回 null,表示取不到有效值。
340
+ */
341
+ Tags: Array<ApmTag>;
342
+ }
343
+ /**
344
+ * Apm通用KV结构
345
+ */
346
+ export interface APMKVItem {
347
+ /**
348
+ * Key值定义
349
+ 注意:此字段可能返回 null,表示取不到有效值。
350
+ */
351
+ Key: string;
352
+ /**
353
+ * Value值定义
354
+ 注意:此字段可能返回 null,表示取不到有效值。
355
+ */
356
+ Value: string;
357
+ }
358
+ /**
359
+ * sql排序字段
360
+ */
361
+ export interface OrderBy {
362
+ /**
363
+ * 需要排序的字段
364
+ */
365
+ Key: string;
366
+ /**
367
+ * 顺序排序/倒序排序
368
+ */
369
+ Value: string;
370
+ }
371
+ /**
372
+ * DescribeMetricRecords返回参数结构体
373
+ */
374
+ export interface DescribeMetricRecordsResponse {
375
+ /**
376
+ * 指标结果集
377
+ 注意:此字段可能返回 null,表示取不到有效值。
378
+ */
379
+ Records: Array<ApmMetricRecord>;
380
+ /**
381
+ * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
382
+ */
383
+ RequestId?: string;
384
+ }
385
+ /**
386
+ * 维度(标签)对象
387
+ */
388
+ export interface ApmTag {
389
+ /**
390
+ * 维度Key(列名,标签Key)
391
+ */
392
+ Key: string;
393
+ /**
394
+ * 维度值(标签值)
395
+ */
396
+ Value: string;
397
+ }
398
+ /**
399
+ * 查询过滤参数
400
+ */
401
+ export interface Filter {
402
+ /**
403
+ * 过滤方式(=, !=, in)
404
+ */
405
+ Type: string;
406
+ /**
407
+ * 过滤维度名
408
+ */
409
+ Key: string;
410
+ /**
411
+ * 过滤值,in过滤方式用逗号分割多个值
412
+ */
413
+ Value: string;
414
+ }
415
+ /**
416
+ * DescribeApmAgent请求参数结构体
417
+ */
418
+ export interface DescribeApmAgentRequest {
419
+ /**
420
+ * 实例ID
421
+ */
422
+ InstanceId: string;
423
+ /**
424
+ * 接入方式
425
+ */
426
+ AgentType?: string;
427
+ /**
428
+ * 环境
429
+ */
430
+ NetworkMode?: string;
431
+ /**
432
+ * 语言
433
+ */
434
+ LanguageEnvironment?: string;
435
+ }
377
436
  /**
378
437
  * DescribeMetricRecords请求参数结构体
379
438
  */
@@ -420,69 +479,108 @@ export interface DescribeMetricRecordsRequest {
420
479
  BusinessName?: string;
421
480
  }
422
481
  /**
423
- * apm Agent信息
482
+ * DescribeGeneralMetricData请求参数结构体
424
483
  */
425
- export interface ApmAgentInfo {
484
+ export interface DescribeGeneralMetricDataRequest {
426
485
  /**
427
- * Agent下载地址
428
- 注意:此字段可能返回 null,表示取不到有效值。
486
+ * 要过滤的维度信息,支持:service.name(服务名)、span.kind(客户端/服务端视角)为维度进行过滤。
487
+
488
+ span.kind:
489
+
490
+ server:服务端视角
491
+ client:客户端视角
492
+
493
+ 默认为服务端视角进行查询。
429
494
  */
430
- AgentDownloadURL: string;
495
+ Filters: Array<GeneralFilter>;
431
496
  /**
432
- * Collector上报地址
433
- 注意:此字段可能返回 null,表示取不到有效值。
434
- */
435
- CollectorURL: string;
497
+ * 需要查询的指标,不可自定义输入。支持:service_request_count(总请求)、service_duration(平均响应时间)的指标数据。
498
+ */
499
+ Metrics: Array<string>;
436
500
  /**
437
- * Token信息
438
- 注意:此字段可能返回 null,表示取不到有效值。
439
- */
440
- Token: string;
501
+ * 实例ID
502
+ */
503
+ InstanceId: string;
441
504
  /**
442
- * 外网上报地址
443
- 注意:此字段可能返回 null,表示取不到有效值。
444
- */
445
- PublicCollectorURL: string;
505
+ * 视图名称
506
+ */
507
+ ViewName: string;
446
508
  /**
447
- * 自研VPC上报地址
448
- 注意:此字段可能返回 null,表示取不到有效值。
449
- */
450
- InnerCollectorURL: string;
509
+ * 聚合维度,支持:service.name(服务名)、span.kind (客户端/服务端视角)维度进行聚合。
510
+ */
511
+ GroupBy?: Array<string>;
451
512
  /**
452
- * 内网上报地址(Private Link上报地址)
513
+ * 起始时间的时间戳,单位为秒,只支持查询2天内最多1小时的指标数据。
514
+ */
515
+ StartTime?: number;
516
+ /**
517
+ * 结束时间的时间戳,单位为秒,只支持查询2天内最多1小时的指标数据。
518
+ */
519
+ EndTime?: number;
520
+ /**
521
+ * 聚合粒度,单位为秒,最小为60s,即一分钟的聚合粒度;如果为空或0则计算开始时间到截止时间的指标数据,上报其他值会报错。
522
+ */
523
+ Period?: number;
524
+ }
525
+ /**
526
+ * CreateApmInstance返回参数结构体
527
+ */
528
+ export interface CreateApmInstanceResponse {
529
+ /**
530
+ * 实例ID
453
531
  注意:此字段可能返回 null,表示取不到有效值。
454
532
  */
455
- PrivateLinkCollectorURL: string;
533
+ InstanceId: string;
534
+ /**
535
+ * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
536
+ */
537
+ RequestId?: string;
456
538
  }
457
539
  /**
458
- * 查询
540
+ * 查询过滤参数
459
541
  */
460
- export interface QueryMetricItem {
542
+ export interface GeneralFilter {
461
543
  /**
462
- * 指标名
544
+ * 过滤维度名
463
545
  */
464
- MetricName: string;
546
+ Key: string;
465
547
  /**
466
- * 同比,已弃用,不建议使用
548
+ * 过滤值
467
549
  */
468
- Compare?: string;
550
+ Value: string;
551
+ }
552
+ /**
553
+ * DescribeApmInstances请求参数结构体
554
+ */
555
+ export interface DescribeApmInstancesRequest {
469
556
  /**
470
- * 同比,支持多种同比方式
557
+ * Tag列表
471
558
  */
472
- Compares?: Array<string>;
559
+ Tags?: Array<ApmTag>;
560
+ /**
561
+ * 搜索实例名
562
+ */
563
+ InstanceName?: string;
564
+ /**
565
+ * 过滤实例ID
566
+ */
567
+ InstanceIds?: Array<string>;
568
+ /**
569
+ * 是否查询官方demo实例
570
+ */
571
+ DemoInstanceFlag?: number;
473
572
  }
474
573
  /**
475
- * Apm通用KV结构
574
+ * DescribeGeneralMetricData返回参数结构体
476
575
  */
477
- export interface APMKVItem {
576
+ export interface DescribeGeneralMetricDataResponse {
478
577
  /**
479
- * Key值定义
578
+ * 指标结果集
480
579
  注意:此字段可能返回 null,表示取不到有效值。
481
580
  */
482
- Key: string;
581
+ Records: Array<Line>;
483
582
  /**
484
- * Value值定义
485
- 注意:此字段可能返回 null,表示取不到有效值。
486
- */
487
- Value: string;
583
+ * 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
584
+ */
585
+ RequestId?: string;
488
586
  }