• Stars
    star
    224
  • Rank 177,792 (Top 4 %)
  • Language
    Java
  • Created over 4 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Sample applications to demonstrate Observability concepts

Teahouse

build badge

Demo setup for Spring Boot apps with Prometheus, Grafana, Loki, Tempo, Eureka, and Spring Boot Admin to demonstrate Observability use-cases.

Start dependencies

docker compose up

Remove logs

rm -rf logs

Start the apps

If you want to use an in-memory DB (H2):

./gradlew bootRun

If you want to use a real DB (MySQL):

./gradlew bootRun -Pprofiles=mysql

You need a real DB if you want to inject latency on the network (see ToxiProxy).

Start load tests

See SteepTeaSimulation.java for duration, request rate, and traffic patterns.

./gradlew :load-gen:gatlingRun

Stop dependencies

docker compose down

Stop dependencies and purge data

docker compose down --volumes

Useful URLs

Errors simulation

When 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).

You should see these errors on the throughput panel of the Tea API dashboard and Grafana also alerts on them (see the emails in MailDev).

If 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). The Makefile contains a goal for this to make it simple for you, you can run this to fix errors (httpie and jq needed):

make errors-fixed

If 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:

make errors

Latency simulation

If you start the apps with the mysql profile, the apps are not connected to the DB directly but through ToxiProxy 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 or the ToxiProxy CLI). The Makefile contains a goal for this to make it simple for you, you can run this to inject latency:

make chaos

And this to eliminate the extra latency:

make order

More Repositories

1

local-services

A collection of docker-compose files
HTML
362
star
2

resourceater

Eats all of your resources :)
Java
19
star
3

.dotfiles

Shell
6
star
4

groovy-training

An old training that I held about Groovy
5
star
5

coverage-demo

Demo project for unit- and functional test coverage
Java
5
star
6

das-control-panel

A small Arduino-based controller to automate (keyboard) actions.
C++
4
star
7

spring-security-instrumentation-demo

Instrument Spring Security using Spring Observability's Recording API
Java
3
star
8

micrometer-tags

PoC project to add better tag propagation for micrometer
Java
3
star
9

checkthat

Collection of checkers to test servers/services/etc. through REST API.
Groovy
2
star
10

kindle-3

Shortcuts, tips and tricks for the Kindle 3 a.k.a. Kindle Keyboard
2
star
11

ssl-store-provider-demo

Java
2
star
12

camerata

Java
1
star
13

develotters-blog

My tech blog for develotters by develotters. :)
HTML
1
star
14

truststore-checker

A simple cli to check your truststore over HTTPS
Groovy
1
star
15

fatjar-cli

A simple example to pack your project into a fat jar and run
Groovy
1
star
16

slack-weather-status

Groovy
1
star
17

no-args

Collection of explanations about why you should or should not do things (doing The Right Thingβ„’)
1
star
18

dn23-boot3-workshop

Spring Boot 3 workshop for Devnexus 2023
Java
1
star
19

nanobe

A small (one-file) spring-boot application to run experiments
Groovy
1
star
20

gradle-ghost

You can't see it but it's there: Gradle Ghost is esentially a set of build scripts that help you to easily build your projects using Gradle.
Shell
1
star
21

dn24-boot3-workshop

Spring Boot 3 workshop for Devnexus 2024
Java
1
star