{"id":19593984,"url":"https://github.com/jonatan-ivanov/teahouse","last_synced_at":"2025-05-16T12:06:07.937Z","repository":{"id":147530609,"uuid":"245916525","full_name":"jonatan-ivanov/teahouse","owner":"jonatan-ivanov","description":"Sample applications to demonstrate Observability concepts","archived":false,"fork":false,"pushed_at":"2025-03-26T23:43:58.000Z","size":1475,"stargazers_count":273,"open_issues_count":1,"forks_count":83,"subscribers_count":12,"default_branch":"main","last_synced_at":"2025-04-12T06:15:14.007Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonatan-ivanov.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-09T01:17:13.000Z","updated_at":"2025-04-10T14:23:30.000Z","dependencies_parsed_at":"2023-11-26T02:24:05.256Z","dependency_job_id":"4cc602e6-465b-4eb2-8b94-445ca3bf0ac6","html_url":"https://github.com/jonatan-ivanov/teahouse","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonatan-ivanov%2Fteahouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonatan-ivanov%2Fteahouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonatan-ivanov%2Fteahouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonatan-ivanov%2Fteahouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonatan-ivanov","download_url":"https://codeload.github.com/jonatan-ivanov/teahouse/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525138,"owners_count":21118619,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["hacktoberfest"],"created_at":"2024-11-11T08:41:56.849Z","updated_at":"2025-04-12T06:15:22.828Z","avatar_url":"https://github.com/jonatan-ivanov.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Teahouse\n\n![build badge](https://github.com/jonatan-ivanov/teahouse/actions/workflows/gradle.yml/badge.svg)\n\nDemo setup for Spring Boot apps with Prometheus, Grafana, Loki, Tempo, Eureka, and Spring Boot Admin to demonstrate Observability use-cases.\n\n## Start dependencies\n\n```shell\ndocker compose up\n```\n\n## Remove logs\n\n```shell\nrm -rf logs\n```\n\n## Start the apps\nIf you want to use an in-memory DB (H2):\n```shell\n./gradlew bootRun\n```\n\nIf you want to use a real DB (MySQL):\n```shell\n./gradlew bootRun -Pprofiles=mysql\n```\nYou need a real DB if you want to inject latency on the network (see [ToxiProxy](#useful-urls)).\n\n## Start load tests\n\nSee `SteepTeaSimulation.java` for duration, request rate, and traffic patterns.\n\n```shell\n./gradlew :load-gen:gatlingRun\n```\n\n## Stop dependencies\n\n```shell\ndocker compose down\n```\n\n## Stop dependencies and purge data\n\n```shell\ndocker compose down --volumes\n```\n\n## Useful URLs\n\n- Tea UI: http://localhost:8090/steep\n- Tea Service: http://localhost:8090\n- Tealeaf Service: http://localhost:8091\n- Water Service: http://localhost:8092\n- Spring Boot Admin: http://localhost:8080\n- Eureka: http://localhost:8761\n- Prometheus: http://localhost:9090\n- Loki, Grafana, Tempo: http://localhost:3000\n- ToxiProxy UI (failure injection): http://localhost:8484\n- MailDev (emails for alerts): http://localhost:3001\n- Adminer (DB Admin UI): http://localhost:8888 (credentials: `root:password`)\n\n## Errors simulation\n\nWhen start the apps for the first time, `english breakfast` is missing from the DB but you can make requests through the UI using `english breakfast` and the load generator also sends requests containing it. Those calls will end-up with HTTP 500; approximately 10% of the requests should fail: ~0.5 rq/sec error- and ~4.5 rq/sec success rate (~5 rq/sec total throughput, see `SteepTeaSimulation.java`).\n\nYou should see these errors on the throughput panel of the Tea API dashboard and Grafana also alerts on them (see the emails in [MailDev](#useful-urls)).\n\nIf you want to fix these errors, you need to create a record in the DB for `english breakfast`. The easiest way is sending an HTTP POST request to `/tealeaves` to create the resource (you can also log into the DB and insert the record for example using [Adminer](#useful-urls)). The `Makefile` contains a goal for this to make it simple for you, you can run this to fix errors (httpie and jq needed):\n\n```shell\nmake errors-fixed\n```\n\nIf you want the errors back again, you need to remove the record from the DB, the `Makefile` contains a goal for this too, so you can run this to inject errors:\n\n```shell\nmake errors\n```\n\n## Latency simulation\n\nIf you [start the apps with the `mysql` profile](#start-the-apps), the apps are not connected to the DB directly but through [ToxiProxy](#useful-urls) so that you can inject failures (i.e.: latency) on the network. You can do this in multiple ways (e.g.: using the [ToxiProxy UI](#useful-urls) or the ToxiProxy CLI). The `Makefile` contains a goal for this to make it simple for you, you can run this to inject latency:\n\n```shell\nmake chaos\n```\n\nAnd this to eliminate the extra latency:\n\n```shell\nmake order\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonatan-ivanov%2Fteahouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonatan-ivanov%2Fteahouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonatan-ivanov%2Fteahouse/lists"}