Interface Environment
-
- All Known Implementing Classes:
AgentBasedEnvironment,DefaultEnvironment,EC2Environment,ECSEnvironment,LambdaEnvironment,LocalEnvironment
public interface EnvironmentA runtime environment (e.g. Lambda, EKS, ECS, EC2).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidconfigureContext(MetricsContext context)java.lang.StringgetLogGroupName()Get log group name.java.lang.StringgetName()Get the environment name.ISinkgetSink()java.lang.StringgetType()Get the environment type.booleanprobe()Determines whether or not we are executing in this environment.
-
-
-
Method Detail
-
probe
boolean probe()
Determines whether or not we are executing in this environment.- Returns:
- true if it is running in this environment, otherwise, false
-
getName
java.lang.String getName()
Get the environment name. This will be used to set the ServiceName dimension.- Returns:
- the name of the environment
-
getType
java.lang.String getType()
Get the environment type. This will be used to set the ServiceType dimension.- Returns:
- the type of the environment
-
getLogGroupName
java.lang.String getLogGroupName()
Get log group name. This will be used to set the LogGroup dimension.- Returns:
- the log group name
-
configureContext
void configureContext(MetricsContext context)
- Parameters:
context- the context to configure with environment properties
-
getSink
ISink getSink()
- Returns:
- an appropriate sink for this environment
-
-