node-universe
Version:
基于 Nodejs 环境的一款微服务框架,原理来自于宇宙中的恒星,行星,卫星等系统。
61 lines (60 loc) • 1.73 kB
TypeScript
import { GenericObject } from '../../../typings';
import BaseTraceExporter from './base';
import Span from '../span';
import Tracer from '../tracer';
export default class NewRelicTraceExporter extends BaseTraceExporter {
queue: Array<Span>;
timer: any;
defaultTags: GenericObject;
constructor(options: GenericObject);
init(tracer: Tracer): void;
stop(): Promise<void>;
spanFinished(span: Span): void;
flush(): void;
generateTracingData(): {
name: string;
kind: string;
traceId: string | null;
id: string | null;
parentId: string | null;
localEndpoint: {
serviceName: string | null | undefined;
};
remoteEndpoint: {
serviceName: string | null | undefined;
};
annotations: any[];
timestamp: number | null;
duration: number | null;
tags: {
service: string | null | undefined;
'span.type': string;
};
debug: any;
shared: any;
}[];
makePayload(span: Span): {
name: string;
kind: string;
traceId: string | null;
id: string | null;
parentId: string | null;
localEndpoint: {
serviceName: string | null | undefined;
};
remoteEndpoint: {
serviceName: string | null | undefined;
};
annotations: any[];
timestamp: number | null;
duration: number | null;
tags: {
service: string | null | undefined;
'span.type': string;
};
debug: any;
shared: any;
};
convertID(id: string): string | null;
convertTime(ts: number): number | null;
}