The abundance of programming languages available today gives programmers plenty of tools with which to build applications. Whether long-established giants like Java or newcomers like Go, applications need monitoring after deployment. In this article, you will learn how to ship Golang logs to the ELK Stack and Logz.io. It’s usually possible to get an idea of what an application is doing by looking at its logs. However, log data has a tendency to grow exponentially over time.
Go is a statically typed, natively compiled and garbage-collected programming language. Originally designed by Google, Go is now developed as an open source project. Given the natively compiled nature of Go, adding observability at runtime is not the preferred method. I’m not saying that it couldn’t be achieved, but as developers who develop native executables, we are super careful of other people fiddling around in our binaries at runtime.
All developers have seen them, even in well-structured Golang programs: comments suggesting you keep away from lines of code since they seem to be working in a magic way. These warnings make us timid, fearing we might break something. But applications need to change, to improve and innovate. That’s why unit tests are a vital part of software development. They help developers know whether the small parts of their software perform their intended function correctly.
Robert Greiseimer has called Go the language of cloud computing and while it’s no secret that Go has strong features that support the needs of microservice architecture, distributed systems, and large-scale enterprise applications, what is less talked about is that Go was also built with web development in mind from the start. In fact, many developers in the community are using Go for full-stack development and championing new modules and frameworks that make Go a strong language for the web.
In our previous two blogs, we provided an overview of the architecture and design of the Elasticsearch Go client and explored how to configure and customize the client. In doing so, we pointed to a number of examples available in the GitHub repository. The goal of these examples is to provide executable "scripts" for common operations, so it's a good idea to look there whenever you're trying to solve a specific problem with the client.
I'm pretty happy using Go in my day-to-day programming. I work on data storage and data retrieval for Lightstep and our data ingestion and storage systems are large enough that there are at least six services involved with more than a hundred actual instances. At various places in the pipeline we need fan-out and fan-in for serving requests to analysis tools, the web UI, and our public API. When I'm writing this fan-out/fan-in pattern, I reach for goroutines and channels by default.
In a previous blog, we saw that the seemingly simple job of an Elasticsearch client — moving data between the calling code and the cluster — is actually quite complicated under the hood. Naturally, as much as we try to make the default behaviour of the client optimal for the majority of scenarios, there are situations where you want to configure, customize, or enable/disable certain features.
When you're deciding on a technology to use for your project, it helps to have a broad understanding of your options. You may be tempted to build a web service in Go for performance reasons - but what would that code actually look like? How would it compare to languages like Ruby or JS? In this article, Ayooluwa Isaiah gives us a guided tour through the building blocks of go web services so you'll be well-informed.
Bleemeo announces the General Availability of the new monitoring agent written in Go. This agent is the successor of the previous agent written in Python. All good aspects have been kept: Open Source, easy to deploy, and to use, available as a package for main Linux distributions: Debian/Ubuntu, CentOS/RedHat, available for Windows and available as a container.