Skip to content

Getting Started with OpenTelemetry Go

Test Go Snippets Minimum Go Version

Snippets that will guide you through instrumenting Go applications with OpenTelemetry Go API and SDK. You'll learn how to implement both manual and automatic instrumentation to emit traces, metrics, and logs to console/OTLP backends.

OpenTelemetry Go in a nutshell

Prerequisites

Before starting with this tutorial, ensure you have the following tools installed on your system:

  • Go - The Go programming language
  • Download from go.dev
  • Or install via package manager: brew install go (macOS) or apt install golang-go (Ubuntu)

  • Docker - For running OpenTelemetry Collector and observability backends

  • Download from docker.com

List of snippets

Following is a list of all available OpenTelemetry Go snippets:

basics


Congratulations! You now have a solid foundation for instrumenting Go applications with OpenTelemetry. Start with the simple examples and gradually add more sophisticated instrumentation as your observability needs grow.