Skip to content

Commit

Permalink
update Resource spec based on the move to the SDK and named tracers (#…
Browse files Browse the repository at this point in the history
…421)

* update Resource spec based on the move to the SDK and named tracers

* Update specification/sdk-resource.md

Co-Authored-By: Tyler Yahn <[email protected]>

* Update specification/sdk-resource.md

Co-Authored-By: Tyler Yahn <[email protected]>

* Update specification/sdk-resource.md

Co-Authored-By: Tyler Yahn <[email protected]>

* provide example of what the entity producing telemetry means

* Update specification/sdk-resource.md

Co-Authored-By: John Watson <[email protected]>

Co-authored-by: Tyler Yahn <[email protected]>
Co-authored-by: John Watson <[email protected]>
Co-authored-by: Bogdan Drutu <[email protected]>
  • Loading branch information
4 people authored Jan 30, 2020
1 parent d212c54 commit 3bbed37
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions specification/sdk-resource.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down Expand Up @@ -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.

Expand Down

0 comments on commit 3bbed37

Please sign in to comment.