---
title: "Structured logging is a go"
publication: "Go Weekly"
issue: 452
published_at: "2023-03-17"
canonical_url: "https://golangweekly.com/issues/452"
---

Plus real world Go concurrency examples, flame graphs, and there's more than one way to structure a Go project. |        

#​452 — March 17, 2023 

[Unsub](https://golangweekly.com/leave/*|UID|*)|[Web Version](https://golangweekly.com/issues/452)  

Together with [![Shortcut\](https://res.cloudinary.com/cpress/image/upload/c_fill,g_auto,e_trim,w_300,h_226/e_make_transparent/co_white,e_outline:7/kt3vhkbdend3jxxou5or.png)](https://shortcut.com/?utm_source=cooperGO&utm_medium=spon_nl&utm_campaign=prospecting&utm_content=fourletter)  

The _Go Weekly_ Newsletter 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60,q_auto/mtipoebf4iiwhkej1rq1.jpg)](https://blog.felixge.de/flamescope-for-go/)  

[FlameScope: Visualize CPU Samples from Go Execution Traces](https://blog.felixge.de/flamescope-for-go/) — FlameScope is a performance visualization tool from Netflix using flame graphs that can now be used with Go 1.19 thanks to a patch and this work from Felix. _“Please note that this is still relatively experimental..”_ 

Felix Geisendörfer   

[The `slog` / Structured Logging Proposal is Accepted](https://github.com/golang/go/issues/56345#issuecomment-1470506816) — Russ Cox has marked the [structured logging with levels proposal](https://go.googlesource.com/proposal/+/master/design/56345-structured-logging.md) (a.k.a. ‘slog’) as accepted – nonetheless, discussion continues. 

Russ Cox   

In other proposal related news, Russ also ticked the [WebAssembly System Interface / WASI target proposal.](https://github.com/golang/go/issues/58141#issuecomment-1470506615)  [![\](https://copm.s3.amazonaws.com/d6817365.png)](https://shortcut.com/?utm_source=cooperGO&utm_medium=spon_nl&utm_campaign=prospecting&utm_content=fourletter) 

[Don’t Let Your Issue Tracker Be a Four-Letter Word. Use Shortcut](https://shortcut.com/?utm_source=cooperGO&utm_medium=spon_nl&utm_campaign=prospecting&utm_content=fourletter) — The best issue tracking software is one that software developers are actually happy to use. 

Shortcut (formerly Clubhouse.io) sponsor   

[A Comprehensive Guide to Structured Logging in Go](https://betterstack.com/community/guides/logging/logging-in-go/) — Further to the recently accepted proposal (above), this post takes a practical approach comparing the structured logging approach to `log`, how `slog` addresses its limitations, how to get started with slog, as well as some alternatives you might still want to consider. 

Better Stack Team   

[The One-and-Only, Must-Have, Eternal Go Project Layout?](https://appliedgo.com/blog/go-project-layout) — The author notes this is a misleading title because there’s _no such thing_ as a single way to do it. Nonetheless, there are some things you can do to structure projects well, he says. 

Christoph Berger   

**IN BRIEF:** 

- The _Go Time Podcast_ tackles [▶️ the bits of Go we avoid](https://changelog.com/gotime/269) (and why).
- Brandur Leach has [a new policy around `util` packages](https://brandur.org/fragments/policy-on-util-packages) – he doesn't want to see a single, 'catch all' util package, but instead have multiple such packages oriented around common features.    

[Real World Go Concurrency Examples](https://www.dolthub.com/blog/2023-03-13-golang-concurrency-examples/) — Not sure we can ever have enough of these examples, and here you’ll see blocked select statements, `time.Sleep` deadlocks, and how easy the new atomic types can make your concurrent life. 

Jason Fulghum (DoltHub)   

[Reverse Proxy with Dynamic Backend Selection](https://www.artur-rodrigues.com/tech/2023/03/12/reverse-proxy-with-dynamic-backend-selection.html) — The example uses Caddy and encodes information into a JWT to route customers to the appropriate backend server, all in just a few lines of code. 

Artur Rodrigues   

[Run Your First Temporal Application with the Go SDK](https://bit.ly/first-program-in-go) — Enjoy this 10-minute tutorial to explore several runs of a Temporal Workflow application using Temporal and the Go SDK. 

Temporal Technologies sponsor   

[Advanced Markdown Processing in Go](https://blog.kowalczyk.info/article/cxn3/advanced-markdown-processing-in-go.html) — Using [gomarkdown/markdown](https://github.com/gomarkdown/markdown). 
Krzysztof Kowalczyk   

[How to Embed a Tailscale Funnel in Your App](https://tailscale.dev/blog/embedded-funnel) 
Tailscale  

🛠 Code & Tools  

[Task 3.22.0: Task Runner / `code` Alternative](https://github.com/go-task/task/releases/tag/v3.22.0) — This week’s notable addition is the [support for _global_ tasks](https://taskfile.dev/usage/#running-a-global-taskfile) defined in your home directory, letting you have automations you can run from anywhere on your system. [Official homepage.](https://taskfile.dev/#/) 

Andrey Nering   

[Scale: Write-Once, Run Anywhere Functions via WebAssembly](https://loopholelabs.io/blog/introducing-scale-functions) — [Scale](https://scale.sh/) is a new WASM-powered function runtime that wants to eventually open up an agnostic development model across languages and clouds (so imagine building a function that could work locally, on CloudFlare Workers, _or_ AWS Lambda without changes). _Go_ is the first language supported both as a client and runtime. 

Loophole Labs   

[Revive 1.3: A Fast(er), Configurable, Flexible Linter for Go](https://github.com/mgechev/revive) — A drop-in replacement of golint that aims to provide a little more structure, configurability, and performance. 

Minko Gechev   

[New Trending Content: Try Knative (Free Course)](https://www.linode.com/content/try-knative/?utm_source=go_newsletter&utm_medium=newsletter_sponsorship&utm_campaign=newsletter_sponsorship-go_newsletter-q1_newsletters&utm_content=&utm_term=) — In this free course, you'll learn how to deploy serverless containerized applications on Kubernetes by using Knative. 

Akamai Connected Cloud sponsor   

[Chi: Popular Composable Router for Go HTTP Services](https://github.com/go-chi/chi) — Good at helping you write large REST API services that are kept maintainable as your project grows and changes. 

go-chi   

[dynamodbav: Marshal/Unmarshal Utility Functions for DynamoDB](https://github.com/ryanc414/dynamodbav) — A (very) simple complement to the official AWS SDK v2 for Go. Using generics lets you save a lot of boilerplate code when marshalling and unmarshalling Go types into their DynamoDB representations. 

Ryan Collingham   

[Logarithmotechnia: R-Inspired Dataframe Library for Go](https://github.com/tabellarius/logarithmotechnia) 
Dee     

Jobs  

[Software Engineer C++](https://jobs.ashbyhq.com/stickermule/7796c2ed-15b0-47e0-8585-23af8d19fa54?utm_source=Cooperpress) — Join our "kick ass" team. Our software team operates from 17 countries and we're always looking for more exceptional engineers. 
Sticker Mule   

[Find a Job Through Hired](https://hired.com/join/?utm_source=newsletter&utm_medium=sponsor&utm_campaign=%28b2c%29%28l-all%29%28r-all%29%28cooper-golangweekly%29&utm_content=easy-job-hunting) — Hired makes job hunting easy-instead of chasing recruiters, companies approach you with salary details up front. Create a free profile now. 
Hired   

🧑‍💻 Got a job listing to share? _[Here's how](https://booking.cooperpress.com/jobs)_.     

- [chromedp 0.9](https://github.com/chromedp/chromedp)
 ↳ Drive browsers via the Chrome DevTools Protocol.
- 🔊 [Oto 2.4](https://github.com/hajimehoshi/oto)
 ↳ Play sound on multiple platforms.
- [ko 0.13](https://github.com/ko-build/ko)
 ↳ Container image builder for Go apps.
- [Iris 12.2](https://github.com/kataras/iris)
 ↳ Fast HTTP/2 web framework.
- 🎨 [Color 1.15](https://github.com/fatih/color)
 ↳ Color text output via ANSI escape codes.
- [golang-lru 2.0.2](https://github.com/hashicorp/golang-lru)
 ↳ Fixed-size thread safe LRU cache.
- [FerretDB 0.9.3](https://github.com/FerretDB/FerretDB)
 ↳ MongoDB alternative using Postgres for storage.
- [Sonic 1.1](https://github.com/go-sonic/sonic) – Go blogging platform.
- [golang-set 2.3](https://github.com/deckarep/golang-set/releases/tag/v2.3.0) – Generic set type.         

Curated by Peter Cooper and [Glenn Goodrich](https://twitter.com/ruprict). 

[Change your email](https://golangweekly.com/edit_subscription/*|UID|*)
[Stop getting this newsletter](https://golangweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
