diff --git a/specification/sdk-resource.md b/specification/sdk-resource.md index 3cfa510c2f3..54d60320b50 100644 --- a/specification/sdk-resource.md +++ b/specification/sdk-resource.md @@ -1,25 +1,30 @@ # Resource SDK -A [Resource](overview.md#resources) represents the entity producing telemetry. -The primary purpose of resources as a first-class concept in the API is +A [Resource](overview.md#resources) represents the entity producing +telemetry. 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`. + +The primary purpose of resources as a first-class concept in the SDK is decoupling of discovery of resource information from exporters. This allows for independent development and easy customization for users that need to integrate -with closed source environments. API MUST allow for creation of `Resources` and +with closed source environments. The SDK MUST allow for creation of `Resources` and for associating them with telemetry. When used with distributed tracing, a resource can be associated with the -[TracerSdk](sdk-tracing.md#tracer-sdk). When associated with `TracerSdk`, all -`Span`s produced by the `Tracer`, that is implemented by this `TracerSdk`, will +[TracerProvider](sdk-tracing.md#tracer-sdk). When associated with a +`TracerProvider`, all `Span`s produced by any `Tracer` from the provider will automatically be associated with this `Resource`. When used with metrics, a resource can be associated with the -[MeterSdk](sdk-metrics.md#meter-sdk). When associated with `MeterSdk`, all -`Metrics` produced by this `Meter`, that is implemented by this `MeterSdk`, will -automatically be associated with this `Resource`. +[MeterProvider](sdk-metrics.md#meter-sdk). When associated with a `MeterProvider`, +all `Metrics` produced by any `Meter` from the provider will automatically be +associated with this `Resource`. ## Resource creation -The API interface must support two ways to instantiate new resources. Those are: +The SDK must support two ways to instantiate new resources. Those are: ### Create @@ -66,7 +71,7 @@ In addition to resource creation, the following operations should be provided: ### Retrieve attributes -The API should provide a way to retrieve a read only collection of attributes +The SDK should provide a way to retrieve a read only collection of attributes associated with a resource. The attributes should consist of the name and values, both of which should be strings.