Class Resource
Defined in File resource.h
Class Documentation
-
class Resource
Public Functions
-
const ResourceAttributes &GetAttributes() const noexcept
-
const std::string &GetSchemaURL() const noexcept
Public Static Functions
-
static Resource Create(const ResourceAttributes &attributes, const std::string &schema_url = std::string{})
Returns a newly created Resource with the specified attributes. It adds (merge) SDK attributes and OTEL attributes before returning.
- Parameters
attributes – for this resource
- Returns
the newly created Resource.
Protected Functions
-
Resource(const ResourceAttributes &attributes = ResourceAttributes(), const std::string &schema_url = std::string{}) noexcept
The constructor is protected and only for use internally by the class and inside ResourceDetector class. Users should use the Create factory method to obtain a Resource instance.
-
const ResourceAttributes &GetAttributes() const noexcept