| 1 |
// Copyright The OpenTelemetry Authors |
| 2 |
// SPDX-License-Identifier: Apache-2.0 |
| 3 |
|
| 4 |
// Package resource provides detecting and representing resources. |
| 5 |
// |
| 6 |
// The fundamental struct is a Resource which holds identifying information |
| 7 |
// about the entities for which telemetry is exported. |
| 8 |
// |
| 9 |
// To automatically construct Resources from an environment a Detector |
| 10 |
// interface is defined. Implementations of this interface can be passed to |
| 11 |
// the Detect function to generate a Resource from the merged information. |
| 12 |
// |
| 13 |
// To load a user defined Resource from the environment variable |
| 14 |
// OTEL_RESOURCE_ATTRIBUTES the FromEnv Detector can be used. It will interpret |
| 15 |
// the value as a list of comma delimited key/value pairs |
| 16 |
// (e.g. `<key1>=<value1>,<key2>=<value2>,...`). |
| 17 |
// |
| 18 |
// While this package provides a stable API, |
| 19 |
// the attributes added by resource detectors may change. |
| 20 |
package resource // import "go.opentelemetry.io/otel/sdk/resource" |