Class LambdaEnvironment

  • All Implemented Interfaces:
    Environment

    public class LambdaEnvironment
    extends java.lang.Object
    implements Environment
    An environment stands for the AWS Lambda environment.
    • Constructor Detail

      • LambdaEnvironment

        public LambdaEnvironment()
    • Method Detail

      • probe

        public boolean probe()
        Description copied from interface: Environment
        Determines whether or not we are executing in this environment.
        Specified by:
        probe in interface Environment
        Returns:
        true if it is running in this environment, otherwise, false
      • getName

        public java.lang.String getName()
        Description copied from interface: Environment
        Get the environment name. This will be used to set the ServiceName dimension.
        Specified by:
        getName in interface Environment
        Returns:
        the name of the environment
      • getType

        public java.lang.String getType()
        Description copied from interface: Environment
        Get the environment type. This will be used to set the ServiceType dimension.
        Specified by:
        getType in interface Environment
        Returns:
        the type of the environment
      • getLogGroupName

        public java.lang.String getLogGroupName()
        Description copied from interface: Environment
        Get log group name. This will be used to set the LogGroup dimension.
        Specified by:
        getLogGroupName in interface Environment
        Returns:
        the log group name
      • configureContext

        public void configureContext​(MetricsContext context)
        Specified by:
        configureContext in interface Environment
        Parameters:
        context - the context to configure with environment properties
      • getSink

        public ISink getSink()
        Specified by:
        getSink in interface Environment
        Returns:
        an appropriate sink for this environment