This is a simple microservice that simulates a user API of a shop. It uses Java and uses Spring Boot.
A user is a simple object with a name.
The API has the following endpoints:
GET /user- List all usersPOST /user- Create a new user
Users are stored in a H2 database in memory.
The API is instrumented with OpenTelemetry to collect traces and metrics. The traces are sent to the OpenTelemetry Collector and the metrics are sent to Prometheus via the OpenTelemetry Collector.
Use this API to test the OpenTelemetry Collector and the OpenTelemetry Java agent with the main project.
These instructions will give you a copy of the project and running on your local machine for development and testing purposes.
Requirements for the software and other tools to build and run the API
- Java 21
Be sure to start the Docker Compose environment in the main project, "Infra" directory, before running the API.
To run the API, use the following command:
mvn spring-boot:runIt will start the API on port 9001 and connect to the OpenTelemetry Collector on port 4317.
- Better code quality, create packages, and refactor the code
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use Semantic Versioning for versioning.
- Thomas Cicognani - First version of the API - Zhykos
- PurpleBooth 🖤 for the README template: https://github.com/PurpleBooth/a-good-readme-template
- Hat tip to anyone whose code is used