Observability
Generate a token using command prompt terminal (cmd):
C:\Users\saad0\Documents\source\logging-backend>curl https://aurorahours.com/identity-backend/test-token
Next, use that token to write to logs:
C:\Users\saad0\Documents\source\logging-backend>curl -X POST https://aurorahours.com/logging-backend/log -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJodHRwczovL2F1cm9yYWhvdXJzLmNvbS9pZGVudGl0eS1iYWNrZW5kIiwic3ViIjoidGVzdHVzZXIiLCJhdWQiOiJsb2dnaW5nLXNlcnZpY2UiLCJpYXQiOjE3NTQzNjU4ODQsImV4cCI6MTc1NDM2NzY4NCwic2NvcGUiOiJvcGVuaWQifQ.RoztF1DAaaviw2Q4XuI-5-d12vdjS-U02eoHQkwJg_c" -H "Content-Type: application/json" -d "{\"service\":\"manual-test\",\"level\":\"INFO\",\"message\":\"Log from CMD works\",\"context\":{\"source\":\"cmd-one-liner\"}}"
{"status":"logged"}
https://aurorahours.com/logging-backend/logs
Comments
Post a Comment