Package com.amazonaws.xray.plugins
Class EC2Plugin
java.lang.Object
com.amazonaws.xray.plugins.EC2Plugin
- All Implemented Interfaces:
Plugin
A plugin, for use with the
AWSXRayRecorderBuilder
class, which will add EC2 instance information to segments generated
by the built AWSXRayRecorder
instance.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEC2Plugin
(FileSystem fs, com.amazonaws.xray.plugins.EC2MetadataFetcher metadataFetcher) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Determine equality of plugins using origin to uniquely identify themReturns the name of the origin associated with this plugin.int
hashCode()
Hash plugin object using origin to uniquely identify themboolean
void
Reads the log group configuration file generated by the CloudWatch Agent to discover all log groups being used on this instance and populates log reference set with them to be included in trace documents.void
Reads EC2 provided metadata to include it in trace document
-
Field Details
-
ORIGIN
- See Also:
-
-
Constructor Details
-
EC2Plugin
public EC2Plugin() -
EC2Plugin
-
-
Method Details
-
isEnabled
public boolean isEnabled() -
getServiceName
- Specified by:
getServiceName
in interfacePlugin
-
populateRuntimeContext
public void populateRuntimeContext()Reads EC2 provided metadata to include it in trace document -
getRuntimeContext
- Specified by:
getRuntimeContext
in interfacePlugin
-
populateLogReferences
public void populateLogReferences()Reads the log group configuration file generated by the CloudWatch Agent to discover all log groups being used on this instance and populates log reference set with them to be included in trace documents. -
getLogReferences
- Specified by:
getLogReferences
in interfacePlugin
- Returns:
- Set of AWS log references used by CloudWatch agent. The ARN of these log references is not available at this time.
-
getOrigin
Description copied from interface:Plugin
Returns the name of the origin associated with this plugin. TheAWSXRayRecorder
contains a prioritized list of origins from least to most specific. -
equals
Determine equality of plugins using origin to uniquely identify them -
hashCode
public int hashCode()Hash plugin object using origin to uniquely identify them
-