Class Resource
- java.lang.Object
-
- com.intergral.deep.agent.api.resource.Resource
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Resourcecreate(Map<String,Object> attributes)Returns aResource.static Resourcecreate(Map<String,Object> attributes, String schemaUrl)Returns aResource.Map<String,Object>getAttributes()Returns a map of attributes that describe the resource.StringgetSchemaUrl()Returns the URL of the OpenTelemetry schema used by this resource.Resourcemerge(Resource other)
-
-
-
Field Detail
-
DEFAULT
public static final Resource DEFAULT
-
-
Method Detail
-
create
public static Resource create(Map<String,Object> attributes)
Returns aResource.- Parameters:
attributes- a map of attributes that describe the resource.- Returns:
- a
Resource. - Throws:
NullPointerException- ifattributesis null.
-
create
public static Resource create(Map<String,Object> attributes, String schemaUrl)
Returns aResource.- Parameters:
attributes- a map of attributes that describe the resource.schemaUrl- The URL of the OpenTelemetry schema used to create this Resource.- Returns:
- a
Resource. - Throws:
NullPointerException- ifattributesis null.
-
getSchemaUrl
public String getSchemaUrl()
Returns the URL of the OpenTelemetry schema used by this resource. May be null.- Returns:
- An OpenTelemetry schema URL.
- Since:
- 1.4.0
-
getAttributes
public Map<String,Object> getAttributes()
Returns a map of attributes that describe the resource.- Returns:
- a map of attributes.
-
-