UNPKG

node-universe

Version:

基于 Nodejs 环境的一款微服务框架,原理来自于宇宙中的恒星,行星,卫星等系统。

27 lines (26 loc) 944 B
import { GenericObject } from '../../typings'; import Star from '../star'; import { LoggerInstance } from '../../typings/logger'; import RateLimiter from './rate-limiter'; import { TraceExporter, TracerOptions } from '../../typings/tracing'; import Span from './span'; export default class Tracer { star: Star; logger: LoggerInstance; options: GenericObject; sampleCounter: number; rateLimiter: RateLimiter | null; defaultTags: GenericObject | Function | null; exporter: TraceExporter[] | null; constructor(star: Star, options: TracerOptions | boolean); init(): void; stop(): Promise<any>; isEnabled(): any; shouldSample(span: Span): boolean; startSpan(name: string, options?: GenericObject): Span; spanStarted(span: Span): void; spanFinished(span: Span): void; invokeExporter(method: string, args: Array<any>): void; getCurrentTraceID(): null; getActiveSpanID(): null; }