def configure_context()

in aws_embedded_metrics/environment/lambda_environment.py [0:0]


    def configure_context(self, context: MetricsContext) -> None:
        context.set_property("executionEnvironment", get_env("AWS_EXECUTION_ENV"))
        context.set_property("memorySize", get_env("AWS_LAMBDA_FUNCTION_MEMORY_SIZE"))
        context.set_property("functionVersion", get_env("AWS_LAMBDA_FUNCTION_VERSION"))
        context.set_property("logStreamId", get_env("AWS_LAMBDA_LOG_STREAM_NAME"))
        trace_id = get_env("_X_AMZN_TRACE_ID")

        if len(trace_id) > 0 and "Sampled=1" in trace_id:
            context.set_property("traceId", trace_id)