Class SamplingRequest
- java.lang.Object
-
- com.amazonaws.xray.strategy.sampling.SamplingRequest
-
public class SamplingRequest extends java.lang.ObjectRepresents the input request to the sampler. Contains attributes relevant to making sampling decisions.
-
-
Constructor Summary
Constructors Constructor Description SamplingRequest(@Nullable java.lang.String service, @Nullable java.lang.String host, @Nullable java.lang.String url, @Nullable java.lang.String method, @Nullable java.lang.String serviceType)SamplingRequest(java.lang.String roleArn, @Nullable java.lang.String resourceArn, @Nullable java.lang.String service, @Nullable java.lang.String host, @Nullable java.lang.String method, @Nullable java.lang.String url, @Nullable java.lang.String serviceType, @Nullable java.util.Map<java.lang.String,java.lang.String> attributes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<java.lang.String>getAccountId()java.util.Map<java.lang.String,java.lang.String>getAttributes()java.util.Optional<java.lang.String>getHost()java.util.Optional<java.lang.String>getMethod()java.util.Optional<java.lang.String>getResourceARN()java.lang.StringgetRoleARN()java.util.Optional<java.lang.String>getService()java.util.Optional<java.lang.String>getServiceType()java.util.Optional<java.lang.String>getUrl()voidsetServiceType(java.lang.String serviceType)
-
-
-
Constructor Detail
-
SamplingRequest
public SamplingRequest(java.lang.String roleArn, @Nullable java.lang.String resourceArn, @Nullable java.lang.String service, @Nullable java.lang.String host, @Nullable java.lang.String method, @Nullable java.lang.String url, @Nullable java.lang.String serviceType, @Nullable java.util.Map<java.lang.String,java.lang.String> attributes)- Parameters:
roleArn- the role of the customer requesting a sampling decision. Must not be null.resourceArn- the resource for which a sampling decision is being requested. Ex. "arn:aws:execute-api:us-east-1:1234566789012:qsxrty/test/GET/foo/bar/*".service- the service name for which a sampling decision is being requested. Ex. "www.foo.com".host- the host name extracted from the incoming request Host header.method- the Http Method extracted from the Request-Line.url- the URL extracted from the Request-Line.serviceType- the service type.attributes- list of key-value pairs generated on a per-request basis.
-
SamplingRequest
public SamplingRequest(@Nullable java.lang.String service, @Nullable java.lang.String host, @Nullable java.lang.String url, @Nullable java.lang.String method, @Nullable java.lang.String serviceType)
-
-
Method Detail
-
getAccountId
public java.util.Optional<java.lang.String> getAccountId()
-
getRoleARN
public java.lang.String getRoleARN()
-
getResourceARN
public java.util.Optional<java.lang.String> getResourceARN()
-
getService
public java.util.Optional<java.lang.String> getService()
-
getMethod
public java.util.Optional<java.lang.String> getMethod()
-
getUrl
public java.util.Optional<java.lang.String> getUrl()
-
getHost
public java.util.Optional<java.lang.String> getHost()
-
getServiceType
public java.util.Optional<java.lang.String> getServiceType()
-
getAttributes
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
-
setServiceType
public void setServiceType(java.lang.String serviceType)
-
-