{"id":20317529,"url":"https://github.com/dynatrace/easytrade","last_synced_at":"2026-04-23T20:01:02.534Z","repository":{"id":143388870,"uuid":"578479416","full_name":"Dynatrace/easytrade","owner":"Dynatrace","description":"EasyTrade - new demo microservices based application that allows its users to buy and sell stocks, developed by Demoability Team","archived":false,"fork":false,"pushed_at":"2026-04-14T17:34:28.000Z","size":3887,"stargazers_count":45,"open_issues_count":6,"forks_count":108,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-04-14T18:27:32.866Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Dynatrace.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2022-12-15T06:40:25.000Z","updated_at":"2026-04-14T17:22:25.000Z","dependencies_parsed_at":"2024-01-08T18:43:41.914Z","dependency_job_id":"4deeafb2-39a1-4ea5-a89b-ef6080d65e22","html_url":"https://github.com/Dynatrace/easytrade","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/Dynatrace/easytrade","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dynatrace%2Feasytrade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dynatrace%2Feasytrade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dynatrace%2Feasytrade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dynatrace%2Feasytrade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Dynatrace","download_url":"https://codeload.github.com/Dynatrace/easytrade/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Dynatrace%2Feasytrade/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32196155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-23T15:28:30.493Z","status":"ssl_error","status_checked_at":"2026-04-23T15:28:29.972Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T18:32:59.440Z","updated_at":"2026-04-23T20:01:02.527Z","avatar_url":"https://github.com/Dynatrace.png","language":"TSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# EasyTrade\n\nA project consisting of many small services that connect to each other.  \nIt is made like a stock broking application - it allows it's users to buy\u0026sell some stocks/instruments.  \nOf course it is all fake data and the price has a 24 hour cycle...\n\n## Architecture diagram\n\n![EasyTrade architecture](./img/architecture.jpg)\n\n## Database diagram\n\n![EasyTrade database](./img/database.jpg)\n\n## Service list\n\nEasyTrade consists of the following services/components:\n\n| Service                                                              | Proxy port | Proxy endpoint               |\n| -------------------------------------------------------------------- | ---------- | ---------------------------- |\n| [Account service](src/accountservice/README.md)                      | 80         | `/accountservice`            |\n| [Aggregator service](src/aggregator-service/README.md)               | 80         | `---`                        |\n| [Broker service](src/broker-service/README.md)                       | 80         | `/broker-service`            |\n| [Calculation service](src/calculationservice/README.md)              | 80         | `---`                        |\n| [Content creator](src/contentcreator/README.md)                      | 80         | `---`                        |\n| [Credit card order service](src/credit-card-order-service/README.md) | 80         | `/credit-card-order-service` |\n| [Db](src/db/README.md)                                               | 80         | `---`                        |\n| [Engine](src/engine/README.md)                                       | 80         | `/engine`                    |\n| [Feature flag service](src/feature-flag-service/README.md)           | 80         | `/feature-flag-service`      |\n| [Frontend](src/frontend/README.md)                                   | 80         | `/`                          |\n| [Frontend reverse-proxy](src/frontendreverseproxy/README.md)         | 80         | `---`                        |\n| [Loadgen](src/loadgen/README.md)                                     | --         | `---`                        |\n| [Login service](src/loginservice/README.md)                          | 80         | `/loginservice`              |\n| [Manager](src/manager/easyTradeManager/README.md)                    | 80         | `/manager`                   |\n| [Offer service](src/offerservice/README.md)                          | 80         | `/offerservice`              |\n| [Pricing service](src/pricing-service/README.md)                     | 80         | `/pricing-service`           |\n| [Problem operator](src/problem-operator/README.md)                   | 80         | `---`                        |\n| [RabbitMQ](src/rabbitmq/README.md)                                   | 80         | `---`                        |\n| [Third party service](src/third-party-service/README.md)             | 80         | `/third-party-service`       |\n\n\u003e To learn more about endpoints / swagger for the services go to their respective readmes\n\n## Docker compose\n\nTo run the easytrade using docker you can use provided `compose.yaml`.\nTo use it you need to have:\n\n- Docker with minimal version **v20.10.13**\n  - you can follow [this](https://docs.docker.com/engine/install/ubuntu/) guide to update Docker\n  - this guide also covers installing Docker Compose Plugin\n- Docker Compose Plugin\n  ```bash\n  sudo apt update\n  sudo apt install docker-compose-plugin\n  ```\n  - more information in [this](https://docs.docker.com/compose/install/linux/) guide\n\nWith this you can run\n\n```bash\ndocker compose up\n# or to run in the background\ndocker compose up -d\n```\n\nYou should be able to access the app at `localhost:80` or simply `localhost`.\n\n\u003e **NOTE:** It make take a few minutes for the app to stabilize, you may experience errors in the frontend or see missing data before that happens.\n\n\u003e **NOTE:** Docker Compose V1 which came as a separate binary (`docker-compose`) will not work with this version. You can check this [guide](https://www.howtogeek.com/devops/how-to-upgrade-to-docker-compose-v2/) on how to upgrade.\n\n## Kubernetes instructions\n\nTo deploy Easytrade in kubernetes you need to have:\n\n- `helm`\n  - install [guide](https://helm.sh/docs/intro/install/)\n- `kubectl`\n  - install [guide](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/)\n- `kubeconfig` to access the cluster you want to deploy it on\n  - more info on it [here](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/)\n\n```bash\n# create namespace and deploy easytrade\nhelm install easytrade oci://europe-docker.pkg.dev/dynatrace-demoability/helm/easytrade --create-namespace --namespace easytrade\n\n# uninstall easytrade\nhelm uninstall easytrade -n easytrade\n\n# delete namespace\nkubectl delete namespace easytrade\n```\n\n## Where to start\n\nAfter starting easyTrade application you can:\n\n- go to the frontend and try it out. Just go to the machines IP address, or \"localhost\" and you should see the login page. You can either create a new user, or use one of superusers (with easy passwords) like \"demouser/demopass\" or \"specialuser/specialpass\". Remember that in order to buy stocks you need money, so visit the deposit page first.\n- go to some services swagger endpoint - you will find proper instructions in the dedicated service readmes.\n- after some time go to dynatrace to configure your application and see what is going on in easyTrade - to have it work you will need an agent on the machine where you started easyTrade :P\n\n## EasyTrade users\n\nIf you want to use easyTrade, then you will need a user. You can either:\n\n- use the existing user - he has some preinserted data and new data is being generated from time to time:\n\n  - login: james_norton\n  - pass: pass_james_123\n\n- create a new user - click on \"Sign up\" on the login page and create a new user.\n\n\u003e **NOTE:** After creating a new user there is no confirmation given, no email sent and you are not redirected... Just go back to login page and try to login. It should work :)\n\n## Problem patterns\n\nCurrently there are 4 problem patterns supported in easyTrade:\n\n1. DbNotResponding - after turning it on no new trades can be created as the database will throw an error. This problem pattern is kind of proof on concept that problem patterns work. Running it for around 20 minutes should generate a problem in dynatrace.\n\n2. ErgoAggregatorSlowdown - after turning it on 2 of the aggregators will start receiving slower responses which will make them stop sending requests after some time. A potential run could take:\n\n   - 15 min - then we will notice a small slowdown (for 150 seconds) followed by 40% lower traffic for 15 minutes on some requests\n   - 20 min - then we will notice a small slowdown (for 150 seconds) followed by 40% lower traffic for 30 minutes on some requests\n\n3. FactoryCrisis - when enabled, the factory won't produce new cards, which will cause the Third party service not to process credit card orders. This will block the Credit Card Order service.\n\n4. HighCpuUsage - this problem pattern causes a slowdown of broker-service response time and highly increases CPU usage during that time. If the app is deployed on K8s, a CPU resource limit is also applied by the problem operator. This should generate CPU throttling on the pod.\n\nTo turn a plugin on/off send a request similar to the following:\n\n```sh\ncurl -X PUT \"http://{IP_ADDRESS}/feature-flag-service/v1/flags/{FEATURE_ID}/\" \\\n-H  \"accept: application/json\" \\\n-d '{\"enabled\": {VALUE}}'\n```\n\nYou can also manage enabled problem patterns via the easyTrade frontend.\n\n\u003e **NOTE:** More information on the feature flag service's parameters available in [feature flag service's doc](src/feature-flag-service/README.md).\n\nIf you are deploying easyTrade on K8s, you can also apply [these cronjobs](./kubernetes-manifests/problem-patterns/), which will enable the problem patterns once a day.\n\n## EasyTrade on Dynatrace - how to configure\n\nAll Dynatrace configuration required for Easytrade should be applied using [Monaco](https://github.com/Dynatrace/dynatrace-configuration-as-code). More information on how to deploy it can be found in the [`monaco` directory](./monaco).\n\n### Business events in Dynatrace\n\nEasyTrade application has been developed in order to showcase business events. Usually business events can be created in two ways:\n\n- directly - using one of Dynatrace SDKs in the code - so for example in Javascript or Java\n- indirectly - configure catch rules for request that are monitored by Dynatrace\n\nIf you want to learn more about business events then we suggest looking at the information on our website: [Business event capture](https://www.dynatrace.com/support/help/platform-modules/business-analytics/ba-events-capturing). There you will find information on how to create events directly (with OpenKit, Javascript, Android and more) and indirectly with capture rules in Dynatrace.\n\nFor those interested in creating capturing rules for easyTrade we suggest to have a look at the configuration exported with Monaco in this repository. Have a look at the [README](./monaco/README.md)\n\n## Body types\n\nEasyTrade network traffic is handled by REST requests using mostly JSON payloads. However, some of the services\ncan also handle XML requests. Data types are negotiated based on `Accept` and `Content-Type` headers.\n\n#### XML compatible services\n\n| Service                                                           | Accepted XML MIME types                            |\n| ----------------------------------------------------------------- | -------------------------------------------------- |\n| [LoginService](src/loginservice/README.md)                        | `application/xml`; `text/xml`; `application/*+xml` |\n| [CreditCardOrderService](src/credit-card-order-service/README.md) | `application/xml`                                  |\n| [OfferService](src/offerservice/README.md)                        | `application/xml`; `text/xml`                      |\n| [PricingService](src/pricing-service/README.md)                   | `application/xml`                                  |\n\n## Local Dynatrace MCP Server\n\nThis repository comes with the [local Dynatrace MCP Server](https://github.com/dynatrace-oss/dynatrace-mcp) pre-configured for VSCode. You can read more about [MCP Servers on VSCode](https://code.visualstudio.com/docs/copilot/customization/mcp-servers).\nIn order to try it out, you need access to the [Dynatrace Playground Environment](https://docs.dynatrace.com/docs/discover-dynatrace#playground), as well as access to [GitHub Copilot](https://github.com/features/copilot).\n\nIf everything is setup, please open **Copilot Chat** in VSCode, switch to **Agent mode**, and ask questions like \n\n\u003e Which environment am I connected to?\n\n\u003e Are there any problems with my components on Dynatrace?\n\n\u003e Are there any security vulnerabilities for my component?\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdynatrace%2Feasytrade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdynatrace%2Feasytrade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdynatrace%2Feasytrade/lists"}