func rebuildCtx(inv *invocation.RPCInvocation) context.Context {
	ctx := context.WithValue(context.Background(), constant.DubboCtxKey("attachment"), inv.Attachments())

	// actually, if user do not use any opentracing framework, the err will not be nil.
	spanCtx, err := opentracing.GlobalTracer().Extract(opentracing.TextMap,
		opentracing.TextMapCarrier(filterContext(inv.Attachments())))
	if err == nil {
		ctx = context.WithValue(ctx, constant.DubboCtxKey(constant.TRACING_REMOTE_SPAN_CTX), spanCtx)
	}
	return ctx
}
// rebuildCtx rebuild the context by attachment.
// Once we decided to transfer more context's key-value, we should change this.
// now we only support rebuild the tracing context
rebuildCtx rebuild the context by attachment.
Once we decided to transfer more context's key-value, we should change this.
now we only support rebuild the tracing context
// rebuildCtx rebuild the context by attachment . // Once we decided to transfer more context ' s key - value we should change this . // now we only support rebuild the tracing context
func rebuildCtx(inv *invocation.RPCInvocation) context.Context {
	ctx := context.WithValue(context.Background(), constant.DubboCtxKey("attachment"), inv.Attachments())
	spanCtx, err := opentracing.GlobalTracer().Extract(opentracing.TextMap,
		opentracing.TextMapCarrier(filterContext(inv.Attachments())))
	if err == nil {
		ctx = context.WithValue(ctx, constant.DubboCtxKey(constant.TRACING_REMOTE_SPAN_CTX), spanCtx)
	}
	return ctx
}
func rebuildCtx ( inv * invocation . RPCInvocation ) context . Context { ctx := context . WithValue ( context . Background ( ) , constant . DubboCtxKey ( " " ) , inv . Attachments ( ) ) spanCtx , err := opentracing . GlobalTracer ( ) . Extract ( opentracing . TextMap , opentracing . TextMapCarrier ( filterContext ( inv . Attachments ( ) ) ) ) if err == nil { ctx = context . WithValue ( ctx , constant . DubboCtxKey ( constant . TRACING_REMOTE_SPAN_CTX ) , spanCtx ) } return ctx }
rebuildCtx rebuild the context by attachment.
rebuildCtx rebuild the context by attachment .
// actually, if user do not use any opentracing framework, the err will not be nil.