Class ECSEnvironment
- java.lang.Object
-
- software.amazon.cloudwatchlogs.emf.environment.AgentBasedEnvironment
-
- software.amazon.cloudwatchlogs.emf.environment.ECSEnvironment
-
- All Implemented Interfaces:
Environment
public class ECSEnvironment extends AgentBasedEnvironment
-
-
Constructor Summary
Constructors Constructor Description ECSEnvironment(Configuration config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigureContext(MetricsContext context)java.lang.StringgetLogGroupName()Get log group name.java.lang.StringgetName()Get the environment name.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
getLogStreamName, getSink
-
-
-
-
Constructor Detail
-
ECSEnvironment
public ECSEnvironment(Configuration config)
-
-
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
-
getName
public java.lang.String getName()
Description copied from interface:EnvironmentGet the environment name. This will be used to set the ServiceName dimension.- Specified by:
getNamein interfaceEnvironment- Overrides:
getNamein classAgentBasedEnvironment- Returns:
- the name of the environment
-
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
-
getLogGroupName
public java.lang.String getLogGroupName()
Description copied from interface:EnvironmentGet log group name. This will be used to set the LogGroup dimension.- Specified by:
getLogGroupNamein interfaceEnvironment- Overrides:
getLogGroupNamein classAgentBasedEnvironment- Returns:
- the log group name
-
configureContext
public void configureContext(MetricsContext context)
- Parameters:
context- the context to configure with environment properties
-
-