elgris / microservice-app-example

Example of polyglot microservice app
MIT License
1.4k stars 337 forks source link

Fetaure: Integrate MySQL, Zipkin Dependencies #18

Open anitsh opened 3 years ago

anitsh commented 3 years ago

Problem

At the moment the data is stored in memory which can not be visualized easily. The data gets lost in every restart. Zipkin provides alternate solutions to integrate MySQL as storage. https://github.com/openzipkin/zipkin/blob/master/docker/examples/docker-compose-mysql.yml

The second problem that the current implementation does not provide the aggregated view of the data, i.e. the total requests from one end to the other. The aggregation is done by using zipkin-dependencies, which is a spark job that aggregates zipkin spans for use in the UI. https://github.com/openzipkin/zipkin-dependencies

Solution

I purpose integrating these features which I believe would add more value to the users in terms of data visualization as well as understand the entire application, that includes how Zipkin works. This solution should not make any change to the sample applications functionality at all.

As an additional feature this solution will also have PhpmyAdmin for easier data visualization.

zipkin-dependencies is a cronjob set up to run at midnight but users can run manually to see the zipkin_dependency table populated by executin: docker exec -it --user=root [CONTAINER ID] start-zipkin-dependencies date --date=yesterday +%D


Motivation

I believe this project is a good example for anyone who is new in understanding telemetry. As I was trying to understand Zipkin, it has add great value to me so I just wished to contribute something. So I hope this minor enhancement would be useful to the example community.

Thank you making this open-source 😃.