Grafana Observability Primer
Deploy:
docker-compose up -d --build
Create user:
docker run --rm -i --network=docknet loadimpact/k6 run --quiet - < k6lib/http_post.js
Run tests to perform get requests:
docker run --rm -i --network=docknet loadimpact/k6 run --quiet - < k6lib/http_gets.js
API Usage:
# list all users
curl -H 'Content-Type: application/json' http://localhost:5000/users
# create user
curl -XPOST -H 'Content-Type: application/json' http://localhost:5000/users -d '{"username": "ruan", "email": "ruan@localhost"}'
CPU and Memory:
Requests per Second:
Average Response Time:
Response Duration:
View the logs from our dashboard:
After we created a user, we can explore our logs dashboard and view the traceid: