End-to-End Observability in Go: Distributed Tracing, Metrics & Logs with OpenTelemetry

Distributed Tracing in Go Applications with OpenTelemetry and OpenObserve
Monitoring helps in understanding application behavior, debugging performance bottlenecks, and ensuring seamless observability. OpenTelemetry (OTel) provides a vendor-neutral instrumentation framework that enables distributed tracing across services. Coupled with OpenObserve, a scalable observability platform, developers can collect, store, and analyze traces, logs, and metrics efficiently.
In this guide, we’ll set up distributed tracing in a Go application using OpenTelemetry and OpenObserve. We will:
- Clone a pre-built Golang tracing example from OpenObserve.
- Configure and run the application with OpenObserve credentials.
- Generate traces by hitting the Go application’s endpoint.
- Observe traces, logs, and metrics in OpenObserve.
- Build dashboards for deep insights.
Prerequisites
- Go installed
- OpenObserve account
- Docker (optional for running OpenObserve locally)
Step 1: Clone the Golang Tracing Example
OpenObserve provides a pre-configured repository demonstrating correlation between logs, traces, and metrics in a Go application. Clone the repository:
git clone https://github.com/openobserve/correlation.git
cd correlation
This repository includes a simple Go application instrumented with OpenTelemetry, exporting telemetry data to OpenObserve.
Step 2: Configure OpenObserve Credentials
OpenObserve requires an API key and an endpoint to ingest traces. Update the file with your OpenObserve credentials:
Openobserve Cloud Free Tier
Monthly Limits:
Ingestion - 50 GB logs, 50 GB metrics , 50 GB traces
Query volume - 200 GB
Pipelines - 50 GB of Data Processing
1K RUM & Session Replay
1K Action Script Runs
3 Users
7-Days Retention
Get started in minutes—no credit card required.
Step 3: Run the Go Application
Start the application:
go run main.go
The application will start a web server exposing an endpoint that generates traces on port 8080
Step 4: Generate Traces
Send a request to the Go application’s endpoint to trigger traces:
http://localhost:8080
This will create an OpenTelemetry trace with span details, sending data to OpenObserve.
Step 5: Observe Traces, Logs, and Metrics in OpenObserve
Viewing Traces
- Log in to OpenObserve.
- Navigate to the Traces section.
- Search for the service name used in the Go application.
- This app creates everything within default stream.
Viewing Logs
- Navigate to the Logs section.
- Filter logs by the Go service name.
- This app creates everything within default stream.
Viewing Metrics
- Navigate to Metrics.
- Search for metrics emitted by the Go application.
- This app creates everything within request_counter stream.
Step 6: Build Dashboards in OpenObserve
Dashboards provide a consolidated view of application performance. To create a dashboard:
- Go to Dashboards in OpenObserve.
- Click New Dashboard and name it.
- Add panels for your trace analysis.
- Customize queries to filter specific services or endpoints.
- Save and share the dashboard with your team.
- You can download this test dashboard that helps with logs to traces correlation
test.dashboard.json
Why Full Observability Matters in Go Applications
Implementing traces, logs, and metrics together helps in:
- Better Debugging: Identify slow dependencies in microservices.
- Performance Optimization: Track response times and optimize critical paths.
- Root Cause Analysis: Trace failures back to their source across distributed services.
- Holistic Observability: Combine traces with logs and metrics for full-stack insights.
With OpenTelemetry and OpenObserve, teams can achieve seamless end-to-end observability in Go applications.
Conclusion
In this guide, we demonstrated how to instrument a Go application with OpenTelemetry, send traces to OpenObserve, and analyze observability data. With these insights, developers can enhance application reliability, debug faster, and optimize performance.
Try it out today and supercharge your Go observability with OpenObserve!
Have questions? Join our Slack community for support. Watch our video for detailed understanding.
Happy Monitoring! 🚀
Table of Contents
- Prerequisites
- Step 1: Clone the Golang Tracing Example
- Step 2: Configure OpenObserve Credentials
- Step 3: Run the Go Application
- Step 4: Generate Traces
- Step 5: Observe Traces, Logs, and Metrics in OpenObserve
- Viewing Traces
- Viewing Logs
- Viewing Metrics
- Step 6: Build Dashboards in OpenObserve
- Why Full Observability Matters in Go Applications
- Conclusion
Openobserve Cloud Free Tier
Monthly Limits:
Ingestion - 50 GB logs, 50 GB metrics , 50 GB traces
Query volume - 200 GB
Pipelines - 50 GB of Data Processing
1K RUM & Session Replay
1K Action Script Runs
3 Users
7-Days Retention
Get started in minutes—no credit card required.
Solutions
Company
Resources
Pricing

SOC2 Type 2
Certified
OpenObserve Inc. © 2025
3000 Sand Hill Rd Building 1, Suite 260, Menlo Park, CA 94025