import { Context } from '../context/types'; import { Span } from './span'; import { SpanOptions } from './SpanOptions'; /** * Tracer provides an interface for creating {@link Span}s. */ export interface Tracer { /** * Starts a new {@link Span}. Start the span without setting it on context. * * This method do NOT modify the current Context. * * @param name The name of the span * @param [options] SpanOptions used for span creation * @param [context] Context to use to extract parent * @returns Span The newly created span * @example * const span = tracer.startSpan('op'); * span.setAttribute('key', 'value'); * span.end(); */ startSpan(name: string, options?: SpanOptions, context?: Context): Span; }