Go is an open source programming language that makes it simple to build secure, scalable systems.
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.
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.
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):