How to track session across several web apps, multiple microservices












1















I would like to track a session across multiple web applications, multiple microservices. All of my web applications are static files and microservices are running under nodejs containers with Kubernetes.



I have tracking setup across separate web applications and separate microservices. But it too cumbersome to merge and view everything in a single view.



Is there any approach to view all of them under single session?










share|improve this question



























    1















    I would like to track a session across multiple web applications, multiple microservices. All of my web applications are static files and microservices are running under nodejs containers with Kubernetes.



    I have tracking setup across separate web applications and separate microservices. But it too cumbersome to merge and view everything in a single view.



    Is there any approach to view all of them under single session?










    share|improve this question

























      1












      1








      1








      I would like to track a session across multiple web applications, multiple microservices. All of my web applications are static files and microservices are running under nodejs containers with Kubernetes.



      I have tracking setup across separate web applications and separate microservices. But it too cumbersome to merge and view everything in a single view.



      Is there any approach to view all of them under single session?










      share|improve this question














      I would like to track a session across multiple web applications, multiple microservices. All of my web applications are static files and microservices are running under nodejs containers with Kubernetes.



      I have tracking setup across separate web applications and separate microservices. But it too cumbersome to merge and view everything in a single view.



      Is there any approach to view all of them under single session?







      session logging kubernetes containers microservices






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 20 at 6:43









      KannaiyanKannaiyan

      6,20512144




      6,20512144
























          2 Answers
          2






          active

          oldest

          votes


















          2














          Kubernetes itself do not support any request tracing, but you can use Istio together with Kubernetes, which has Distributed Tracing feature.



          In short, your application will need to resend attached headers and Istio will detects it, collect information from all your services and show you requests tracing.



          Also, it supports Mesh, so, theoretically, your application can work a bit faster and secure (because of network rules).



          You can read about Istio here, about tracing here and here is an instruction of how to setup it in Kubernetes.






          share|improve this answer































            0














            You can trace HTTP requests across different microservices (apps) using a special header to correlate all subsequent requests to the original one.



            For example, your web app sends a HTTP request (REST API call) to the first microservice (A) which finds that the request does not have a correlation ID (x-correlationid header) and adds it, then saves that correrlation id into the current call/session context and forwards it to all subsequent API calls to other microservices. then when all other microservices are following the same logic they will also add/use the correlation ID, you will have the ability to trace a request throughout all the microservices in the system.



            this pattern is used by many APM (application performance monitoring) tools. and once all your logs are aggregated in one place, you can then filter your queries by a certain correlation ID to see the full trace of a specific user request/operation.






            share|improve this answer























              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54274211%2fhow-to-track-session-across-several-web-apps-multiple-microservices%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              2














              Kubernetes itself do not support any request tracing, but you can use Istio together with Kubernetes, which has Distributed Tracing feature.



              In short, your application will need to resend attached headers and Istio will detects it, collect information from all your services and show you requests tracing.



              Also, it supports Mesh, so, theoretically, your application can work a bit faster and secure (because of network rules).



              You can read about Istio here, about tracing here and here is an instruction of how to setup it in Kubernetes.






              share|improve this answer




























                2














                Kubernetes itself do not support any request tracing, but you can use Istio together with Kubernetes, which has Distributed Tracing feature.



                In short, your application will need to resend attached headers and Istio will detects it, collect information from all your services and show you requests tracing.



                Also, it supports Mesh, so, theoretically, your application can work a bit faster and secure (because of network rules).



                You can read about Istio here, about tracing here and here is an instruction of how to setup it in Kubernetes.






                share|improve this answer


























                  2












                  2








                  2







                  Kubernetes itself do not support any request tracing, but you can use Istio together with Kubernetes, which has Distributed Tracing feature.



                  In short, your application will need to resend attached headers and Istio will detects it, collect information from all your services and show you requests tracing.



                  Also, it supports Mesh, so, theoretically, your application can work a bit faster and secure (because of network rules).



                  You can read about Istio here, about tracing here and here is an instruction of how to setup it in Kubernetes.






                  share|improve this answer













                  Kubernetes itself do not support any request tracing, but you can use Istio together with Kubernetes, which has Distributed Tracing feature.



                  In short, your application will need to resend attached headers and Istio will detects it, collect information from all your services and show you requests tracing.



                  Also, it supports Mesh, so, theoretically, your application can work a bit faster and secure (because of network rules).



                  You can read about Istio here, about tracing here and here is an instruction of how to setup it in Kubernetes.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jan 20 at 10:14









                  Anton KostenkoAnton Kostenko

                  2,9391620




                  2,9391620

























                      0














                      You can trace HTTP requests across different microservices (apps) using a special header to correlate all subsequent requests to the original one.



                      For example, your web app sends a HTTP request (REST API call) to the first microservice (A) which finds that the request does not have a correlation ID (x-correlationid header) and adds it, then saves that correrlation id into the current call/session context and forwards it to all subsequent API calls to other microservices. then when all other microservices are following the same logic they will also add/use the correlation ID, you will have the ability to trace a request throughout all the microservices in the system.



                      this pattern is used by many APM (application performance monitoring) tools. and once all your logs are aggregated in one place, you can then filter your queries by a certain correlation ID to see the full trace of a specific user request/operation.






                      share|improve this answer




























                        0














                        You can trace HTTP requests across different microservices (apps) using a special header to correlate all subsequent requests to the original one.



                        For example, your web app sends a HTTP request (REST API call) to the first microservice (A) which finds that the request does not have a correlation ID (x-correlationid header) and adds it, then saves that correrlation id into the current call/session context and forwards it to all subsequent API calls to other microservices. then when all other microservices are following the same logic they will also add/use the correlation ID, you will have the ability to trace a request throughout all the microservices in the system.



                        this pattern is used by many APM (application performance monitoring) tools. and once all your logs are aggregated in one place, you can then filter your queries by a certain correlation ID to see the full trace of a specific user request/operation.






                        share|improve this answer


























                          0












                          0








                          0







                          You can trace HTTP requests across different microservices (apps) using a special header to correlate all subsequent requests to the original one.



                          For example, your web app sends a HTTP request (REST API call) to the first microservice (A) which finds that the request does not have a correlation ID (x-correlationid header) and adds it, then saves that correrlation id into the current call/session context and forwards it to all subsequent API calls to other microservices. then when all other microservices are following the same logic they will also add/use the correlation ID, you will have the ability to trace a request throughout all the microservices in the system.



                          this pattern is used by many APM (application performance monitoring) tools. and once all your logs are aggregated in one place, you can then filter your queries by a certain correlation ID to see the full trace of a specific user request/operation.






                          share|improve this answer













                          You can trace HTTP requests across different microservices (apps) using a special header to correlate all subsequent requests to the original one.



                          For example, your web app sends a HTTP request (REST API call) to the first microservice (A) which finds that the request does not have a correlation ID (x-correlationid header) and adds it, then saves that correrlation id into the current call/session context and forwards it to all subsequent API calls to other microservices. then when all other microservices are following the same logic they will also add/use the correlation ID, you will have the ability to trace a request throughout all the microservices in the system.



                          this pattern is used by many APM (application performance monitoring) tools. and once all your logs are aggregated in one place, you can then filter your queries by a certain correlation ID to see the full trace of a specific user request/operation.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Jan 24 at 22:33









                          BishoyBishoy

                          2,5061529




                          2,5061529






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54274211%2fhow-to-track-session-across-several-web-apps-multiple-microservices%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Callistus III

                              Ostreoida

                              Plistias Cous