Dash0 Logo
Infrastructure MonitoringLog ManagementApplication Performance ManagementDistributed TracingKubernetes MonitoringDashboardsAlertingService MapIntegrationsTransparent CostObservability as Code
PricingDocs
GuidesBlogKnowledgePodcastIntegrationsChangelog
Contact usMeet our TeamCareersSecurity
  • Book A Demo
  • Sign In
  • Start Free Trial
Book a demoSign in
Start Free Trial

Resources

  • Pricing
  • Blog
  • Knowledge
  • Integrations
  • Documentation
  • Glossary
  • OTelBin.io
  • Sitemap

Company

  • Our Team
  • Careers
  • Security

Contact

  • Contact us
  • GitHub
  • LinkedIn
  • X
  • YouTube
  • Dash0 Newsletter
Subscribe to our newsletter

Receive updates on OTelBin, Dash0, Observability, OpenTelemetry, and more.

  • Terms and Conditions
  • Privacy Policy
  • Data Processing Agreement
  • Vulnerability Disclosure

©2025 Dash0 Inc.

Hub/Go

Technology

Go

Dash0's Go integration offers visibility into your systems. Leverage Go for secure, scalable applications with this powerful open-source language.

Overview

Overview

Instrumenting your Go application with tracing, logging, and metrics provides valuable insights into its runtime behavior and performance. This instrumentation allows your application to generate telemetry data, which can then be used for effective monitoring, troubleshooting, and performance optimization.

Use Cases

  • Understand outgoing and incoming HTTP requests through traces and metrics. Allowing drill-downs to the database level.
  • You can see which database statements were executed and how long they took, which gives you valuable data to optimize your applications.
  • Reveal (uncaught) errors and the context in which they happened.

Setup

Install

OpenTelemetry comes with an SDK to instrument your Go application and ready-made instrumentation for common packages. We recommend you to follow the official OpenTelemetry Go getting started guide.

Configure

Most instrumentation in OpenTelemetry can be configured using environment variables. Specify the following variables to configure where telemetry should be sent.

Note: You can specify which dataset to send data to by adding the Dash0-Dataset header. For example:

For more information, see the dataset documentation.

We also recommend that you replace the value of the OTEL_SERVICE_NAME environment variable with something sensible.

Depending on how you have set up the OpenTelemetry SDK within your Go code, you also need to make sure to initialize the correct gRPC exporters (that then pick up these environment variables):

Kubernetes Setup

In case you are not using the Dash0 operator for Kubernetes to deploy your application, you should extend the OpenTelemetry resource attributes to include the Pod UID. This is important to merge the resources between logs,traces and metrics. You can do this by adding the following environment variables to your deployment:

This will add the k8s.pod.name and k8s.pod.uid attributes to the OpenTelemetry resource attributes, which will be included in all telemetry data sent to Dash0. To read more about resource equality and merging, please refer to the Dash0 docs.

In order to learn more about the importance of resource attributes read the blog post OpenTelemetry resource attributes: Best practices for Kubernetes