code: func InjectSpan(ctx context.Context) (context.Context, error) {
  	span := opentracing.SpanFromContext(ctx)
  	if span == nil {
  		return ctx, nil
  	}
  	spanData := opentracing.TextMapCarrier{}
  	tracer := opentracing.GlobalTracer()
  	err := tracer.Inject(span.Context(), opentracing.TextMap, spanData)
  	if err != nil {
  		return nil, err
  	}
  	return pcontext.AddToPropagateCtx(ctx, constants.SpanPropagateCtxKey, spanData), nil
  }
docs: // InjectSpan retrieves an opentrancing span from the current context and creates a new context
  // with it encoded in binary format inside the propagatable context content