@vtex/diagnostics-nodejs
Version:
Diagnostics library for Node.js applications
25 lines • 1.07 kB
TypeScript
import { Attributes, AttributeValue, Exception, Link, SpanContext, Span as SpanInterface, SpanKind, SpanStatus, TimeInput } from '@opentelemetry/api';
import { InternalSpan } from "../types";
export interface SpanEndOptions {
timestamp?: TimeInput;
}
export declare class Span implements SpanInterface, InternalSpan {
private _span;
name: string;
kind: SpanKind;
attributes: Attributes;
constructor(span: SpanInterface, name: string, kind?: SpanKind);
_getOtelSpan(): SpanInterface;
spanContext(): SpanContext;
setAttribute(key: string, value: AttributeValue): this;
setAttributes(attributes: Attributes): this;
addEvent(name: string, attributesOrStartTime?: Attributes | TimeInput, startTime?: TimeInput): this;
addLink(link: Link): this;
addLinks(links: Link[]): this;
setStatus(status: SpanStatus): this;
updateName(name: string): this;
end(endTime?: TimeInput): void;
isRecording(): boolean;
recordException(exception: Exception, time?: TimeInput): void;
}
//# sourceMappingURL=span.d.ts.map