diff --git a/content/en/docs/languages/go/libraries.md b/content/en/docs/languages/go/libraries.md index 770395d5b81a..4026a4434928 100644 --- a/content/en/docs/languages/go/libraries.md +++ b/content/en/docs/languages/go/libraries.md @@ -7,12 +7,18 @@ aliases: weight: 40 --- -Go does not support truly automatic instrumentation like other languages today. -Instead, you'll need to depend on +{{% docs/languages/libraries-intro Go %}} + +## Use instrumentation libraries + +If a library does not come with OpenTelemetry out of the box, you can use [instrumentation libraries](/docs/specs/otel/glossary/#instrumentation-library) -that generate telemetry data for a particular instrumented library. For example, -the instrumentation library for `net/http` will automatically create spans that -track inbound and outbound requests once you configure it in your code. +to generate telemetry data for a library or framework. + +For example, the +[instrumentation library for `net/http`](https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp) +automatically creates [spans](/docs/concepts/signals/traces/#spans) and +[metrics](/docs/concepts/signals/metrics/) based on the HTTP requests. ## Setup @@ -29,7 +35,7 @@ go get go.opentelemetry.io/contrib/instrumentation/{import-path}/otel{package-na Then configure it in your code based on what the library requires to be activated. -[Getting Started](../instrumentation/) provides an example showing how to set up +[Getting Started](../getting-started/) provides an example showing how to set up instrumentation for a `net/http` server. ## Available packages @@ -42,6 +48,7 @@ A full list of instrumentation libraries available can be found in the Instrumentation libraries can do things like generate telemetry data for inbound and outbound HTTP requests, but they don't instrument your actual application. -To get richer telemetry data, use [manual instrumentation](../instrumentation/) -to enrich your telemetry data from instrumentation libraries with -instrumentation from your running application. +Enrich your telemetry data by integrating +[custom instrumentation](../instrumentation/) into your code. This supplements +the standard library telemetry, and can offer deeper insights into your running +application. diff --git a/static/refcache.json b/static/refcache.json index 021f79ef8397..3bc19f2f2b4c 100644 --- a/static/refcache.json +++ b/static/refcache.json @@ -6095,6 +6095,10 @@ "StatusCode": 200, "LastSeen": "2024-01-18T19:07:49.734386-05:00" }, + "https://pkg.go.dev/go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp": { + "StatusCode": 200, + "LastSeen": "2024-01-19T15:36:28.468246594Z" + }, "https://pkg.go.dev/go.opentelemetry.io/otel": { "StatusCode": 200, "LastSeen": "2023-09-11T14:33:25.55139188Z"