AppSignal Go Installation

Please follow the installation guide first, when adding a new application to AppSignal.

Standalone Agent

OpenTelemetry data is reported via the AppSignal Standalone Agent. You can install the Standalone Agent on the host where your application will be deployed by following the instructions in the Standalone Agent Installation Guide, or you can use the Docker image.

In addition to the required configuration options, the enable_opentelemetry_http configuration option needs to be set to true in the appsignal-agent.conf configuration file. This is needed to receive exported OpenTelemetry trace data on the agent's HTTP server.

TOML
# /etc/appsignal-agent.conf push_api_key = "<YOUR_PUSH_API_KEY>" app_name = "<YOUR_APP_NAME>" environment = "production" enable_opentelemetry_http = true

OpenTelemetry for Go

The instrumentation of Go applications is done through the OpenTelemetry instrumentation packages.

In the next sections of our documentation, we'll demonstrate our recommended approach to instrumenting a Go application. For a more detailed explanation of how OpenTelemetry's Go instrumentation works we recommend reading OpenTelemetry's Go documentation.

Installing OpenTelemetry packages

The following need to be imported:

Go
import( "context" "go.opentelemetry.io/otel" "go.opentelemetry.io/otel/exporters/otlp/otlptrace" "go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp" "go.opentelemetry.io/otel/sdk/trace" )

Configuration

After installing all the necessary packages, please continue to the configuration documentation for the next steps to report data to AppSignal.