code: func GetContextFromRequest(req *protos.Request, serverID string) (context.Context, error) {
  	ctx, err := pcontext.Decode(req.GetMetadata())
  	if err != nil {
  		return nil, err
  	}
  	if ctx == nil {
  		return nil, constants.ErrNoContextFound
  	}
  	tags := opentracing.Tags{
  		"local.id":     serverID,
  		"span.kind":    "server",
  		"peer.id":      pcontext.GetFromPropagateCtx(ctx, constants.PeerIDKey),
  		"peer.service": pcontext.GetFromPropagateCtx(ctx, constants.PeerServiceKey),
  		"request.id":   pcontext.GetFromPropagateCtx(ctx, constants.RequestIDKey),
  	}
  	parent, err := tracing.ExtractSpan(ctx)
  	if err != nil {
  		logger.Log.Warnf("failed to retrieve parent span: %s", err.Error())
  	}
  	ctx = tracing.StartSpan(ctx, req.GetMsg().GetRoute(), tags, parent)
  	ctx = CtxWithDefaultLogger(ctx, req.GetMsg().GetRoute(), "")
  	return ctx, nil
  }
docs: // GetContextFromRequest gets the context from a request