Documentation forSolarWinds Observability

Go Library instrumentation SDK

The Go Library supports the standard OpenTelemetry API. Additionally, a set of vendor-specific APIs are provided for features specific to SolarWinds Observability.

Using the OpenTelemetry API

Initialize this library, which will configure and initialize the OpenTelemetry SDK. The standard API calls such as getting the global tracer provider or creating a span can now be used to instrument your application. See the README and examples for details.

Using the swo API

Several vendor-specific APIs are available to an application under the swo package. The following sections highlight a few of the features provided. The full reference can be found at swo package - github.com/solarwinds/apm-go/swo - Go Packages.

Determine if apm-go is ready

On swo.Start(), this library initializes and maintains a connection to a SolarWinds Observability collector and receives settings used for making tracing decisions. This process can take up to a few seconds depending on the connection. If the application receives requests before the initialization is complete, these requests are not traced. While this is not critical for long-running server processes, it might be a problem for short-running apps such as cron jobs or CLI apps.

A call to WaitForReady allows the application to block requests until initialization is complete and the library is ready for tracing.

Set a custom transaction name

By default, transaction names are constructed based on attributes such as the span name or the requested route in the server framework. If this name is not descriptive enough, SetTransactionName can be used to override it with a custom one.