A simple stack to play with OpenTelemetry project
Preinstall
- Docker & Docker compose
- Grpcurl https://github.com/fullstorydev/grpcurl
Deploy dependencies
docker-compose up -d zoo kafka prometheus jaeger redisdb mongodbMake sure all dependencies are running
Build then deploy main services
docker-compose up -d grpc-alias-provider-v1 api-shortenit-v1Generate alias keys in Redis
grpcurl -plaintext -d '{"numberOfKeys":100}' localhost:50051 v1.AliasProviderService/GenerateAliasInit sample customer in Mongodb
curl http://localhost:8085/init-sample-dataCreate alias request
curl --location --request POST 'localhost:8085/shortenit' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer test_api_key' \
--data-raw '{
"originUrl": "http://test.com.au/this/is/very/long/url",
"userEmail": "john.d@gmail.com"
}'Retrieve the original url
curl --location --request GET 'localhost:8085/shortenit/{key}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer test_api_key'http://localhost:16686/
http://localhost:9000/