How to add packages to Photon Load balancing application and rebuild it

I need to add AWS X-Ray package to photon Load Balancing application to start collecting the traces for client to Photon communication as in latencies and stuff.
On Aws X-Ray documentation it's mentioned that one should use NuGet Package manager to add AWSXRayRecoder to the project but when i tried to do that using NuGet console it resulted in no default project error.

Can someone help with how i can add AWS X-Ray package to the Load Balancing project and rebuild the project.

P.s I am new to c# and .Net world and learning my way through it. Please bear with me if it's a noob question.


  • hi, @Sandeepgahlawat

    our sdk contains sources in src-server folder. In src-server/LoadBalancing you may find LoadBalancing.sln

    open it and modify as you need

  • Hi @chvetsov
    Thank you for the quick reply.

    After your reply I double-clicked on the LoadBalancing.sln file inside "src-server/Loadbalancing" and then from there I could access the Nuget Package Manager and using it I successfully added the AWS XRay package into the loadbalancing project.

    Now I tried rebuilding the project and I right-clicked on the solution and hit Build and it successfully built the project into "src-server/Loadbalancing/Loadbalancing/bin" but I deploy photon using PhotonControl.exe present inside "deploy/bin_win64". So does that mean I need to manually cut and paste the bin folder inside the "src-server/Loadbalancing/Loadbalancing/bin" to "deploy/Loadbalancing/Master/bin" or is there another elegant way of doing this?

    Also, if I try to use deploy.prompter.cmd inside "deploy/" then it does not work for me and throws MSBUILD : error MSB1009: Project file does not exist.

    My last question, I need to trace the requests unity clients make to the photon. So if you can help guide me on which files I should check, for adding XRay code, for tracing requests or operations.

    P.s I know some of the stuff I asked for may sound stupid but I am new to dot Net and Photon
  • hi, @Sandeepgahlawat

    what version of sdk are you using? in general, you are on right path. deploy/build/deploy.prompter.cmd is right tool to build deploy package. Not sure why it does not work. However you may copy bin folder to deploy/LoadBalancing/Master/bin

    I'm not very familiar with client side and can not give you a good advice. Please use client section of forum to ask questions about client side

  • Hi @chvetsov
    I am using version 4 of the SDK.
    I need to register x-ray SDK to collect traces. For this, there are snippets available on X-ray github

    `using Amazon.XRay.Recorder.Handler.Http;

    public static class WebApiConfig
    public static void Register(HttpConfiguration config)
    config.MessageHandlers.Add(new TracingMessageHandler());

    I need to do something like this in order to start collecting traces. Now, first of all, the using statement shows a linting error saying not found but I successfully added the AWSRecoder package using NuGet.

    Secondly, I am not able to find any HttpConfiguration file. If you can please point me to the correct file or folder in the source code.

    And lastly, is registering x-ray inside HTTP configuration like above is enough to trace UDP traces as well, or is there another configuration file for that and if yes where can I find it.

    Thanks in advance

  • hi, @Sandeepgahlawat

    I tried to use deploy.prompter.cmd and used option 4 to build LoadBalancing. it just works. so, not sure what error you get. Please provide it if you need help with it

    I do not know how to use that xray stuff. You have to find out your self. I doubt that xray will trace UDP. and not even sure why do you need this.

Sign In or Register to comment.