Error Handling in GO

Error Handling & Abstraction in GO

GO uses its capability to return multiple values for error handling, meaning that errors in go are regular values returned from a function. The developer must check the returned error value and handle it accordingly.

Error handling can quickly become non-trivial. You may want to change your behaviour if an error occurs, either substitute the failed functionality to increase fault tolerance or display an easy-to-understand error message to the user that does not intimidate them with long traces.

(more…)

How to Push Apps to Cloud Foundry With a Sidecar to Stream Metrics to Prometheus

How to push apps to Cloud Foundry with a sidecar to stream metrics to Prometheus -Header image

Introduction

Retrieving application metrics is usually not difficult. Simply implement a metrics endpoint and let Prometheus, for example, query that endpoint. But why is it the problem when you deploy an application on Cloud Foundry?

 If you deploy your application to a platform like Cloud Foundry, you will eventually run into problems. Most likely the endpoint cannot be easily retrieved from a running Prometheus instance to be scraped. 

(more…)