Class EC2Environment
- java.lang.Object
-
- software.amazon.cloudwatchlogs.emf.environment.AgentBasedEnvironment
-
- software.amazon.cloudwatchlogs.emf.environment.EC2Environment
-
- All Implemented Interfaces:
Environment
public class EC2Environment extends AgentBasedEnvironment
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigureContext(MetricsContext context)java.lang.StringgetType()Get the environment type.booleanprobe()Determines whether or not we are executing in this environment.-
Methods inherited from class software.amazon.cloudwatchlogs.emf.environment.AgentBasedEnvironment
getLogGroupName, getLogStreamName, getName, getSink
-
-
-
-
Method Detail
-
probe
public boolean probe()
Description copied from interface:EnvironmentDetermines whether or not we are executing in this environment.- Returns:
- true if it is running in this environment, otherwise, false
-
getType
public java.lang.String getType()
Description copied from interface:EnvironmentGet the environment type. This will be used to set the ServiceType dimension.- Returns:
- the type of the environment
-
configureContext
public void configureContext(MetricsContext context)
- Parameters:
context- the context to configure with environment properties
-
-