blob: 64939a271315d4b0ffc975f4825098506fd6590a [file] [log] [blame]
Abhay Kumara2ae5992025-11-10 14:02:24 +00001// 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.
20package resource // import "go.opentelemetry.io/otel/sdk/resource"