import Span from '../../trace/span/Span' ; import { SpanCtorOptions } from './Span' ; import config from '../../config/AgentConfig' ; import { SpanType } from '../../proto/language-agent/Tracing_pb' ; import { ContextCarrier } from '../context/ContextCarrier' ; import ContextManager from '../context/ContextManager' ; export default class ExitSpan extends Span { constructor ( options ) { super ( Object . assign ( options , { type : SpanType . EXIT , } ) ) ; } inject ( ) { return new ContextCarrier ( this . context . segment . relatedTraces [ 0 ] , this . context . segment . segmentId , this . id , config . serviceName , config . serviceInstance , this . operation , this . peer , [ ] ) ; } }