Module resource
Expand description
Representations of entities producing telemetry.
A Resource is an immutable representation of the entity producing
telemetry as attributes. For example, a process producing telemetry that is
running in a container on Kubernetes has a Pod name, it is in a namespace
and possibly is part of a Deployment which also has a name. All three of
these attributes can be included in the Resource
. Note that there are
certain “standard attributes” that have prescribed meanings.
§Resource detectors
ResourceDetector
s are used to detect resource from runtime or
environmental variables. The following are provided by default with this
SDK.
EnvResourceDetector
- detect resource from environmental variables.TelemetryResourceDetector
- detect telemetry SDK’s information.
The OS and Process resource detectors are packaged separately in the
opentelemetry-resource-detector
crate.
Structs§
- EnvResourceDetector extract resource from environment variable
OTEL_RESOURCE_ATTRIBUTES
. See OpenTelemetry Resource Spec for details. - An iterator over the entries of a
Resource
. - An immutable representation of the entity producing telemetry as attributes. Utilizes
Arc
for efficient sharing and cloning. - There are attributes which MUST be provided by the SDK as specified in the Resource SDK specification. This detector detects those attributes and if the attribute cannot be detected, it uses the default value.
- Detect the telemetry SDK information used to capture data recorded by the instrumentation libraries.
Traits§
- ResourceDetector detects OpenTelemetry resource information