Skip to content

Latest commit

 

History

History
75 lines (55 loc) · 1.89 KB

CONTRIBUTING.md

File metadata and controls

75 lines (55 loc) · 1.89 KB

Contributing to Calidum Rotae Backend

Want to contribute to Calidum Rotae Backend? Here's an in-depth guide on how to do that.

Dependencies

protoc

You'll also want to install the latest version of protoc to be able to generate Go files from your Protobuf spec.

other dependencies

Simply run this command to install the other dependencies:

$ make

Generating gRPC Go files

To generate the gRPC Go files from the Protobuf spec, run this command:

$ make grpc

Local development

Change the values in the .env file to your own values

To run the project locally using docker-compose, simply run this command:

$ make docker-compose-dev

This will launch an instance of:

  • calidum_rotae_service
  • discord_provider
  • email_provider
  • grafana
  • prometheus
  • tempo
  • opentelemetry-collector

Once you have executed the commands mentioned above, you can now test the API and view the traces generated by OTEL.

  1. Visit the Grafana instance at http://localhost:8080.

  2. Check if the data sources are correctly connected. Prometheus data source Tempo data source

  3. To test the API, execute this command:

curl -X POST \
  http://localhost:3000/ \
  -H 'X-API-KEY: your_calidum_rotae_service_api_key_here' \
  -H 'Content-Type: application/json' \
  -d '{
  "Sender": {
    "FirstName": "firtname",
    "LastName": "lastname",
    "Email": "[email protected]"
  },
  "RequestService": "service",
  "RequestDetails": "details"
}'
  1. Go to the "Explore" section in Grafana to see if the traces are present (wait 15 seconds before executing the query). The traces should be visible. Traces