Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace the PNG diagram with Mermaid #29

Merged
merged 5 commits into from
May 21, 2022
Merged

Replace the PNG diagram with Mermaid #29

merged 5 commits into from
May 21, 2022

Conversation

reyang
Copy link
Member

@reyang reyang commented May 21, 2022

Fixes #27.

Here goes what the diagram looks like:

Old version, please refer to the new one and the discussion #29 (comment)

graph TD

classDef dotnet fill:#7F007F
classDef golang fill:#3F3FCF
classDef java   fill:#FF0000
classDef nodejs fill:#007F00
classDef python fill:#7F7F00


adservice(Ad Service):::java
cache[(Cache<br/>&#40redis&#41)]
cartservice(Cart Service):::dotnet
checkoutservice(Checkout Service):::golang
currencyservice(Currency Service):::nodejs
emailservice(Email Service):::python
frontend(Frontend):::golang
loadgenerator([Load Generator]):::python
paymentservice(Payment Service):::nodejs
productcatalogservice(ProductCatalog Service):::golang
recommendationservice(Recommendation Service):::python
shippingservice(Shipping Service):::golang

Internet -->|HTTP| frontend
loadgenerator -->|HTTP| frontend

checkoutservice --> cartservice --> cache
checkoutservice --> productcatalogservice
checkoutservice --> currencyservice
checkoutservice --> emailservice
checkoutservice --> paymentservice
checkoutservice --> shippingservice

frontend --> adservice
frontend --> cartservice
frontend --> productcatalogservice
frontend --> checkoutservice
frontend --> currencyservice
frontend --> recommendationservice --> productcatalogservice
frontend --> shippingservice
Loading

@reyang reyang requested a review from a team May 21, 2022 04:04
@cartersocha
Copy link
Contributor

Is it possible to have a legend like in the original png? I looked at the mermaid docs to do it myself quickly but it didn't seem obvious what do or would we need to add it in the markdown itself?

@cartersocha
Copy link
Contributor

Looks really nice though

@reyang
Copy link
Member Author

reyang commented May 21, 2022

Is it possible to have a legend like in the original png? I looked at the mermaid docs to do it myself quickly but it didn't seem obvious what do or would we need to add it in the markdown itself?

It is possible, however after played with the diagram (especially trying to find the color that works for both dark/light modes), I start to prefer that we don't specify color at all:

  1. considering 7% developers are color-blinded
  2. in the end we might have 10+ languages - which translates to too many colors, and a long legend

@reyang
Copy link
Member Author

reyang commented May 21, 2022

This is what I would suggest after tried various approaches (which looks nice in both light/dark theme):

graph TD

adservice(Ad Service<br/>&#40Java&#41):::java
cache[(Cache<br/>&#40redis&#41)]
cartservice(Cart Service<br/>&#40.NET&#41):::dotnet
checkoutservice(Checkout Service<br/>&#40Go&#41):::golang
currencyservice(Currency Service<br/>&#40Node.js&#41):::nodejs
emailservice(Email Service<br/>&#40Python&#41):::python
frontend(Frontend<br/>&#40Go&#41):::golang
loadgenerator([Load Generator<br/>&#40Python&#41]):::python
paymentservice(Payment Service<br/>&#40Node.js&#41):::nodejs
productcatalogservice(ProductCatalog Service<br/>&#40Go&#41):::golang
recommendationservice(Recommendation Service<br/>&#40Python&#41):::python
shippingservice(Shipping Service<br/>&#40Go&#41):::golang

Internet -->|HTTP| frontend
loadgenerator -->|HTTP| frontend

checkoutservice --> cartservice --> cache
checkoutservice --> productcatalogservice
checkoutservice --> currencyservice
checkoutservice --> emailservice
checkoutservice --> paymentservice
checkoutservice --> shippingservice

frontend --> adservice
frontend --> cartservice
frontend --> productcatalogservice
frontend --> checkoutservice
frontend --> currencyservice
frontend --> recommendationservice --> productcatalogservice
frontend --> shippingservice
Loading

@cartersocha
Copy link
Contributor

future enhancement would be to add grpc / http between the various services but non blocking for now. We can open an issue for that later

@cartersocha
Copy link
Contributor

#30

@reyang reyang merged commit b871b47 into open-telemetry:main May 21, 2022
@reyang reyang deleted the reyang/diagram branch May 21, 2022 05:12
@reyang reyang mentioned this pull request May 25, 2022
jmichalak9 pushed a commit to jmichalak9/opentelemetry-demo that referenced this pull request Mar 22, 2024
smith pushed a commit to smith/opentelemetry-demo that referenced this pull request Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider a Mermaid diagram?
2 participants