Add Resource type to Tracing API
OpenTelemetry defines a Resource as part of its spec: https://github.com/open-telemetry/opentelemetry-specification/blob/v0.7.0/specification/resource/sdk.md
Resource captures information about the entity for which telemetry is recorded. For example, metrics exposed by a Kubernetes container can be linked to a resource that specifies the cluster, namespace, pod, and container name.
A resource is passed along when sending spans to the Otel collector.
Resources also have attributes with semantic conventions similar to spans: https://github.com/open-telemetry/opentelemetry-specification/blob/v0.7.0/specification/resource/semantic_conventions/README.md
It might be a good idea to expose the resource API as well as part of the Tracing library, but as the resources (e.g. which cloud provider the app is running on or whether it's running in a Docker container) are usually unknown to frameworks and instead known by the application developer, this API could also live in a specific tracer implementation.
I'm leaving this as something we can add later, trying to figure out how to make a 1.0 soon
selfish bump
@wibed Thanks for the bump 🙏 Do you have a particular use case in mind for having the concept of resources in the library?
id like to use resources as a cheap key:value store. new to the whole tracing situation i am not sure which solution is better suited though