Eine Einführung in das verteilte Verfolgungsmuster





Wenn es um Gesundheit und Überwachung geht, kann eine verteilte Architektur einige Probleme verursachen. Sie können mit Dutzenden, wenn nicht Hunderten von Microservices umgehen, von denen jeder von verschiedenen Entwicklungsteams erstellt wurde.





, , . , AWS, Google Cloud, Azure, , - ( , , IP- . .).









:

  • - , /, . .





  • () -





  • () -









: ( ) .





, , . , , . :





Splunk





Datadog





Logstash





Fluentd





, . INFO- .





, . , , , , , - - (id).





userId, , - UUID, . ( , ). requestId userId , , !!!





Abbildung 1. Zentralisierte Protokollierung.
1. .





, (tag) Java (RequestFilter).





Abbildung 2: Log4J2-Konfiguration und Beispielprotokoll
2: Log4J2





Abbildung 3: Abfragefilter nach UUID oder Benutzer-ID
3: UUID UserId





- , . , ​​:





  1. .





  2. / (, ).





, (- - ).





Abbildung 4. Trace
4.





DataDog. , .





. /, . , . ( , / ).





. , , .





userId (, UUID) / . , !!





:





  1. .





  2. .





  3. , .





#1: , DATADOG





: DataDog APM





DataDog APM (application performance monitors - ). Datadog 100%- , , .





Datadog . Datadog . , , DD traceId , .





Abbildung 6: Instrumentierung der Anwendung mit DataDog
6: DataDog





Abbildung 7: Korrelation von Protokollen und Traces in DataDog
7: DataDog





#2: ZIPKINS, CLOUD-SLEUTH SPRING BOOT





:





Zipkins, Cloud Sleuth





:





  1. SPRING boot









  2. Zipkins.





  3. OpenTracing .





  4. Log4j2 MDC.





:





  1. , . ElasticSearch , , cloud-sleuth ( X-B3-TraceId).





:





Abbildung 8: Zipkins, Cloud Sleuth und Spring Boot.
8: Zipkins, Cloud Sleuth Spring Boot.





#3: AMAZON XRAY





: AmazonXRAY





:





  1. AWS, , AWS





  2. AWS (REQUEST ID) , . (: https://docs.aws.amazon.com/elasticloadbalancing/latest/application/load-balancer-request-tracing.html)





  3. API , AWS.





  4. CLOUDWATCH logs





:





  1. Cloudwatch log





#4: JAGER





: Jager





:





  1. opentracing





  2. , Spring





  3. Jager Agent, .





:





.





. , , . , . :-)






" ". .













All Articles