logologo
开始
教程
手册
开发
插件
API
首页
English
简体中文
日本語
한국어
Español
Português
Deutsch
Français
Русский
开始
教程
手册
开发
插件
API
首页
logologo
API Overview

@nocobase/auth

AuthManager
Auth
BaseAuth

@nocobase/cache

CacheManager
Cache

@nocobase/cli

NocoBase CLI
全局环境变量

@nocobase/client

Application (Client)
Plugin (Client)

@nocobase/database

Collection
Field

interfaces

BaseInterface
Filter Operators

RelationRepository

BelongsToManyRepository
BelongsToRepository
HasManyRepository
HasOneRepository
Repository

Repository 共享参数

CreateOptions
DestroyOptions
FindOneOptions
FindOptions
Transaction 事务参数
UpdateOptions

@nocobase/data-source-manager

DataSourceManager
DataSource (abstract)
ICollectionManager
ICollection
IField
IModel
IRepository

@nocobase/flow-engine

DataSourceManager (FlowEngine)
FlowContext
FlowEngine
FlowModel
FlowResource

@nocobase/logger

Logger

@nocobase/server

AppCommand
Application (Server)
AuditManager
Context (Server)
Migration
Plugin (Server)

@nocobase/sdk

Auth (SDK)
Storage (SDK)

@nocobase/telemetry

Metric
Telemetry
Trace
Previous PageStorage (SDK)
Next PageTelemetry

#Metric

#类方法

#constructor()

构造函数,创建一个 Metric 实例。

#签名

  • constructor(options?: MetricOptions)

#类型

export type MetricOptions = {
  meterName?: string;
  version?: string;
  readerName?: string | string[];
};

#详细信息

属性类型描述默认值
meterNamestringmeter 标识nocobase-meter
versionstringNocoBase 当前版本号
readerNamestring | string[]想启用的已注册的 MetricReader 的标识

#init()

初始化 MetricProvider.

#签名

  • init(): void

#registerReader()

注册 MetricReader

#签名

  • registerReader(name: string, reader: GetMetricReader)

#类型

import { MetricReader } from '@opentelemetry/sdk-metrics';

type GetMetricReader = () => MetricReader;

#详细信息

参数类型描述
namestringMetricReader 唯一标识
processor() => MetricReader获取 MetricReader 的方法

#addView()

添加 View. 参考 Configure Metric Views.

#签名

  • addView(...view: View[])

#类型

import { View } from '@opentelemetry/sdk-metrics';

#getMeter()

获取 Meter.

#签名

  • getMeter(name?: string, version?: string)

#详细信息

参数类型描述默认值
namestringmeter 标识nocobase-meter
versionstringNocoBase 当前版本号

#start()

启动 MetricReader.

#签名

  • start(): void

#shutdown()

停止 MetricReader.

#签名

  • shutdown(): Promise<void>