diff --git a/content/posts/observability-from-zero-to-hero.md b/content/posts/observability-from-zero-to-hero.md index 9c31ed827..cc48e5a96 100644 --- a/content/posts/observability-from-zero-to-hero.md +++ b/content/posts/observability-from-zero-to-hero.md @@ -161,12 +161,14 @@ After restarting your application: ```bash gradle bootRun ``` - -You can now get logs browsing Grafana reaching this URL: [http://localhost:3000/goto/M-VkkicSR?orgId=1](http://localhost:3000/goto/M-VkkicSR?orgId=1) and running some API calls with the following command: +After running some API calls with the following command: ```bash http :8080/api/events ``` +You can now get logs browsing Grafana + +![Loki](/assets/images/2024/01/Loki-Grafana.webp) ## Traces @@ -292,8 +294,28 @@ public ResponseEntity getEvent() throws ErrorResponseExce } ``` +Using Problem Detail responses, you will get such a response when an error occurs: + +```bash + http :8080/api/events +HTTP/1.1 500 +Connection: close +Content-Type: application/problem+json +Date: Wed, 17 Jan 2024 08:09:20 GMT +Transfer-Encoding: chunked + +{ + "instance": "/api/events", + "status": 500, + "title": "Internal Server Error", + "type": "about:blank" +} +``` + After testing this service a few times, you can now see the traces on your Grafana dashboard. +![Tempo](/assets/images/2024/01/Tempo-Grafana.webp) + ### Head or Tail sampling? One significant drawback of implementing this technology lies in the potential performance overhead it introduces to the instrumented application. In cases where high-pressure APIs generate or broadcast SPANs for every transaction, there's a substantial risk of significantly impacting the [Service Level Objectives (SLOs)](https://sre.google/sre-book/service-level-objectives/) of your platform. diff --git a/static/assets/images/2024/01/Loki-Grafana.webp b/static/assets/images/2024/01/Loki-Grafana.webp new file mode 100644 index 000000000..d3a5e866a Binary files /dev/null and b/static/assets/images/2024/01/Loki-Grafana.webp differ diff --git a/static/assets/images/2024/01/Tempo-Grafana.webp b/static/assets/images/2024/01/Tempo-Grafana.webp new file mode 100644 index 000000000..7b67cfb3c Binary files /dev/null and b/static/assets/images/2024/01/Tempo-Grafana.webp differ