Software Architecture in Golang: Structured Logging using slog (Observability)

preview_player
Показать описание
Welcome to another Software Architecture in Go/Golang video, in this video I cover Structured Logging using the new slog package to improve Observability.

■ What is structured logging?

Structured logging is a practice that indicates the implementation of a consistent and predetermined message format for application log entries; this message format is typically represented as a collection of key-value pairs.

== Relevant links

== All Go/Golang Playlists

== Socials

00:00 - Start
00:11 - What is Structured Logging in Golang?
01:58 - Introduction to slog and Structured Logging in Golang
06:21 - Structured Logging: slog groups in Golang
07:39 - Structured Logging: custom Handlers with context in Golang
10:40 - Conclusion of Structured Logging in Golang via slog package

=== Who am I?

Hello👋🏼! I'm Mario, a Hands-on Software Architect and Lead Backend Engineer with decades of professional experience building all kinds of software including on-premise Industrial Automation Systems, Linux Accessibility Desktop and Browser Components as well as Distributed Advertising Microservices.

The content I share includes different topics I've learned while working for small startups and large companies including the processes I've followed over the years for successfully delivering complex enterprise systems from start to end.

Subscribe if you like Software Development, Software Architecture and Systems Design!

Keep it up. Don't give up!

#golang #tutorial #softwarearchitecture

=== Our Vlog Channel

=== Our affiliate links below

DISCLAIMER: Some of the links shared in the description are affiliate links. As a member of these affiliate programs, I earn a small commission from your purchases at no additional cost to you. I appreciate your support! 💖
Рекомендации по теме
Комментарии
Автор

We love your content mario, keep it up

xbz
Автор

Thanks for the content mario, i really would be like if could bring something about hexagonal architecture but in the go way code :)

fabricioaraujo
Автор

Hi Mario! Interesting video. Are there any alternatives available for slog? Btw what’s the tool do you using for selection on screen with colour rectangles?

Hidarikikino
Автор

A question: Why not just use OpenTelemetry Logs instead using another framework for handling logs? I don't know if OpenTelemetry SDK for Go already implemented the Logs specification as C++ or .NET implementations. I use Otel span events for structured logs data related to a trace span and Otel Logs for unstructured logs that are related to a span

MrSparc
Автор

Would you reccomend using Slog in production? In case it becomes part of the standard library, will my code break?

pbznt