Builds a Resource with whichever API the installed @opentelemetry/resources provides: 2.x only exports resourceFromAttributes() (Resource is a type there, so new Resource() throws), 1.x exports the Resource class.
@opentelemetry/resources
resourceFromAttributes()
Resource
new Resource()
Builds a Resource with whichever API the installed
@opentelemetry/resourcesprovides: 2.x only exportsresourceFromAttributes()(Resourceis a type there, sonew Resource()throws), 1.x exports theResourceclass.