This project was created with the purpose of demonstrating metric generation and tracing in different scenarios: API, gRPC, and Messaging.
To simplify the business domain, the use cases are reduced to:
-
Create a Pokémon Trainer
-
Retrieve Trainer Information
-
Go on a Hunt
Each trainer has a Name and a Favorite Pokémon Type.
Once created, the trainer receives an identifier. With this identifier, we can retrieve their information: Name, Favorite Pokémon Type, and Captured Pokémon.
When going on a hunt, the trainer will have X capture attempts. If the encountered Pokémon matches the trainer's selected Favorite Pokémon Type, the capture chance is 100%; otherwise, it is 50%.
With docker/docker-compose installed run the following command
docker-compose up
POST /trainer (Create a new trainer)
name type data type description name required string Trainer's name favorite_pokemon_type optional Trainer's Favorite Pokemon type When hunting favorite types, there is a 100% chance of successful capture
http code content-type response 200application/json{"id": uuid, "name": string, "favorite_pokemon_type": string, pokemons []Pokemon {"id": int32, "name": string, "pokemon-types": []string} }400application/json{"error": string, "message": string, "code": int}500application/json``
GET /trainer/:trainer-id (Get trainer information)
name type data type description trainer-id required uuid Trainer's Identifier
http code content-type response 200application/json{"id": uuid, "name": string, "favorite_pokemon_type": string, pokemons []Pokemon {"id": int32, "name": string, "pokemon-types": []string} }404application/json{"error": string, "message": string, "code": int}
POST /trainer/:trainer-id/hunt (Hunt Pokemon)
name type data type description trainer-id required uuid Trainer's Identifier
http code content-type response 201application/json`` 500application/json``
Access Grafana and query by:
Show total of created trainers
Show total of added pokemons to a trainer
Shows every hunt and it contains (trainer_id, pokemon_id, captured and attempts)


