@embrace-io/web-sdk
Version:
25 lines • 1.27 kB
TypeScript
import type { Exception, Link, Attributes, AttributeValue, SpanContext, SpanStatus, TimeInput } from '@opentelemetry/api';
import { type Span } from '@opentelemetry/api';
import type { ExtendedSpan, ExtendedSpanFailedOptions } from '../../api-traces/index.js';
/**
* EmbraceSpan for the most part simply delegates to the underlying Span it receives on initialization so
* that it satisfies the Span interface. In addition, it gives us a spot where we can implement helpers that are part
* of the EmbraceSpan interface.
*/
export declare class EmbraceExtendedSpan implements ExtendedSpan {
private readonly _span;
constructor(span: Span);
addEvent(name: string, attributesOrStartTime?: Attributes | TimeInput, startTime?: TimeInput): this;
addLink(link: Link): this;
addLinks(links: Link[]): this;
end(endTime?: TimeInput): void;
isRecording(): boolean;
recordException(exception: Exception, time?: TimeInput): void;
setAttribute(key: string, value: AttributeValue): this;
setAttributes(attributes: Attributes): this;
setStatus(status: SpanStatus): this;
spanContext(): SpanContext;
updateName(name: string): this;
fail(options?: ExtendedSpanFailedOptions): void;
}
//# sourceMappingURL=EmbraceExtendedSpan.d.ts.map