1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-10-31 00:07:40 +02:00

Update docs: don't reference WithBuiltinDetectors (#2486)

* Update docs: don't reference `WithBuiltinDetectors`

The method was removed in 25d739b

* Update docs: use `WithFromEnv()` in example
This commit is contained in:
Travis Jefferson
2021-12-28 11:34:41 -05:00
committed by GitHub
parent 245f13baac
commit 4769bbe7d8

View File

@@ -55,9 +55,7 @@ system it is running on, the cloud provider hosting that operating system instan
```go
resources := resource.New(context.Background(),
// Builtin detectors provide default values and support
// OTEL_RESOURCE_ATTRIBUTES and OTEL_SERVICE_NAME environment variables
resource.WithBuiltinDetectors(),
resource.WithFromEnv(), // pull attributes from OTEL_RESOURCE_ATTRIBUTES and OTEL_SERVICE_NAME environment variables
resource.WithProcess(), // This option configures a set of Detectors that discover process information
resource.WithDetectors(thirdparty.Detector{}), // Bring your own external Detector implementation
resource.WithAttributes(attribute.String("foo", "bar")), // Or specify resource attributes directly